1
0
Fork 0
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:
Ted Williams 2008-08-12 17:05:27 +00:00
parent 1bb7c8e3b6
commit 800c9730a2

View file

@ -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,31 +533,30 @@ 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();
}
// else if(kind == DebugEvent.RESUME)
// {
// handleResumeEvent();
// }
isChangeOnly = true;
}
}
}
}
protected void handleSuspendEvent(int detail)
{
if(detail == 0)
if(isSuspend)
handleSuspend();
else if(isChangeOnly)
handleChange();
}
protected void handleSuspend()
{
Display.getDefault().asyncExec(new Runnable()
{
@ -565,9 +567,8 @@ public class Rendering extends Composite implements IDebugEventSetListener
}
});
}
}
protected void handleChangeEvent()
protected void handleChange()
{
Display.getDefault().asyncExec(new Runnable()
{
@ -578,15 +579,12 @@ public class Rendering extends Composite implements IDebugEventSetListener
});
}
protected void handleResumeEvent()
protected void handleSuspendEvent(int detail)
{
Display.getDefault().asyncExec(new Runnable()
{
public void run()
{
// archiveDeltas();
}
});
protected void handleChangeEvent()
{
}
// return true to enable development debug print statements