Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2004-06-03 14:22:26 +0000
committerDarin Wright2004-06-03 14:22:26 +0000
commit72a202183de8ff8c161dd45a4a867350dafaaae6 (patch)
tree54f8328f408a33d103f6fd2c4f085dcce4b5c6eb /org.eclipse.jdt.debug/model
parent0b817a448c4d271b8ae7f0f26342423d264845ac (diff)
downloadeclipse.jdt.debug-72a202183de8ff8c161dd45a4a867350dafaaae6.tar.gz
eclipse.jdt.debug-72a202183de8ff8c161dd45a4a867350dafaaae6.tar.xz
eclipse.jdt.debug-72a202183de8ff8c161dd45a4a867350dafaaae6.zip
Bug 45980 - Check calls to IWorkspace.run(...)
Diffstat (limited to 'org.eclipse.jdt.debug/model')
-rw-r--r--org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java26
1 files changed, 6 insertions, 20 deletions
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
index c57f7adae..a618b2f00 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
@@ -29,12 +29,10 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Path;
@@ -283,20 +281,20 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
final List hotSwapTargets= getHotSwapTargets();
final List noHotSwapTargets= getNoHotSwapTargets();
if (!hotSwapTargets.isEmpty()) {
- IWorkspaceRunnable wRunnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
+ Runnable runnable= new Runnable() {
+ public void run() {
doHotCodeReplace(hotSwapTargets, resources, qualifiedNames);
}
};
- fork(wRunnable);
+ DebugPlugin.getDefault().asyncExec(runnable);
}
if (!noHotSwapTargets.isEmpty()) {
- IWorkspaceRunnable wRunnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
+ Runnable runnable= new Runnable() {
+ public void run() {
notifyUnsupportedHCR(noHotSwapTargets, qualifiedNames);
}
};
- fork(wRunnable);
+ DebugPlugin.getDefault().asyncExec(runnable);
}
}
@@ -1102,18 +1100,6 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
fHotCodeReplaceListeners.remove(listener);
}
- protected void fork(final IWorkspaceRunnable wRunnable) {
- Runnable runnable= new Runnable() {
- public void run() {
- try {
- getWorkspace().run(wRunnable, null);
- } catch (CoreException ce) {
- JDIDebugPlugin.log(ce);
- }
- }
- };
- new Thread(runnable).start();
- }
/**
* @see ILaunchListener#launchRemoved(ILaunch)
*/

Back to the top