public static String virtual_evaluateMacro_1234975967990(SNode thisNode, String macroName) { if (macroName == null) { return ""; } if (macroName.equals(Layout_Behavior.getBasedirName_1226509010730())) { return IMacroHolder_Behavior.call_getPath_1234976932856(thisNode); } if (macroName.equals(Layout_Behavior.getMPSHomeName_1226508944077())) { return PathManager.getHomePath(); } if (macroName.equals(Layout_Behavior.getScriptsDirName_462257719548547202())) { return ""; } return PathMacros.getInstance().getValue(macroName); }
public static List<SNode> virtual_getMacro_1107726059764558743(SNode thisNode) { if (ListSequence.fromList(SLinkOperations.getTargets(thisNode, "macro", true)).isNotEmpty()) { return SLinkOperations.getTargets(thisNode, "macro", true); } List<String> allMacroNames = IMacroHolder_Behavior.call_getAllMacroNames_1234975567387(thisNode, true); List<SNode> result = new ArrayList<SNode>(); for (String macroName : ListSequence.fromList(allMacroNames)) { SNode macro = SConceptOperations.createNewNode("jetbrains.mps.build.packaging.structure.Macro", null); SPropertyOperations.set(macro, "name", macroName); SPropertyOperations.set( macro, "path", BehaviorReflection.invokeVirtual( String.class, thisNode, "virtual_evaluateMacro_1234975967990", new Object[] {macroName}) .replace("\\", Util.SEPARATOR)); ListSequence.fromList(result).addElement(macro); } return result; }