Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2013-08-07 17:20:12 +0000
committerGerrit Code Review @ Eclipse.org2013-08-12 19:23:56 +0000
commit670ee2ed44a51cfd5676c18968a45e9e86ad9bab (patch)
treee0edae81fb85e6c300b25426944ef8bb198ad6ce
parent84d37590ce535facddfbcc2ad4655c19b5e18ab1 (diff)
downloadeclipse.jdt.debug-670ee2ed44a51cfd5676c18968a45e9e86ad9bab.tar.gz
eclipse.jdt.debug-670ee2ed44a51cfd5676c18968a45e9e86ad9bab.tar.xz
eclipse.jdt.debug-670ee2ed44a51cfd5676c18968a45e9e86ad9bab.zip
Bug 94047 - [ActionSets] [classpath] Toolbar shudders when opening the
Classpath Variables preference page
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaClasspathVariablesInitializer.java33
1 files changed, 5 insertions, 28 deletions
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaClasspathVariablesInitializer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaClasspathVariablesInitializer.java
index 05e98b737..7aacdbcde 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaClasspathVariablesInitializer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaClasspathVariablesInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,9 +11,6 @@
package org.eclipse.jdt.internal.launching;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -72,21 +69,11 @@ public class JavaClasspathVariablesInitializer extends ClasspathVariableInitiali
if (newPath == null) {
return;
}
- IWorkspace workspace= ResourcesPlugin.getWorkspace();
- IWorkspaceDescription wsDescription= workspace.getDescription();
- boolean wasAutobuild= wsDescription.isAutoBuilding();
try {
- setAutobuild(workspace, false);
- setJREVariable(newPath, variable);
- } catch (CoreException ce) {
- LaunchingPlugin.log(ce);
- return;
- } finally {
- try {
- setAutobuild(workspace, wasAutobuild);
- } catch (CoreException ce) {
- LaunchingPlugin.log(ce);
- }
+ setJREVariable(newPath, variable);
+ }
+ catch (CoreException e) {
+ LaunchingPlugin.log(e);
}
}
}
@@ -96,16 +83,6 @@ public class JavaClasspathVariablesInitializer extends ClasspathVariableInitiali
JavaCore.setClasspathVariable(var, newPath, getMonitor());
}
- private boolean setAutobuild(IWorkspace ws, boolean newState) throws CoreException {
- IWorkspaceDescription wsDescription= ws.getDescription();
- boolean oldState= wsDescription.isAutoBuilding();
- if (oldState != newState) {
- wsDescription.setAutoBuilding(newState);
- ws.setDescription(wsDescription);
- }
- return oldState;
- }
-
protected IProgressMonitor getMonitor() {
if (fMonitor == null) {
return new NullProgressMonitor();

Back to the top