Search in sources :

Example 1 with ProjectsManager

use of org.eclipse.jdt.ls.core.internal.managers.ProjectsManager in project eclipse.jdt.ls by eclipse.

the class JavaLanguageServerPlugin method start.

/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
@Override
public void start(BundleContext bundleContext) throws BackingStoreException {
    try {
        Platform.getBundle(ResourcesPlugin.PI_RESOURCES).start(Bundle.START_TRANSIENT);
    } catch (BundleException e) {
        logException(e.getMessage(), e);
    }
    try {
        redirectStandardStreams();
    } catch (FileNotFoundException e) {
        logException(e.getMessage(), e);
    }
    JavaLanguageServerPlugin.context = bundleContext;
    JavaLanguageServerPlugin.pluginInstance = this;
    // Set the ID to use for preference lookups
    JavaManipulation.setPreferenceNodeId(PLUGIN_ID);
    preferenceManager = new PreferenceManager();
    initializeJDTOptions();
    projectsManager = new ProjectsManager(preferenceManager);
    try {
        ResourcesPlugin.getWorkspace().addSaveParticipant(PLUGIN_ID, projectsManager);
    } catch (CoreException e) {
        logException(e.getMessage(), e);
    }
    contentProviderManager = new ContentProviderManager(preferenceManager);
    logInfo(getClass() + " is started");
    configureProxy();
}
Also used : ContentProviderManager(org.eclipse.jdt.ls.core.internal.managers.ContentProviderManager) CoreException(org.eclipse.core.runtime.CoreException) FileNotFoundException(java.io.FileNotFoundException) BundleException(org.osgi.framework.BundleException) ProjectsManager(org.eclipse.jdt.ls.core.internal.managers.ProjectsManager) PreferenceManager(org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 CoreException (org.eclipse.core.runtime.CoreException)1 ContentProviderManager (org.eclipse.jdt.ls.core.internal.managers.ContentProviderManager)1 ProjectsManager (org.eclipse.jdt.ls.core.internal.managers.ProjectsManager)1 PreferenceManager (org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager)1 BundleException (org.osgi.framework.BundleException)1