Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2003-11-10 23:15:04 +0000
committerMikhail Khodjaiants2003-11-10 23:15:04 +0000
commitd655eed87759e0592026e472dbb3b10b59e93746 (patch)
tree9d9e565e32b19568917537caeb7caf6139c56085
parente680f152f84532f269dce511dcbdf5bcb6c342ed (diff)
downloadorg.eclipse.cdt-d655eed87759e0592026e472dbb3b10b59e93746.tar.gz
org.eclipse.cdt-d655eed87759e0592026e472dbb3b10b59e93746.tar.xz
org.eclipse.cdt-d655eed87759e0592026e472dbb3b10b59e93746.zip
Ensure that all breakpoint creation and modification operations are running in the UI thread.
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java75
2 files changed, 75 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index a0b0a56db8..0b70704c4f 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,4 +1,8 @@
2003-11-10 Mikhail Khodjaiants
+ Ensure that all breakpoint creation and modification operations are running in the UI thread.
+ * CBreakpointManager.java
+
+2003-11-10 Mikhail Khodjaiants
Added synchronization to some of the 'CBreakpoint' methods.
* CBreakpoint.java
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
index 3885dc9fff..8a2a280171 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
@@ -291,7 +291,25 @@ public class CBreakpointManager implements ICBreakpointManager, ICDIEventListene
return 0;
}
- public void setBreakpoint( ICBreakpoint breakpoint ) throws DebugException
+ public void setBreakpoint( final ICBreakpoint breakpoint ) throws DebugException
+ {
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ doSetBreakpoint( breakpoint );
+ }
+ catch( DebugException e )
+ {
+ }
+ }
+ };
+ CDebugCorePlugin.getDefault().asyncExec( runnable );
+ }
+
+ protected void doSetBreakpoint( ICBreakpoint breakpoint ) throws DebugException
{
try
{
@@ -327,7 +345,25 @@ public class CBreakpointManager implements ICBreakpointManager, ICDIEventListene
}
}
- public void removeBreakpoint( ICBreakpoint breakpoint ) throws DebugException
+ public void removeBreakpoint( final ICBreakpoint breakpoint ) throws DebugException
+ {
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ doRemoveBreakpoint( breakpoint );
+ }
+ catch( DebugException e )
+ {
+ }
+ }
+ };
+ CDebugCorePlugin.getDefault().asyncExec( runnable );
+ }
+
+ protected void doRemoveBreakpoint( ICBreakpoint breakpoint ) throws DebugException
{
ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( breakpoint );
if ( cdiBreakpoint != null )
@@ -344,7 +380,25 @@ public class CBreakpointManager implements ICBreakpointManager, ICDIEventListene
}
}
- public void changeBreakpointProperties( ICBreakpoint breakpoint, IMarkerDelta delta ) throws DebugException
+ public void changeBreakpointProperties( final ICBreakpoint breakpoint, final IMarkerDelta delta ) throws DebugException
+ {
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ doChangeBreakpointProperties( breakpoint, delta );
+ }
+ catch( DebugException e )
+ {
+ }
+ }
+ };
+ CDebugCorePlugin.getDefault().asyncExec( runnable );
+ }
+
+ protected void doChangeBreakpointProperties( ICBreakpoint breakpoint, IMarkerDelta delta ) throws DebugException
{
ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( breakpoint );
if ( cdiBreakpoint == null )
@@ -481,7 +535,20 @@ public class CBreakpointManager implements ICBreakpointManager, ICDIEventListene
}
}
- private void handleBreakpointDestroyedEvent( ICDIBreakpoint cdiBreakpoint )
+ private void handleBreakpointDestroyedEvent( final ICDIBreakpoint cdiBreakpoint )
+ {
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ doHandleBreakpointDestroyedEvent( cdiBreakpoint );
+ }
+
+ };
+ CDebugCorePlugin.getDefault().asyncExec( runnable );
+ }
+
+ protected void doHandleBreakpointDestroyedEvent( ICDIBreakpoint cdiBreakpoint )
{
ICBreakpoint breakpoint = getBreakpointMap().getCBreakpoint( cdiBreakpoint );
if ( breakpoint != null )

Back to the top