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())
|
if(this.isDisposed())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
boolean isChangeOnly = false;
|
||||||
|
boolean isSuspend = false;
|
||||||
|
|
||||||
for(int i = 0; i < events.length; i++)
|
for(int i = 0; i < events.length; i++)
|
||||||
{
|
{
|
||||||
if(events[0].getSource() instanceof IDebugElement)
|
if(events[0].getSource() instanceof IDebugElement)
|
||||||
|
@ -530,31 +533,30 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
||||||
final IDebugElement source = (IDebugElement) events[i]
|
final IDebugElement source = (IDebugElement) events[i]
|
||||||
.getSource();
|
.getSource();
|
||||||
|
|
||||||
// TODO allow extensible customization of event handling;
|
|
||||||
// integration with user configurable update policies should happen here.
|
|
||||||
if(source.getDebugTarget() == getMemoryBlock()
|
if(source.getDebugTarget() == getMemoryBlock()
|
||||||
.getDebugTarget())
|
.getDebugTarget())
|
||||||
{
|
{
|
||||||
if(kind == DebugEvent.SUSPEND)
|
if(kind == DebugEvent.SUSPEND)
|
||||||
{
|
{
|
||||||
handleSuspendEvent(detail);
|
handleSuspendEvent(detail);
|
||||||
|
isSuspend = true;
|
||||||
}
|
}
|
||||||
else if(kind == DebugEvent.CHANGE)
|
else if(kind == DebugEvent.CHANGE)
|
||||||
{
|
{
|
||||||
handleChangeEvent();
|
handleChangeEvent();
|
||||||
}
|
isChangeOnly = true;
|
||||||
// else if(kind == DebugEvent.RESUME)
|
|
||||||
// {
|
|
||||||
// handleResumeEvent();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleSuspendEvent(int detail)
|
if(isSuspend)
|
||||||
{
|
handleSuspend();
|
||||||
if(detail == 0)
|
else if(isChangeOnly)
|
||||||
|
handleChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void handleSuspend()
|
||||||
{
|
{
|
||||||
Display.getDefault().asyncExec(new Runnable()
|
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()
|
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
|
// return true to enable development debug print statements
|
||||||
|
|
Loading…
Add table
Reference in a new issue