org.eclipse.xtext.workspace.IWorkspaceConfig Java Examples
The following examples show how to use
org.eclipse.xtext.workspace.IWorkspaceConfig.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XWorkspaceManager.java From n4js with Eclipse Public License 1.0 | 6 votes |
/** * @param workspaceConfig * the new workspace configuration. */ synchronized protected void setWorkspaceConfig(IWorkspaceConfig workspaceConfig) { if (this.workspaceConfig != null && workspaceConfig != null && this.workspaceConfig == workspaceConfig) { return; } // clean up old projects Collection<XProjectManager> pmCopy = new ArrayList<>(getProjectManagers()); for (XProjectManager projectManager : pmCopy) { removeProject(projectManager); } projectName2ProjectManager.clear(); fullIndex.removeAllContainers(); // init projects this.workspaceConfig = workspaceConfig; for (IProjectConfig projectConfig : getWorkspaceConfig().getProjects()) { addProject(projectConfig); } }
Example #2
Source File: XWorkspaceManager.java From n4js with Eclipse Public License 1.0 | 5 votes |
/** * @return the workspace configuration * @throws ResponseErrorException * if the workspace is not yet initialized */ public IWorkspaceConfig getWorkspaceConfig() throws ResponseErrorException { if (workspaceConfig == null) { ResponseError error = new ResponseError(ResponseErrorCode.serverNotInitialized, "Workspace has not been initialized yet.", null); throw new ResponseErrorException(error); } return workspaceConfig; }
Example #3
Source File: MultiRootWorkspaceConfigFactory.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public IWorkspaceConfig getWorkspaceConfig(List<WorkspaceFolder> workspaceFolders) { WorkspaceConfig workspaceConfig = new WorkspaceConfig(); Set<String> existingProjectNames = new HashSet<>(); for(WorkspaceFolder workspaceFolder: workspaceFolders) addProjectsForWorkspaceFolder(workspaceConfig, workspaceFolder, existingProjectNames); return workspaceConfig; }
Example #4
Source File: WorkspaceManager.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * @return the workspace configuration * @throws ResponseErrorException * if the workspace is not yet initialized */ protected IWorkspaceConfig getWorkspaceConfig() throws ResponseErrorException { if (workspaceConfig == null) { ResponseError error = new ResponseError(ResponseErrorCode.serverNotInitialized, "Workspace has not been initialized yet.", null); throw new ResponseErrorException(error); } return workspaceConfig; }
Example #5
Source File: N4JSProjectConfig.java From n4js with Eclipse Public License 1.0 | 4 votes |
/** * Constructor */ public N4JSProjectConfig(IWorkspaceConfig workspace, IN4JSProject delegate) { this.workspace = workspace; this.delegate = delegate; }
Example #6
Source File: N4JSProjectConfig.java From n4js with Eclipse Public License 1.0 | 4 votes |
@Override public IWorkspaceConfig getWorkspaceConfig() { return workspace; }
Example #7
Source File: EclipseProjectConfig.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Override public IWorkspaceConfig getWorkspaceConfig() { return new EclipseWorkspaceConfig(project.getWorkspace().getRoot(), projectConfigProvider); }
Example #8
Source File: LiveShadowedChunkedResourceDescriptions.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public IWorkspaceConfig getWorkspaceConfig() { return workspaceConfig; }
Example #9
Source File: ProjectConfig.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public IWorkspaceConfig getWorkspaceConfig() { return workspaceConfig; }
Example #10
Source File: WorkspaceManager.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
protected IWorkspaceConfig createWorkspaceConfig() { return workspaceConfigFactory.getWorkspaceConfig(workspaceFolders); }
Example #11
Source File: IMultiRootWorkspaceConfigFactory.java From xtext-core with Eclipse Public License 2.0 | 2 votes |
/** * Create a workspace config at the given location. * * @param workspaceFolders the list of workspace root folders * @return the workspace configuration. */ IWorkspaceConfig getWorkspaceConfig(List<WorkspaceFolder> workspaceFolders);
Example #12
Source File: WorkspaceManager.java From xtext-core with Eclipse Public License 2.0 | 2 votes |
/** * @param workspaceConfig * the new workspace configuration. */ protected void setWorkspaceConfig(IWorkspaceConfig workspaceConfig) { this.workspaceConfig = workspaceConfig; }