Пример #1
0
 public void handleMessage(org.sintef.thingml.resource.thingml.debug.ThingmlDebugMessage message) {
   if (message.hasType(
       org.sintef.thingml.resource.thingml.debug.EThingmlDebugMessageTypes.STARTED)) {
     fireCreationEvent();
   } else if (message.hasType(
       org.sintef.thingml.resource.thingml.debug.EThingmlDebugMessageTypes.RESUMED)) {
     suspended = false;
     fireResumeEvent(0);
   } else if (message.hasType(
       org.sintef.thingml.resource.thingml.debug.EThingmlDebugMessageTypes.SUSPENDED)) {
     suspended = true;
     fireSuspendEvent(org.eclipse.debug.core.DebugEvent.BREAKPOINT);
   } else if (message.hasType(
       org.sintef.thingml.resource.thingml.debug.EThingmlDebugMessageTypes.TERMINATED)) {
     // ignore this event
   } else {
     System.out.println(
         "ERROR " + this.getClass().getName() + ".handleMessage(" + message + ") unknown event");
   }
 }
Пример #2
0
 public org.eclipse.debug.core.model.IStackFrame[] getStackFrames()
     throws org.eclipse.debug.core.DebugException {
   if (isSuspended()) {
     org.sintef.thingml.resource.thingml.debug.ThingmlDebugMessage stack =
         this.debugTarget.getDebugProxy().getStack();
     String framesData = stack.getArgument(0);
     if (framesData != null && !"".equals(framesData)) {
       java.util.List<String> frames =
           org.sintef.thingml.resource.thingml.util.ThingmlStringUtil.decode(framesData, '#');
       org.eclipse.debug.core.model.IStackFrame[] theFrames =
           new org.eclipse.debug.core.model.IStackFrame[frames.size()];
       for (int i = 0; i < frames.size(); i++) {
         String data = frames.get(i);
         theFrames[frames.size() - i - 1] =
             new org.sintef.thingml.resource.thingml.debug.ThingmlStackFrame(getTarget(), data);
       }
       return theFrames;
     }
   }
   return new org.eclipse.debug.core.model.IStackFrame[0];
 }