org.eclipse.internal.xpand2.debug
Class ExpandSpecial

java.lang.Object
  extended by org.eclipse.internal.xtend.expression.debug.BaseSpecialTreatment
      extended by org.eclipse.internal.xpand2.debug.ExpandSpecial

public class ExpandSpecial
extends BaseSpecialTreatment

An ExpandStatement calls monitor.preTask() always twice in case of isForeach. The first call is for the Statement itself and the second for every execution of the included definition.
We remember each call on a Stack and use the first entry to store count and number of loops.
This (outer) frame is hiddened.

We do this whole mechanism (different from the Java behavior) that the user can go over one execution of the EXPAND with Step_Over and go over all loops with Step_Return. In Java this behavior is not possible. There is the Ctrl+R functionality, what is not implemented for our debug model.

We can't use an empty iterator as in Foreach, because an expand could be called iteratively.
Therefore we remember each 2nd time the statement together with it's target element count.

Author:
Clemens Kadura (zAJKa)

Constructor Summary
ExpandSpecial()
           
 
Method Summary
 String adaptElementName(ISyntaxElement se, ExecutionContext context)
           
 void adaptSyntaxElement(org.eclipse.emf.mwe.core.debug.model.SyntaxElement to, Object element)
           
 ISyntaxElement getSpecialEndSyntaxElement(ISyntaxElement se)
           
 boolean shallNotSuspend(Object element, int flag, ExecutionContext ctx)
           
 
Methods inherited from class org.eclipse.internal.xtend.expression.debug.BaseSpecialTreatment
getElementNameLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandSpecial

public ExpandSpecial()
Method Detail

shallNotSuspend

public boolean shallNotSuspend(Object element,
                               int flag,
                               ExecutionContext ctx)
Overrides:
shallNotSuspend in class BaseSpecialTreatment

adaptSyntaxElement

public void adaptSyntaxElement(org.eclipse.emf.mwe.core.debug.model.SyntaxElement to,
                               Object element)
Overrides:
adaptSyntaxElement in class BaseSpecialTreatment

adaptElementName

public String adaptElementName(ISyntaxElement se,
                               ExecutionContext context)
Overrides:
adaptElementName in class BaseSpecialTreatment

getSpecialEndSyntaxElement

public ISyntaxElement getSpecialEndSyntaxElement(ISyntaxElement se)
Overrides:
getSpecialEndSyntaxElement in class BaseSpecialTreatment


Copyright © 2015. All rights reserved.