Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-03-28 12:12:55 +0000
committerDani Megert2012-03-28 12:12:55 +0000
commit39879be5bb7e3ebddfb01707d5e7f7cad585528c (patch)
treead8bdcd66193534fda8a4a4b66bf1e147c4fb4d0
parentc6b8a1be3629a7c02a82f9b4bb7ccea6c8bca394 (diff)
downloadeclipse.platform.debug-39879be5bb7e3ebddfb01707d5e7f7cad585528c.tar.gz
eclipse.platform.debug-39879be5bb7e3ebddfb01707d5e7f7cad585528c.tar.xz
eclipse.platform.debug-39879be5bb7e3ebddfb01707d5e7f7cad585528c.zip
Backported fix for bug 371687: Deadlocks on workspace startupv20121121_r373R3_7_maintenance
-rw-r--r--org.eclipse.debug.core/META-INF/MANIFEST.MF2
-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.java16
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java22
4 files changed, 31 insertions, 13 deletions
diff --git a/org.eclipse.debug.core/META-INF/MANIFEST.MF b/org.eclipse.debug.core/META-INF/MANIFEST.MF
index 8d8545d2a..5956c5689 100644
--- a/org.eclipse.debug.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true
-Bundle-Version: 3.7.1.qualifier
+Bundle-Version: 3.7.2.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.debug.core.DebugPlugin
Bundle-Vendor: %providerName
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 e3f9f5f8a..576f4de8d 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -678,8 +678,6 @@ public class DebugPlugin extends Plugin {
manager.registerAdapters(actionFactory, ILaunch.class);
manager.registerAdapters(actionFactory, IProcess.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 5483ba28b..442a331cb 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, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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,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;
/**
@@ -40,7 +41,17 @@ import org.eclipse.debug.internal.core.DebugCoreMessages;
*/
public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
-
+
+ /**
+ * Creates a breakpoint.
+ *
+ * @since 3.8
+ */
+ public Breakpoint() {
+ // Make sure that the breakpoint manager is initialized (for details see bug 54993)
+ ((BreakpointManager)DebugPlugin.getDefault().getBreakpointManager()).ensureInitialized();
+ }
+
/**
* Underlying marker.
*/
@@ -51,6 +62,7 @@ public abstract class Breakpoint extends PlatformObject implements IBreakpoint {
*/
public void setMarker(IMarker marker) throws CoreException {
fMarker= marker;
+
}
/**
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 15c9de1c1..72e14587e 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -57,8 +57,13 @@ import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.core.model.IBreakpointImportParticipant;
/**
- * The breakpoint manager manages all registered breakpoints
- * for the debug plug-in. It is instantiated by the debug plug-in at startup.
+ * The breakpoint manager manages all registered breakpoints for the Debug plug-in. It is
+ * instantiated by the Debug plug-in at startup.
+ * <p>
+ * <strong>Note:</strong> This manager is created while the Debug plug-in is started, but it
+ * will not automatically be initialized. Client code that expects markers and breakpoints to be
+ * initialized must call {@link #ensureInitialized()}.
+ * </p>
*
* @see IBreakpointManager
*/
@@ -398,13 +403,16 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
}
/**
- * Perform any initialization of the manager.
- *
- * Called when {@link DebugPlugin#start(org.osgi.framework.BundleContext)} is called.
+ * Ensures that this manager is initialized.
+ * <p>
+ * This manager is created while the Debug plug-in is started, but it will not automatically
+ * be initialized. Client code that expects markers and breakpoints to be initialized must call
+ * this method.
+ * </p>
*
* @since 3.8
*/
- public void start() {
+ public void ensureInitialized() {
getBreakpoints0();
}

Back to the top