Search in sources :

Example 11 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MliftValue£xthat£xselector£xlib.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.ImmAny, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MliftValue£xthat£xselector£xlib(Object _that, Object _selector, Object _lib) {
    ClassB lib = ensureExtractClassB(_lib);
    MethodSelector selector = MethodSelector.parse(ensureExtractStringU(_selector));
    //TODO: would go in loop for circular graphs?
    ExpCore val = Revertable.doRevert(_that);
    val = From.from(val, Path.outer(1));
    return LiftValue.liftValue(val, selector, lib);
}
Also used : ExpCore(ast.ExpCore) MethodSelector(ast.Ast.MethodSelector) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 12 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MrenameClass£xthat£xsrc£xdest.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MrenameClass£xthat£xsrc£xdest(Object _that, Object _src, Object _dest) {
    ClassB that = ensureExtractClassB(_that);
    List<Ast.C> src = PathAux.parseValidCs(ensureExtractStringU(_src));
    List<Ast.C> dest = PathAux.parseValidCs(ensureExtractStringU(_dest));
    //System.out.println("####################RENAMECLASS:"+src+"   "+dest);
    return Rename.renameClass(Resources.getP(), that, src, dest);
}
Also used : ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 13 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method Mcompose£xleft£xright.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object Mcompose£xleft£xright(Object _left, Object _right) {
    return Timer.record("Mcompose£xleft£xright", () -> {
        ClassB left = ensureExtractClassB(_left);
        ClassB right = ensureExtractClassB(_right);
        try {
            return _Sum.sum(Resources.getP(), left, right);
        } catch (ArrayIndexOutOfBoundsException exc) {
            exc.printStackTrace();
            throw exc;
        }
    });
}
Also used : ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 14 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MaddDocumentation£xthat£xpath£xdoc.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MaddDocumentation£xthat£xpath£xdoc(Object _that, Object _path, Object _doc) {
    ClassB that = ensureExtractClassB(_that);
    List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
    Doc doc = ensureExtractDoc(_doc);
    return AddDocumentation.addDocumentationOnNestedClass(Resources.getP(), that, path, doc);
}
Also used : Doc(ast.Ast.Doc) EncodingHelper.ensureExtractDoc(auxiliaryGrammar.EncodingHelper.ensureExtractDoc) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 15 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MhideMethod£xthat£xpath£xsrc.

//--------------------------
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MhideMethod£xthat£xpath£xsrc(Object _that, Object _path, Object _src) {
    ClassB that = ensureExtractClassB(_that);
    List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
    MethodSelector src = MethodSelector.parse(ensureExtractStringU(_src));
    MethodSelector dest = src.withUniqueNum(L42.freshPrivate());
    return Rename.renameMethod(Resources.getP(), that, path, src, dest);
}
Also used : MethodSelector(ast.Ast.MethodSelector) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Aggregations

ClassB (ast.ExpCore.ClassB)16 EncodingHelper.ensureExtractClassB (auxiliaryGrammar.EncodingHelper.ensureExtractClassB)16 ActionType (platformSpecific.fakeInternet.ActionType)16 MethodSelector (ast.Ast.MethodSelector)8 Doc (ast.Ast.Doc)2 EncodingHelper.ensureExtractDoc (auxiliaryGrammar.EncodingHelper.ensureExtractDoc)2 Path (ast.Ast.Path)1 ExpCore (ast.ExpCore)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1