Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2011-11-04 21:33:25 +0000
committerPawel Piech2011-11-04 21:33:25 +0000
commit366ebde49ed41a56e1684ea7be65cf58cafd72ed (patch)
tree501e83453c9b37b0307ae6e08c73c8d6b712d4d9 /org.eclipse.debug.core/core
parentdaec187720d2abcebdda62e9a271c6e226239877 (diff)
downloadeclipse.platform.debug-366ebde49ed41a56e1684ea7be65cf58cafd72ed.tar.gz
eclipse.platform.debug-366ebde49ed41a56e1684ea7be65cf58cafd72ed.tar.xz
eclipse.platform.debug-366ebde49ed41a56e1684ea7be65cf58cafd72ed.zip
Bug 345298 - [breakpoints] BreakpointManager deadlocks trying to restorev20111107-1153
breakpoints
Diffstat (limited to 'org.eclipse.debug.core/core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java19
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java7
2 files changed, 19 insertions, 7 deletions
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 3fd04ff38..6ea9afa3e 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
@@ -28,6 +28,7 @@ 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;
/**
@@ -41,17 +42,21 @@ import org.eclipse.debug.internal.core.DebugCoreMessages;
public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
- static {
- // making sure that the BreakpointManager is correctly initialized
- // before any breakpoint marker related operation (see bug 54993)
- DebugPlugin.getDefault().getBreakpointManager().getBreakpoints();
- }
-
/**
* Underlying marker.
*/
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 4d631c226..cb666a052 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
@@ -394,6 +394,13 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
}
/**
+ * Calls {@link #initializeBreakpoints()} if breakpoints have not yet been initialized.
+ */
+ public void ensureBreakpointsInitialized() {
+ getBreakpoints0();
+ }
+
+ /**
* The BreakpointManager waits to load the breakpoints
* of the workspace until a request is made to retrieve the
* breakpoints.

Back to the top