Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2011-11-15 19:34:42 +0000
committerMike Rennie2011-11-15 20:20:53 +0000
commit6b7c44e0ab75ab50af40ea63e30261e0c20b1b15 (patch)
tree672c823428147c91892a79bd608388ac7d49c33e /org.eclipse.debug.core
parent183d75523e8723fe50fae8e9a3301aef668dcce8 (diff)
downloadeclipse.platform.debug-6b7c44e0ab75ab50af40ea63e30261e0c20b1b15.tar.gz
eclipse.platform.debug-6b7c44e0ab75ab50af40ea63e30261e0c20b1b15.tar.xz
eclipse.platform.debug-6b7c44e0ab75ab50af40ea63e30261e0c20b1b15.zip
Bug 345298 - [breakpoints] BreakpointManager deadlocks trying to restorev20111115-2020
breakpoints
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java4
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java15
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java17
3 files changed, 19 insertions, 17 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
index e1f2e6448..792126d64 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
@@ -677,7 +677,9 @@ public class DebugPlugin extends Plugin {
manager.registerAdapters(actionFactory, ITerminate.class);
manager.registerAdapters(actionFactory, ILaunch.class);
manager.registerAdapters(actionFactory, IProcess.class);
- manager.registerAdapters(actionFactory, IDebugElement.class);
+ manager.registerAdapters(actionFactory, IDebugElement.class);
+ getBreakpointManager();
+ fBreakpointManager.start();
}
/**
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
index 6ea9afa3e..16bd2058e 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 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
@@ -28,12 +28,11 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.internal.core.BreakpointManager;
import org.eclipse.debug.internal.core.DebugCoreMessages;
/**
* Abstract implementation of a breakpoint. This class is
- * intended to be subclassed by implementations
+ * intended to be sub-classed by implementations
* of breakpoints.
*
* @see IBreakpoint
@@ -47,16 +46,6 @@ public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
*/
private IMarker fMarker= null;
- /**
- * Default constructor used to ensure that breakpoint manager is initialized.
- */
- public Breakpoint() {
- // making sure that the BreakpointManager is correctly initialized
- // before any breakpoint marker related operation (see bug 54993)
- ((BreakpointManager)DebugPlugin.getDefault().getBreakpointManager()).ensureBreakpointsInitialized();
- }
-
-
/**
* @see IBreakpoint#setMarker(IMarker)
*/
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
index cb666a052..32552d3d2 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
@@ -341,6 +341,13 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
fImportParticipants = null;
fDefaultParticipant = null;
}
+ if(fBreakpoints != null) {
+ fBreakpoints.clear();
+ fBreakpoints = null;
+ }
+ if(fMarkersToBreakpoints != null) {
+ fMarkersToBreakpoints.clear();
+ }
}
/**
@@ -394,10 +401,14 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
}
/**
- * Calls {@link #initializeBreakpoints()} if breakpoints have not yet been initialized.
+ * Perform any initialization of the manager.
+ *
+ * Called when {@link DebugPlugin#start(org.osgi.framework.BundleContext)} is called.
+ *
+ * @since 3.8
*/
- public void ensureBreakpointsInitialized() {
- getBreakpoints0();
+ public void start() {
+ getBreakpoints0();
}
/**

Back to the top