mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Ensure that all breakpoint creation and modification operations are running in the UI thread.
This commit is contained in:
parent
e680f152f8
commit
d655eed877
2 changed files with 75 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
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
|
2003-11-10 Mikhail Khodjaiants
|
||||||
Added synchronization to some of the 'CBreakpoint' methods.
|
Added synchronization to some of the 'CBreakpoint' methods.
|
||||||
* CBreakpoint.java
|
* CBreakpoint.java
|
||||||
|
|
|
@ -291,7 +291,25 @@ public class CBreakpointManager implements ICBreakpointManager, ICDIEventListene
|
||||||
return 0;
|
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
|
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 );
|
ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( breakpoint );
|
||||||
if ( cdiBreakpoint != null )
|
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 );
|
ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( breakpoint );
|
||||||
if ( cdiBreakpoint == null )
|
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 );
|
ICBreakpoint breakpoint = getBreakpointMap().getCBreakpoint( cdiBreakpoint );
|
||||||
if ( breakpoint != null )
|
if ( breakpoint != null )
|
||||||
|
|
Loading…
Add table
Reference in a new issue