List of usage examples for org.eclipse.jdt.core JavaCore removeElementChangedListener
public static void removeElementChangedListener(IElementChangedListener listener)
From source file:com.amazonaws.eclipse.lambda.project.listener.LambdaProjectChangeTracker.java
License:Open Source License
public void stop() { JavaCore.removeElementChangedListener(projectChangeListener); }
From source file:com.blackducksoftware.integration.eclipseplugin.startup.Activator.java
License:Apache License
@Override public void stop(final BundleContext context) throws Exception { plugin = null;//from www. j a v a 2s.co m ResourcesPlugin.getWorkspace().removeResourceChangeListener(newJavaProjectListener); ResourcesPlugin.getWorkspace().removeResourceChangeListener(javaProjectDeletedListener); getPreferenceStore().removePropertyChangeListener(defaultPrefChangeListener); JavaCore.removeElementChangedListener(depsChangedListener); super.stop(context); }
From source file:com.cb.eclipse.folding.java.EnhancedJavaFoldingStructureProvider.java
License:Open Source License
public void release() { releaseDoc(); JavaCore.removeElementChangedListener(elementChangedListener); }
From source file:com.github.elucash.lambda4jdt.FoldingStructureProvider.java
License:Open Source License
/** * Called whenever projection is disabled, for example when the provider is {@link #uninstall() * uninstalled}, when the viewer issues a {@link IProjectionListener#projectionDisabled() * projectionDisabled} message and before {@link #handleProjectionEnabled() enabling} the * provider. Implementations must be prepared to handle multiple calls to this method even if * the provider is already disabled.//from www .ja v a 2 s . c o m * <p> * Subclasses may extend. * </p> */ protected void handleProjectionDisabled() { if (fElementListener != null) { JavaCore.removeElementChangedListener(fElementListener); fElementListener = null; } }
From source file:com.google.gdt.eclipse.core.ClasspathUtilities.java
License:Open Source License
/** * Waits indefinitely until the given classpath entries are on the given * project's raw classpath./*from w ww . j a v a 2 s . c o m*/ * * @throws JavaModelException * @throws InterruptedException */ public static void waitUntilEntriesAreOnClasspath(final IJavaProject javaProject, final List<IClasspathEntry> classpathEntries) throws JavaModelException, InterruptedException { // Used to notify when we are finished -- either all entries are on the // classpath or the anon class had an exception final Object finished = new Object(); final JavaModelException[] anonClassException = new JavaModelException[1]; ClasspathChangedListener listener = new ClasspathChangedListener() { @Override protected void classpathChanged(IJavaProject curJavaProject) { synchronized (finished) { try { if (curJavaProject.equals(javaProject) && areEntriesOnClasspath(javaProject, classpathEntries)) { finished.notifyAll(); } } catch (JavaModelException e) { anonClassException[0] = e; finished.notifyAll(); } } } }; synchronized (finished) { JavaCore.addElementChangedListener(listener); try { // We're in a state where either the entries already exist on the // classpath, or we have a callback queued up (because of the // synchronization on finished) that will notify us when they are added. while (!areEntriesOnClasspath(javaProject, classpathEntries)) { finished.wait(); } if (anonClassException[0] != null) { throw anonClassException[0]; } } finally { JavaCore.removeElementChangedListener(listener); } } }
From source file:com.google.gdt.eclipse.core.reference.ElementChangeListener.java
License:Open Source License
/** * Stops tracking element changes. */ void stop() { JavaCore.removeElementChangedListener(this); }
From source file:com.google.gdt.eclipse.core.sdk.WebInfFolderUpdater.java
License:Open Source License
/** * Stops listening for changes. */ public void stop() { JavaCore.removeElementChangedListener(classpathChangedListener); }
From source file:com.google.gdt.eclipse.managedapis.impl.ManagedApiProjectImpl.java
License:Open Source License
private void stopListeningForManagedApiChanges() { synchronized (this) { if (listener != null) { JavaCore.removeElementChangedListener(listener); listener = null;/*from w ww . jav a2 s.c o m*/ } } }
From source file:com.google.gdt.eclipse.suite.launch.processors.LaunchConfigAffectingChangesListener.java
License:Open Source License
public void stop() { WebAppProjectProperties.removeWarOutLocationChangedListener(this); ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); manager.removeLaunchConfigurationListener(this); JavaCore.removeElementChangedListener(this); ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); }
From source file:com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderReferenceManager.java
License:Open Source License
/** * Stops the reference manager.//from ww w . jav a 2 s. com */ public void stop() { if (UiBinderConstants.UI_BINDER_ENABLED) { ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourcePurger); JavaCore.removeElementChangedListener(uiBinderSubtypePurger); referenceManager.stop(); referenceManager.removeReferencedResourceChangeListener(referenceChangeListener); persist(); } }