mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[243910] [Traditional Rendering] DebugEvent processing inflexible
This commit is contained in:
parent
1bb7c8e3b6
commit
800c9730a2
1 changed files with 31 additions and 33 deletions
|
@ -521,6 +521,9 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
if(this.isDisposed())
|
||||
return;
|
||||
|
||||
boolean isChangeOnly = false;
|
||||
boolean isSuspend = false;
|
||||
|
||||
for(int i = 0; i < events.length; i++)
|
||||
{
|
||||
if(events[0].getSource() instanceof IDebugElement)
|
||||
|
@ -530,46 +533,44 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
final IDebugElement source = (IDebugElement) events[i]
|
||||
.getSource();
|
||||
|
||||
// TODO allow extensible customization of event handling;
|
||||
// integration with user configurable update policies should happen here.
|
||||
if(source.getDebugTarget() == getMemoryBlock()
|
||||
.getDebugTarget())
|
||||
{
|
||||
if(kind == DebugEvent.SUSPEND)
|
||||
{
|
||||
handleSuspendEvent(detail);
|
||||
isSuspend = true;
|
||||
}
|
||||
else if(kind == DebugEvent.CHANGE)
|
||||
{
|
||||
handleChangeEvent();
|
||||
isChangeOnly = true;
|
||||
}
|
||||
// else if(kind == DebugEvent.RESUME)
|
||||
// {
|
||||
// handleResumeEvent();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isSuspend)
|
||||
handleSuspend();
|
||||
else if(isChangeOnly)
|
||||
handleChange();
|
||||
}
|
||||
|
||||
protected void handleSuspendEvent(int detail)
|
||||
protected void handleSuspend()
|
||||
{
|
||||
if(detail == 0)
|
||||
{
|
||||
Display.getDefault().asyncExec(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
archiveDeltas();
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
Display.getDefault().asyncExec(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
archiveDeltas();
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void handleChangeEvent()
|
||||
protected void handleChange()
|
||||
{
|
||||
Display.getDefault().asyncExec(new Runnable()
|
||||
Display.getDefault().asyncExec(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
|
@ -578,15 +579,12 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
});
|
||||
}
|
||||
|
||||
protected void handleResumeEvent()
|
||||
protected void handleSuspendEvent(int detail)
|
||||
{
|
||||
}
|
||||
|
||||
protected void handleChangeEvent()
|
||||
{
|
||||
Display.getDefault().asyncExec(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
// archiveDeltas();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// return true to enable development debug print statements
|
||||
|
|
Loading…
Add table
Reference in a new issue