org.eclipse.xtext.ide.server.UriExtensions Java Examples

The following examples show how to use org.eclipse.xtext.ide.server.UriExtensions. 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: ChangeConverter2.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected ChangeConverter2(IResourceServiceProvider.Registry registry, WorkspaceEdit edit,
		ILanguageServerAccess access, UriExtensions uriExtensions) {
	this.registry = registry;
	this.uriExtensions = uriExtensions;
	this.edit = edit;
	this.access = access;
	Boolean documentChanges = null;
	if (access != null) {
		InitializeParams initializeParams = access.getInitializeParams();
		if (initializeParams != null) {
			ClientCapabilities clientCapabilities = initializeParams.getCapabilities();
			if (clientCapabilities != null) {
				WorkspaceClientCapabilities workspaceClientCapabilities = clientCapabilities.getWorkspace();
				if (workspaceClientCapabilities != null) {
					WorkspaceEditCapabilities workspaceEditCapabilities = workspaceClientCapabilities
							.getWorkspaceEdit();
					if (workspaceEditCapabilities != null) {
						documentChanges = workspaceEditCapabilities.getDocumentChanges();
					}
				}
			}
		}
	}
	this.useDocumentChanges = documentChanges == Boolean.TRUE;
	if (this.useDocumentChanges) {
		this.edit.setDocumentChanges(new ArrayList<>());
	} else {
		this.edit.setChanges(new LinkedHashMap<>());
	}
}
 
Example #2
Source File: RuntimeServerModule.java    From openhab-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected void configure() {
    binder().bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class);

    bind(UriExtensions.class).toInstance(new MappingUriExtensions(ConfigConstants.getConfigFolder()));
    bind(LanguageServer.class).to(LanguageServerImpl.class);
    bind(IResourceServiceProvider.Registry.class).toProvider(new RegistryProvider(scriptServiceUtil, scriptEngine));
    bind(IWorkspaceConfigFactory.class).to(ProjectWorkspaceConfigFactory.class);
    bind(IProjectDescriptionFactory.class).to(DefaultProjectDescriptionFactory.class);
    bind(IContainer.Manager.class).to(ProjectDescriptionBasedContainerManager.class);
    bind(ILanguageServerShutdownAndExitHandler.class).to(ILanguageServerShutdownAndExitHandler.NullImpl.class);
}
 
Example #3
Source File: RuntimeServerModule.java    From smarthome with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected void configure() {
    binder().bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class);

    bind(UriExtensions.class).toInstance(new MappingUriExtensions(ConfigConstants.getConfigFolder()));
    bind(LanguageServer.class).to(LanguageServerImpl.class);
    bind(IResourceServiceProvider.Registry.class).toProvider(new RegistryProvider(scriptServiceUtil, scriptEngine));
    bind(IWorkspaceConfigFactory.class).to(ProjectWorkspaceConfigFactory.class);
    bind(IProjectDescriptionFactory.class).to(DefaultProjectDescriptionFactory.class);
    bind(IContainer.Manager.class).to(ProjectDescriptionBasedContainerManager.class);
}