Search in sources :

Example 1 with NoSourcePosition

use of spoon.reflect.cu.position.NoSourcePosition in project spoon by INRIA.

the class VariableReferencesTest method getPosition.

private SourcePosition getPosition(CtElement e) {
    SourcePosition sp = e.getPosition();
    while (sp instanceof NoSourcePosition) {
        e = e.getParent();
        if (e == null) {
            break;
        }
        sp = e.getPosition();
    }
    return sp;
}
Also used : SourcePosition(spoon.reflect.cu.SourcePosition) NoSourcePosition(spoon.reflect.cu.position.NoSourcePosition) NoSourcePosition(spoon.reflect.cu.position.NoSourcePosition)

Aggregations

SourcePosition (spoon.reflect.cu.SourcePosition)1 NoSourcePosition (spoon.reflect.cu.position.NoSourcePosition)1