package jetbrains.mps.build.startup.generator.template.main;
/*Generated by MPS */
import jetbrains.mps.generator.runtime.Generated;
import jetbrains.mps.generator.impl.query.QueryProviderBase;
import jetbrains.mps.generator.template.PropertyMacroContext;
import java.util.List;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.build.startup.behavior.MpsStartupScript__BehaviorDescriptor;
import jetbrains.mps.build.behavior.BuildString__BehaviorDescriptor;
import jetbrains.mps.generator.template.IfMacroContext;
import jetbrains.mps.internal.collections.runtime.Sequence;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodesContext;
import java.util.Map;
import jetbrains.mps.generator.impl.query.SourceNodesQuery;
import java.util.HashMap;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.generator.impl.query.QueryKey;
import jetbrains.mps.generator.impl.query.QueryKeyImpl;
import java.util.Collection;
import jetbrains.mps.generator.impl.GenerationFailureException;
import jetbrains.mps.util.IterableUtil;
import jetbrains.mps.generator.impl.query.PropertyValueQuery;
import org.jetbrains.mps.openapi.language.SProperty;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.generator.impl.query.IfMacroCondition;
@Generated
public class QueriesGenerated extends QueryProviderBase {
public QueriesGenerated() {
super(1);
}
public static Object propertyMacro_GetPropertyValue_8979762117546981953(final PropertyMacroContext _context) {
String pathString = "";
String prefix = "$APP_PACKAGE/Contents/";
List<SNode> classPathItemList = SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3437728L, "bootClasspath"));
for (SNode cpItem : ListSequence.fromList(classPathItemList).cut(1)) {
pathString += prefix + SPropertyOperations.getString(cpItem, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437509L, 0x35ebd6e5b343750aL, "path")).replace("\\", "/") + ":";
}
pathString += prefix + SPropertyOperations.getString(ListSequence.fromList(classPathItemList).last(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437509L, 0x35ebd6e5b343750aL, "path")).replace("\\", "/");
return pathString;
}
public static Object propertyMacro_GetPropertyValue_8979762117546982017(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3443492L, "startupClass"));
}
public static Object propertyMacro_GetPropertyValue_710674657030226653(final PropertyMacroContext _context) {
return (String) MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode());
}
public static Object propertyMacro_GetPropertyValue_8979762117546982114(final PropertyMacroContext _context) {
return MpsStartupScript__BehaviorDescriptor.getDefaultVmoptions_id54lRqzvuHDj.invoke(_context.getNode(), ((boolean) true)) + " " + _context.getTemplateValue();
}
public static Object propertyMacro_GetPropertyValue_8979762117546982098(final PropertyMacroContext _context) {
return _context.getTemplateValue() + "/" + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b343750bL, "startupFolder"));
}
public static Object propertyMacro_GetPropertyValue_4881006832912335167(final PropertyMacroContext _context) {
return String.format(":: %s startup script", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230b0L, "fullName")), null));
}
public static Object propertyMacro_GetPropertyValue_4881006832912615440(final PropertyMacroContext _context) {
return String.format(":: Try (in order): %s_JDK, idea%%BITS%%.exe.jdk, ..\\jre, JDK_HOME, JAVA_HOME.", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230afL, "shortName")), null));
}
public static Object propertyMacro_GetPropertyValue_4881006832912630347(final PropertyMacroContext _context) {
String productShortName = BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230afL, "shortName")), null);
return String.format("IF EXIST \"%%%s_JDK%%\" SET JDK=%%%s_JDK%%", productShortName, productShortName);
}
public static Object propertyMacro_GetPropertyValue_4881006832912503656(final PropertyMacroContext _context) {
return String.format("SET USER_JDK64_FILE=%%USERPROFILE%%\\.%s\\config\\idea%%BITS%%.exe.jdk", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_4881006832912525718(final PropertyMacroContext _context) {
return String.format("SET USER_JDK_FILE=%%USERPROFILE%%\\.%s\\config\\idea%%BITS%%.exe.jdk", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_4881006832912695015(final PropertyMacroContext _context) {
return String.format(" ECHO ERROR: cannot start %s.", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230b0L, "fullName")), null));
}
public static Object propertyMacro_GetPropertyValue_4881006832912695557(final PropertyMacroContext _context) {
return String.format(" ECHO No JDK found. Please validate either %s_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230afL, "shortName")), null));
}
public static Object propertyMacro_GetPropertyValue_4881006832912793493(final PropertyMacroContext _context) {
return String.format("SET USER_VM_OPTIONS_FILE=%%USERPROFILE%%\\.%s\\mps%%BITS%%.exe.vmoptions", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_1731640411964953768(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b343774cL, 0x35ebd6e5b343774dL, "options"));
}
public static Object propertyMacro_GetPropertyValue_2693344784285678760(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b343774cL, 0x35ebd6e5b343774dL, "options"));
}
public static Object propertyMacro_GetPropertyValue_8793115184017727022(final PropertyMacroContext _context) {
return _context.getTemplateValue() + MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode());
}
public static Object propertyMacro_GetPropertyValue_1731640411965070846(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3437728L, "bootClasspath"))).first(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437509L, 0x35ebd6e5b343750aL, "path")).replace("/", "\\");
}
public static Object propertyMacro_GetPropertyValue_1731640411965084740(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437509L, 0x35ebd6e5b343750aL, "path")).replace("/", "\\");
}
public static Object propertyMacro_GetPropertyValue_1731640411964942144(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3443492L, "startupClass"));
}
public static Object propertyMacro_GetPropertyValue_1731640411964801466(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + ".bat";
}
public static Object propertyMacro_GetPropertyValue_1731640411967557625(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + "." + MpsStartupScript__BehaviorDescriptor.getVmOptionsExtension_id54lRqzvvwXR.invoke(_context.getNode());
}
public static Object propertyMacro_GetPropertyValue_710674657033124928(final PropertyMacroContext _context) {
return String.format("# %s startup script", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230b0L, "fullName")), null));
}
public static Object propertyMacro_GetPropertyValue_710674657033171135(final PropertyMacroContext _context) {
return String.format(" TITLE=\"Cannot start %s\"", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230b0L, "fullName")), null));
}
public static Object propertyMacro_GetPropertyValue_710674657033222865(final PropertyMacroContext _context) {
return String.format("# Try (in order): %s_JDK, idea.jdk, ../jre, JDK_HOME, JAVA_HOME, \"java\" in PATH.", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230afL, "shortName")), null));
}
public static Object propertyMacro_GetPropertyValue_710674657033246563(final PropertyMacroContext _context) {
return String.format("if [ -n \"$%s_JDK\" -a -x \"$MPS_JDK/bin/java\" ]; then", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230afL, "shortName")), null));
}
public static Object propertyMacro_GetPropertyValue_710674657033294129(final PropertyMacroContext _context) {
return String.format("elif [ -s \"$HOME/.%s/config/idea.jdk\" ]; then", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_710674657033296113(final PropertyMacroContext _context) {
return String.format(" JDK=`\"$CAT\" $HOME/.%s/config/idea.jdk`", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_710674657033343318(final PropertyMacroContext _context) {
return String.format(" message \"No JDK found. Please validate either %s_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.\"", BuildString__BehaviorDescriptor.getText_id3NagsOfTioI.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x30a61e6d55f6abc9L, "branding")), MetaAdapterFactory.getContainmentLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x6b9a2011083b778dL, 0x54c4eb89feb230afL, "shortName")), null));
}
public static Object propertyMacro_GetPropertyValue_710674657039779461(final PropertyMacroContext _context) {
return String.format("elif [ -r \"$HOME/.%s/mps$BITS.vmoptions\" ]; then", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_710674657033496536(final PropertyMacroContext _context) {
return String.format(" VM_OPTIONS_FILE=\"$HOME/.%s/mps$BITS.vmoptions\"", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_710674657033560476(final PropertyMacroContext _context) {
return String.format(" AGENT=\"-agentlib:$AGENT_LIB=disablealloc,delay=10000,sessionname=%s\"", MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_4487788881657806288(final PropertyMacroContext _context) {
return _context.getTemplateValue() + "\"" + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b343774cL, 0x35ebd6e5b343774dL, "options")) + "\"";
}
public static Object propertyMacro_GetPropertyValue_2693344784290685784(final PropertyMacroContext _context) {
return _context.getTemplateValue() + "\"" + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b343774cL, 0x35ebd6e5b343774dL, "options")) + "\"";
}
public static Object propertyMacro_GetPropertyValue_4487788881657840185(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437509L, 0x35ebd6e5b343750aL, "path")) + "\"";
}
public static Object propertyMacro_GetPropertyValue_4487788881657707878(final PropertyMacroContext _context) {
return _context.getTemplateValue() + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3443492L, "startupClass"));
}
public static Object propertyMacro_GetPropertyValue_8793115184017538269(final PropertyMacroContext _context) {
return _context.getTemplateValue() + MpsStartupScript__BehaviorDescriptor.getIdeaPathSelector_idBsOHnja5fe.invoke(_context.getNode());
}
public static Object propertyMacro_GetPropertyValue_2693344784288480128(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + "64." + MpsStartupScript__BehaviorDescriptor.getVmOptionsExtension_id54lRqzvvwXR.invoke(_context.getNode());
}
public static boolean ifMacro_Condition_2693344784290772025(final IfMacroContext _context) {
return Sequence.fromIterable(MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) false))).isNotEmpty();
}
public static boolean ifMacro_Condition_2693344784290780697(final IfMacroContext _context) {
return Sequence.fromIterable(MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) true))).isNotEmpty();
}
public static boolean ifMacro_Condition_2693344784290713699(final IfMacroContext _context) {
return Sequence.fromIterable(MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) false))).isNotEmpty();
}
public static boolean ifMacro_Condition_2693344784290724066(final IfMacroContext _context) {
return Sequence.fromIterable(MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) true))).isNotEmpty();
}
public static Iterable<SNode> sourceNodesQuery_1731640411964947374(final SourceSubstituteMacroNodesContext _context) {
return (Iterable<SNode>) MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) false));
}
public static Iterable<SNode> sourceNodesQuery_2693344784285678752(final SourceSubstituteMacroNodesContext _context) {
return (Iterable<SNode>) MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) true));
}
public static Iterable<SNode> sourceNodesQuery_1731640411965079018(final SourceSubstituteMacroNodesContext _context) {
return ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3437728L, "bootClasspath"))).skip(1);
}
public static Iterable<SNode> sourceNodesQuery_1731640411967575305(final SourceSubstituteMacroNodesContext _context) {
return (Iterable<SNode>) MpsStartupScript__BehaviorDescriptor.getDefaultVmOptionsLines_id2lwFGYOXBOk.invoke(_context.getNode(), ((boolean) false));
}
public static Iterable<SNode> sourceNodesQuery_4487788881657789666(final SourceSubstituteMacroNodesContext _context) {
return (Iterable<SNode>) MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) false));
}
public static Iterable<SNode> sourceNodesQuery_2693344784290685776(final SourceSubstituteMacroNodesContext _context) {
return (Iterable<SNode>) MpsStartupScript__BehaviorDescriptor.getCommentedOptions_id54lRqzvvwVL.invoke(_context.getNode(), ((boolean) true));
}
public static Iterable<SNode> sourceNodesQuery_4487788881657835967(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x35ebd6e5b3437508L, 0x35ebd6e5b3437728L, "bootClasspath"));
}
public static Iterable<SNode> sourceNodesQuery_2693344784288504085(final SourceSubstituteMacroNodesContext _context) {
return (Iterable<SNode>) MpsStartupScript__BehaviorDescriptor.getDefaultVmOptionsLines_id2lwFGYOXBOk.invoke(_context.getNode(), ((boolean) true));
}
private final Map<String, SourceNodesQuery> snsqMethods = new HashMap<String, SourceNodesQuery>();
{
int i = 0;
snsqMethods.put("1731640411964947374", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("2693344784285678752", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("1731640411965079018", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("1731640411967575305", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("4487788881657789666", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("2693344784290685776", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("4487788881657835967", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("2693344784288504085", new QueriesGenerated.SNsQ(i++));
}
@NotNull
@Override
public SourceNodesQuery getSourceNodesQuery(@NotNull QueryKey identity) {
final String id = ((QueryKeyImpl) identity).getQueryNodeId().toString();
if (!(snsqMethods.containsKey(id))) {
return super.getSourceNodesQuery(identity);
}
return snsqMethods.get(id);
}
private static class SNsQ implements SourceNodesQuery {
private final int methodKey;
public SNsQ(int methodKey) {
this.methodKey = methodKey;
}
@NotNull
public Collection<SNode> evaluate(@NotNull SourceSubstituteMacroNodesContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1731640411964947374(ctx));
case 1:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_2693344784285678752(ctx));
case 2:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1731640411965079018(ctx));
case 3:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1731640411967575305(ctx));
case 4:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4487788881657789666(ctx));
case 5:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_2693344784290685776(ctx));
case 6:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4487788881657835967(ctx));
case 7:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_2693344784288504085(ctx));
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, PropertyValueQuery> pvqMethods = new HashMap<String, PropertyValueQuery>();
{
int i = 0;
pvqMethods.put("8979762117546981952", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0x479c7a8c02f943b5L, 0x9139d910cb22f298L, 0x16838b3fce9aa513L, 0x16838b3fce9aaa68L, "value"), "$APP_PACKAGE/Contents/classpathitem:"));
pvqMethods.put("8979762117546982014", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0x479c7a8c02f943b5L, 0x9139d910cb22f298L, 0x16838b3fce9aa513L, 0x16838b3fce9aaa68L, "value"), "class"));
pvqMethods.put("710674657030226652", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0x479c7a8c02f943b5L, 0x9139d910cb22f298L, 0x16838b3fce9aa513L, 0x16838b3fce9aaa68L, "value"), "MPS"));
pvqMethods.put("8979762117546982113", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0x479c7a8c02f943b5L, 0x9139d910cb22f298L, 0x16838b3fce9aa513L, 0x16838b3fce9aaa68L, "value"), "-XX:+UseCompressedOops -Xbootclasspath/a:../lib/boot.jar"));
pvqMethods.put("8979762117546982097", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0x479c7a8c02f943b5L, 0x9139d910cb22f298L, 0x16838b3fce9aa513L, 0x16838b3fce9aaa68L, "value"), "$APP_PACKAGE/Contents"));
pvqMethods.put("4881006832912335166", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), ":: JetBrains MPS startup script"));
pvqMethods.put("4881006832912615439", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), ":: Try (in order): MPS_JDK, idea%BITS%.exe.jdk, ..\\jre, JDK_HOME, JAVA_HOME."));
pvqMethods.put("4881006832912630346", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "IF EXIST \"%MPS_JDK%\" SET JDK=%MPS_JDK%"));
pvqMethods.put("4881006832912503655", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "SET USER_JDK64_FILE=%USERPROFILE%\\.MPS20xx.x\\config\\idea%BITS%.exe.jdk"));
pvqMethods.put("4881006832912525717", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "SET USER_JDK_FILE=%USERPROFILE%\\.MPS20xx.x\\config\\idea%BITS%.exe.jdk"));
pvqMethods.put("4881006832912695014", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " ECHO ERROR: cannot start IntelliJ IDEA."));
pvqMethods.put("4881006832912695556", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " ECHO No JDK found. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation."));
pvqMethods.put("4881006832912793492", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "SET USER_VM_OPTIONS_FILE=%USERPROFILE%\\.MPS20xx.x\\mps%BITS%.exe.vmoptions"));
pvqMethods.put("1731640411964953765", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "::set ADDITIONAL_JVM_ARGS="));
pvqMethods.put("2693344784285678759", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "::set ADDITIONAL_JVM_ARGS="));
pvqMethods.put("8793115184017727021", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "set IDEA_PATHS_SELECTOR="));
pvqMethods.put("1731640411965070845", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "set CLASS_PATH=%IDE_HOME%\\"));
pvqMethods.put("1731640411965084739", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "set CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\\"));
pvqMethods.put("1731640411964942141", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "set MAIN_CLASS="));
pvqMethods.put("1731640411964801463", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "mps.bat"));
pvqMethods.put("1731640411967557624", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "mps.vmoptions"));
pvqMethods.put("710674657033124927", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "# JetBrains MPS startup script"));
pvqMethods.put("710674657033171134", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " TITLE=\"Cannot start JetBrains MPS\""));
pvqMethods.put("710674657033222864", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "# Try (in order): MPS_JDK, idea.jdk, ../jre, JDK_HOME, JAVA_HOME, \"java\" in PATH."));
pvqMethods.put("710674657033246562", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "if [ -n \"$MPS_JDK\" -a -x \"$MPS_JDK/bin/java\" ]; then"));
pvqMethods.put("710674657033294128", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "elif [ -s \"$HOME/.MPS20xx.x/config/idea.jdk\" ]; then"));
pvqMethods.put("710674657033296112", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " JDK=`\"$CAT\" $HOME/.MPS20xx.x/config/idea.jdk`"));
pvqMethods.put("710674657033343317", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " message \"No JDK found. Please validate either MPS_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.\""));
pvqMethods.put("710674657039779460", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "elif [ -r \"$HOME/.MPS20xx.x/mps$BITS.vmoptions\" ]; then"));
pvqMethods.put("710674657033496535", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " VM_OPTIONS_FILE=\"$HOME/.MPS20xx.x/mps$BITS.vmoptions\""));
pvqMethods.put("710674657033560475", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), " AGENT=\"-agentlib:$AGENT_LIB=disablealloc,delay=10000,sessionname=MPS20xx.x\""));
pvqMethods.put("4487788881657806287", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "# ADDITIONAL_JVM_ARGS="));
pvqMethods.put("2693344784290685783", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "# ADDITIONAL_JVM_ARGS="));
pvqMethods.put("4487788881657840184", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "CLASSPATH=\"$CLASSPATH:$IDE_HOME/"));
pvqMethods.put("4487788881657707877", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "MAIN_CLASS="));
pvqMethods.put("8793115184017538268", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xd5033ceef63244b6L, 0xb30889d4fbde34ffL, 0x180805c7b1d668a2L, 0x180805c7b1df77d9L, "text"), "IDEA_PATHS_SELECTOR="));
pvqMethods.put("2693344784288480127", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "mps64.vmoptions"));
}
@NotNull
@Override
public PropertyValueQuery getPropertyValueQuery(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(pvqMethods.containsKey(id))) {
return super.getPropertyValueQuery(identity);
}
return pvqMethods.get(id);
}
private static class PVQ extends PropertyValueQuery.Base {
private final int methodKey;
/*package*/ PVQ(int methodKey, SProperty property, String templateValue) {
super(property, templateValue);
this.methodKey = methodKey;
}
@Nullable
public Object evaluate(@NotNull PropertyMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.propertyMacro_GetPropertyValue_8979762117546981953(ctx);
case 1:
return QueriesGenerated.propertyMacro_GetPropertyValue_8979762117546982017(ctx);
case 2:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657030226653(ctx);
case 3:
return QueriesGenerated.propertyMacro_GetPropertyValue_8979762117546982114(ctx);
case 4:
return QueriesGenerated.propertyMacro_GetPropertyValue_8979762117546982098(ctx);
case 5:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912335167(ctx);
case 6:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912615440(ctx);
case 7:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912630347(ctx);
case 8:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912503656(ctx);
case 9:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912525718(ctx);
case 10:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912695015(ctx);
case 11:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912695557(ctx);
case 12:
return QueriesGenerated.propertyMacro_GetPropertyValue_4881006832912793493(ctx);
case 13:
return QueriesGenerated.propertyMacro_GetPropertyValue_1731640411964953768(ctx);
case 14:
return QueriesGenerated.propertyMacro_GetPropertyValue_2693344784285678760(ctx);
case 15:
return QueriesGenerated.propertyMacro_GetPropertyValue_8793115184017727022(ctx);
case 16:
return QueriesGenerated.propertyMacro_GetPropertyValue_1731640411965070846(ctx);
case 17:
return QueriesGenerated.propertyMacro_GetPropertyValue_1731640411965084740(ctx);
case 18:
return QueriesGenerated.propertyMacro_GetPropertyValue_1731640411964942144(ctx);
case 19:
return QueriesGenerated.propertyMacro_GetPropertyValue_1731640411964801466(ctx);
case 20:
return QueriesGenerated.propertyMacro_GetPropertyValue_1731640411967557625(ctx);
case 21:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033124928(ctx);
case 22:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033171135(ctx);
case 23:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033222865(ctx);
case 24:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033246563(ctx);
case 25:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033294129(ctx);
case 26:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033296113(ctx);
case 27:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033343318(ctx);
case 28:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657039779461(ctx);
case 29:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033496536(ctx);
case 30:
return QueriesGenerated.propertyMacro_GetPropertyValue_710674657033560476(ctx);
case 31:
return QueriesGenerated.propertyMacro_GetPropertyValue_4487788881657806288(ctx);
case 32:
return QueriesGenerated.propertyMacro_GetPropertyValue_2693344784290685784(ctx);
case 33:
return QueriesGenerated.propertyMacro_GetPropertyValue_4487788881657840185(ctx);
case 34:
return QueriesGenerated.propertyMacro_GetPropertyValue_4487788881657707878(ctx);
case 35:
return QueriesGenerated.propertyMacro_GetPropertyValue_8793115184017538269(ctx);
case 36:
return QueriesGenerated.propertyMacro_GetPropertyValue_2693344784288480128(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, IfMacroCondition> imcMethods = new HashMap<String, IfMacroCondition>();
{
int i = 0;
imcMethods.put("2693344784290772023", new QueriesGenerated.IfMC(i++));
imcMethods.put("2693344784290780695", new QueriesGenerated.IfMC(i++));
imcMethods.put("2693344784290713697", new QueriesGenerated.IfMC(i++));
imcMethods.put("2693344784290724064", new QueriesGenerated.IfMC(i++));
}
@NotNull
@Override
public IfMacroCondition getIfMacroCondition(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(imcMethods.containsKey(id))) {
return super.getIfMacroCondition(identity);
}
return imcMethods.get(id);
}
private static class IfMC implements IfMacroCondition {
private final int methodKey;
public IfMC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(@NotNull IfMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.ifMacro_Condition_2693344784290772025(ctx);
case 1:
return QueriesGenerated.ifMacro_Condition_2693344784290780697(ctx);
case 2:
return QueriesGenerated.ifMacro_Condition_2693344784290713699(ctx);
case 3:
return QueriesGenerated.ifMacro_Condition_2693344784290724066(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for if macro %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
}