private void beginOperation() { // Do not try to acquire the lock if the resources tree is locked // The reason for this is that during the resource delta phase (i.e. when the tree is locked) // the workspace lock is held. If we obtain our lock, there is // a chance of deadlock. It is OK if we don't as we are still protected // by scheduling rules and the workspace lock. if (ResourcesPlugin.getWorkspace().isTreeLocked()) return; lock.acquire(); }
private void endOperation() { // See beginOperation() for a description of why the lock is not obtained when the tree is locked if (ResourcesPlugin.getWorkspace().isTreeLocked()) return; lock.release(); }
public SetVariablesOperation(String[] variableNames, IPath[] variablePaths, boolean updatePreferences) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.variableNames = variableNames; this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; }
public SetContainerOperation(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.containerPath = containerPath; this.affectedProjects = affectedProjects; this.respectiveContainers = respectiveContainers; }
public SetVariablesOperation(String[] variableNames, IPath[] variablePaths, boolean updatePreferences) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.variableNames = variableNames; this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; }
public SetContainerOperation(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.containerPath = containerPath; this.affectedProjects = affectedProjects; this.respectiveContainers = respectiveContainers; }
public SetContainerOperation(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.containerPath = containerPath; this.affectedProjects = affectedProjects; this.respectiveContainers = respectiveContainers; }
public SetVariablesOperation(String[] variableNames, IPath[] variablePaths, boolean updatePreferences) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.variableNames = variableNames; this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; }
public SetVariablesOperation(String[] variableNames, IPath[] variablePaths, boolean updatePreferences) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.variableNames = variableNames; this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; }
public SetVariablesOperation(String[] variableNames, IPath[] variablePaths, boolean updatePreferences) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.variableNames = variableNames; this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; }
public SetContainerOperation(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.containerPath = containerPath; this.affectedProjects = affectedProjects; this.respectiveContainers = respectiveContainers; }
public SetContainerOperation(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.containerPath = containerPath; this.affectedProjects = affectedProjects; this.respectiveContainers = respectiveContainers; }
public SetContainerOperation(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.containerPath = containerPath; this.affectedProjects = affectedProjects; this.respectiveContainers = respectiveContainers; }
public SetVariablesOperation(String[] variableNames, IPath[] variablePaths, boolean updatePreferences) { super(new IJavaElement[] {JavaModelManager.getJavaModelManager().getJavaModel()}, !ResourcesPlugin.getWorkspace().isTreeLocked()); this.variableNames = variableNames; this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; }
public void run( IMarker marker ) { IProject proj = marker.getResource().getProject(); try { ModuleMigratorManager manager = ModuleMigratorManager.getManager(proj); if (!manager.isMigrating() && !ResourcesPlugin.getWorkspace().isTreeLocked()) manager.migrateOldMetaData(proj,true); } catch( Exception e ) { e.printStackTrace(); } }
final IResourceDelta delta = event.getDelta(); if (ResourcesPlugin.getWorkspace().isTreeLocked()) { primAcceptDelta(delta, event);
if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) { new ClasspathValidation(project).validate();
if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) { new ClasspathValidation(project).validate();
if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) { new ClasspathValidation(project).validate();
if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) { new ClasspathValidation(project).validate();