package jetbrains.mps.lang.editor.menus.substitute.testLanguage.editor;
/*Generated by MPS */
import jetbrains.mps.nodeEditor.menus.substitute.SubstituteMenuBase;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jetbrains.mps.lang.editor.menus.MenuPart;
import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuItem;
import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuContext;
import java.util.ArrayList;
import jetbrains.mps.lang.editor.menus.GroupMenuPart;
import jetbrains.mps.util.Computable;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import java.util.Arrays;
import jetbrains.mps.lang.editor.menus.substitute.ConstraintsFilteringSubstituteMenuPartDecorator;
import jetbrains.mps.lang.editor.menus.substitute.SingleItemSubstituteMenuPart;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.lang.editor.menus.substitute.DefaultSubstituteMenuItem;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations;
import jetbrains.mps.smodel.runtime.IconResource;
import jetbrains.mps.smodel.runtime.IconResourceUtil;
import jetbrains.mps.lang.editor.menus.ParameterizedMenuPart;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import org.jetbrains.mps.openapi.module.SRepository;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.smodel.SNodePointer;
import jetbrains.mps.lang.editor.menus.substitute.WrapperSubstituteMenuPart;
import jetbrains.mps.editor.runtime.menus.SubstituteItemFacade;
import jetbrains.mps.lang.editor.menus.substitute.SubstituteMenuItemWrapper;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.editor.runtime.selection.SelectionUtil;
import jetbrains.mps.openapi.editor.selection.SelectionManager;
import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuLookup;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.lang.editor.menus.substitute.DefaultSubstituteMenuLookup;
import jetbrains.mps.smodel.language.LanguageRegistry;
import jetbrains.mps.lang.editor.menus.ConceptMenusPart;
import java.util.Collection;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.lang.editor.menus.substitute.SimpleConceptSubstituteMenuPart;
import jetbrains.mps.smodel.ConceptDescendantsCache;
import jetbrains.mps.lang.editor.menus.substitute.IncludeSubstituteMenuSubstituteMenuPart;
import jetbrains.mps.lang.editor.menus.substitute.NamedSubstituteMenuLookup;
public class TestSubstituteChild_SubstituteMenu extends SubstituteMenuBase {
@NotNull
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts(final SubstituteMenuContext _context) {
List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> result = new ArrayList<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>();
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_a());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_b());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_c());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_d());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_e());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_f());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_g());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_h());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_i());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_j());
result.add(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_k());
return result;
}
public class SMP_Group_ddv2zo_a extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
private boolean a;
@Override
protected void initialize(SubstituteMenuContext _context) {
super.initialize(_context);
a = new Computable<Boolean>() {
public Boolean compute() {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
return tmpVar;
}
}.compute();
}
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
return eq_ddv2zo_a0f0c1(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a6fb0bfL, "simpleAction"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_a.SMP_Action_ddv2zo_a0(), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild")));
}
private class SMP_Action_ddv2zo_a0 extends SingleItemSubstituteMenuPart {
@Nullable
@Override
protected SubstituteMenuItem createItem(SubstituteMenuContext _context) {
return new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_a.SMP_Action_ddv2zo_a0.Item(_context);
}
private class Item extends DefaultSubstituteMenuItem {
private final SubstituteMenuContext _context;
public Item(SubstituteMenuContext context) {
super(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"), context.getParentNode(), context.getCurrentTargetNode(), context.getEditorContext());
_context = context;
}
@Nullable
@Override
public SNode createNode(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
return SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"));
}
@Override
public boolean canExecute(@NotNull String pattern) {
return canExecute_internal(pattern, false);
}
@Override
public boolean canExecuteStrictly(@NotNull String pattern) {
return canExecute_internal(pattern, true);
}
public boolean canExecute_internal(@NotNull String pattern, boolean strictly) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
return !(strictly);
}
@Nullable
@Override
public String getDescriptionText(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
return "";
}
@Nullable
@Override
public IconResource getIcon(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
return IconResourceUtil.getIconResourceForConcept(MetaAdapterFactory.getConcept(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L, "jetbrains.mps.lang.structure.structure.ConceptDeclaration"));
}
@Nullable
@Override
public SNode getType(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
return null;
}
@Nullable
@Override
public String getMatchingText(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
return "simple";
}
@Override
public void select(@NotNull SNode createdNode, @NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && createdNode != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
}
}
}
}
public class SMP_Group_ddv2zo_b extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a2(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a6fb0c1L, "parameterizedQuery"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_b.SMP_Param_ddv2zo_a1(), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild")));
}
private class SMP_Param_ddv2zo_a1 extends ParameterizedMenuPart<String, SubstituteMenuItem, SubstituteMenuContext> {
@NotNull
@Override
protected List<SubstituteMenuItem> createItems(String parameter, SubstituteMenuContext context) {
return new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_b.SMP_Param_ddv2zo_a1.SMP_Action_ddv2zo_a0b(parameter).createItems(context);
}
@Nullable
@Override
protected Iterable<? extends String> getParameters(SubstituteMenuContext _context) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
return ListSequence.fromListAndArray(new ArrayList<String>(), "a", "b");
}
private class SMP_Action_ddv2zo_a0b extends SingleItemSubstituteMenuPart {
private final String myParameterObject;
public SMP_Action_ddv2zo_a0b(String parameterObject) {
myParameterObject = parameterObject;
}
@Nullable
@Override
protected SubstituteMenuItem createItem(SubstituteMenuContext _context) {
return new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_b.SMP_Param_ddv2zo_a1.SMP_Action_ddv2zo_a0b.Item(_context);
}
private class Item extends DefaultSubstituteMenuItem {
private final SubstituteMenuContext _context;
public Item(SubstituteMenuContext context) {
super(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"), context.getParentNode(), context.getCurrentTargetNode(), context.getEditorContext());
_context = context;
}
@Nullable
@Override
public SNode createNode(@NotNull String pattern) {
SNode node = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"));
SPropertyOperations.set(node, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), myParameterObject);
return node;
}
@Nullable
@Override
public String getDescriptionText(@NotNull String pattern) {
return "";
}
@Nullable
@Override
public IconResource getIcon(@NotNull String pattern) {
SRepository repository = _context.getEditorContext().getRepository();
return IconResourceUtil.getIconResourceForNode(SNodeOperations.cast(new SNodePointer("6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.util(JDK/)", "~ComparableTimSort").resolve(repository), MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL, "jetbrains.mps.lang.core.structure.BaseConcept")));
}
@Nullable
@Override
public String getMatchingText(@NotNull String pattern) {
return myParameterObject;
}
}
}
}
}
public class SMP_Group_ddv2zo_c extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a3(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a6fe2eaL, "wrapper"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_c.SMP_Wrap_ddv2zo_a2(), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild")));
}
private class SMP_Wrap_ddv2zo_a2 extends WrapperSubstituteMenuPart {
@NotNull
@Override
protected SubstituteMenuItem wrapItem(final SubstituteMenuItem item, final SubstituteMenuContext _context) {
final SubstituteItemFacade wrappedItem = new SubstituteItemFacade(item);
return new SubstituteMenuItemWrapper(item) {
private SNode myCreatedNode;
@Nullable
@Override
public SAbstractConcept getOutputConcept() {
return MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild");
}
@Nullable
@Override
public SNode createNode(@NotNull String pattern) {
SNode nodeToWrap = super.createNode(pattern);
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && nodeToWrap != null;
tmpVar = tmpVar && wrappedItem != null;
SNode node = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2a8L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChild1"));
SLinkOperations.setTarget(node, MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2a8L, 0x7ce1116e3a6ff2acL, "conceptToWrap"), nodeToWrap);
return node;
}
@Nullable
@Override
public String getMatchingText(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && wrappedItem != null;
return pattern;
}
@Nullable
@Override
public String getDescriptionText(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && wrappedItem != null;
return "wrap";
}
@Override
public boolean canExecute(@NotNull String pattern) {
return canExecute_internal(pattern, false);
}
@Override
public boolean canExecuteStrictly(@NotNull String pattern) {
return canExecute_internal(pattern, true);
}
public boolean canExecute_internal(@NotNull String pattern, boolean strictly) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && wrappedItem != null;
return true;
}
@Nullable
@Override
public IconResource getIcon(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && wrappedItem != null;
return null;
}
@Nullable
@Override
public SNode getType(@NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && wrappedItem != null;
return null;
}
@Override
public void select(@NotNull SNode createdNode, @NotNull String pattern) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
tmpVar = tmpVar && pattern != null;
tmpVar = tmpVar && wrappedItem != null;
SelectionUtil.selectCell(_context.getEditorContext(), createdNode, SelectionManager.FIRST_CELL);
}
};
}
@Nullable
@Override
protected SubstituteMenuLookup getLookup(SubstituteMenuContext _context) {
final EditorContext editorContext = _context.getEditorContext();
return new DefaultSubstituteMenuLookup(LanguageRegistry.getInstance(editorContext.getRepository()), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2aaL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteConceptToWrap"));
}
}
}
public class SMP_Group_ddv2zo_d extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a4(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a6fe2eeL, "conceptsMenu"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_d.SMP_Concepts_ddv2zo_a3(), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild")));
}
public class SMP_Concepts_ddv2zo_a3 extends ConceptMenusPart<SubstituteMenuItem, SubstituteMenuContext> {
protected Collection getConcepts(SubstituteMenuContext _context) {
boolean tmpVar = _context.getParentNode() != null;
tmpVar = tmpVar && _context.getCurrentTargetNode() != null;
tmpVar = tmpVar && _context.getLink() != null;
tmpVar = tmpVar && _context.getEditorContext() != null;
return ListSequence.fromListAndArray(new ArrayList<SConcept>(), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2a8L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChild1"), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2a9L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChild2"));
}
@Override
protected Collection<SubstituteMenuItem> createItemsForConcept(SubstituteMenuContext context, SAbstractConcept concept) {
return new SimpleConceptSubstituteMenuPart(concept).createItems(context);
}
}
}
public class SMP_Group_ddv2zo_e extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a5(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a6fe2f3L, "addConcept"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new SimpleConceptSubstituteMenuPart(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2a9L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChild2")), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2a9L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChild2")));
}
}
public class SMP_Group_ddv2zo_f extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a6(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a7057f1L, "subconcepts"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_f.SMP_Subconcepts_ddv2zo_a5());
}
public class SMP_Subconcepts_ddv2zo_a5 extends ConceptMenusPart<SubstituteMenuItem, SubstituteMenuContext> {
protected Collection getConcepts(final SubstituteMenuContext _context) {
return ConceptDescendantsCache.getInstance().getDirectDescendants(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"));
}
@Override
protected Collection<SubstituteMenuItem> createItemsForConcept(SubstituteMenuContext context, SAbstractConcept concept) {
return context.createItems(new DefaultSubstituteMenuLookup(LanguageRegistry.getInstance(context.getEditorContext().getRepository()), concept));
}
}
}
public class SMP_Group_ddv2zo_g extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a7(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3aa5cde3L, "smartReference"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new SimpleConceptSubstituteMenuPart(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2aeL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChildSmartReference")), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6ff2aeL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteSubChildSmartReference")));
}
}
public class SMP_Group_ddv2zo_h extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a8(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7ce1116e3a7111ffL, "childrenToContributeMenu"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_h.SMP_Include_ddv2zo_a7());
}
public class SMP_Include_ddv2zo_a7 extends IncludeSubstituteMenuSubstituteMenuPart {
@Nullable
@Override
protected SubstituteMenuLookup getMenuLookup(SubstituteMenuContext _context) {
final EditorContext editorContext = _context.getEditorContext();
return new NamedSubstituteMenuLookup(LanguageRegistry.getInstance(editorContext.getRepository()), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"), "jetbrains.mps.lang.editor.menus.substitute.testLanguage.editor.NamedSubstituteMenuForContribution");
}
}
}
public class SMP_Group_ddv2zo_i extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a9(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7f0007d60cfb6991L, "superChild"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_i.SMP_Subconcepts_ddv2zo_a8());
}
public class SMP_Subconcepts_ddv2zo_a8 extends ConceptMenusPart<SubstituteMenuItem, SubstituteMenuContext> {
protected Collection getConcepts(final SubstituteMenuContext _context) {
return ConceptDescendantsCache.getInstance().getDirectDescendants(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"));
}
@Override
protected Collection<SubstituteMenuItem> createItemsForConcept(SubstituteMenuContext context, SAbstractConcept concept) {
return context.createItems(new DefaultSubstituteMenuLookup(LanguageRegistry.getInstance(context.getEditorContext().getRepository()), concept));
}
}
}
public class SMP_Group_ddv2zo_j extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return _context.getLink() == null;
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new TestSubstituteChild_SubstituteMenu.SMP_Group_ddv2zo_j.SMP_Subconcepts_ddv2zo_a9());
}
public class SMP_Subconcepts_ddv2zo_a9 extends ConceptMenusPart<SubstituteMenuItem, SubstituteMenuContext> {
protected Collection getConcepts(final SubstituteMenuContext _context) {
return ConceptDescendantsCache.getInstance().getDirectDescendants(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0beL, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteChild"));
}
@Override
protected Collection<SubstituteMenuItem> createItemsForConcept(SubstituteMenuContext context, SAbstractConcept concept) {
return context.createItems(new DefaultSubstituteMenuLookup(LanguageRegistry.getInstance(context.getEditorContext().getRepository()), concept));
}
}
}
public class SMP_Group_ddv2zo_k extends GroupMenuPart<SubstituteMenuItem, SubstituteMenuContext> {
@Override
protected boolean isApplicable(SubstituteMenuContext _context) {
return eq_ddv2zo_a0a0a11(_context.getLink(), MetaAdapterFactory.getContainmentLink(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7ce1116e3a6fb0bdL, 0x7f53d2199230e174L, "notSubconcept"));
}
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts() {
return Arrays.<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>asList(new ConstraintsFilteringSubstituteMenuPartDecorator(new SimpleConceptSubstituteMenuPart(MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7f53d21992314d41L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteNotSubconceptOfChild")), MetaAdapterFactory.getConcept(0xcb6d57037c8e46a9L, 0xb993c1373dc0942fL, 0x7f53d21992314d41L, "jetbrains.mps.lang.editor.menus.substitute.testLanguage.structure.TestSubstituteNotSubconceptOfChild")));
}
}
private static boolean eq_ddv2zo_a0f0c1(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a2(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a3(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a4(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a5(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a6(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a7(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a8(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a9(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_ddv2zo_a0a0a11(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
}