package jetbrains.mps.lang.editor.editor;
/*Generated by MPS */
import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.openapi.editor.cells.EditorCell;
import jetbrains.mps.nodeEditor.cells.EditorCell_Collection;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
import jetbrains.mps.lang.editor.editor.Styles_StyleSheet.headerStyleClass;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal;
import jetbrains.mps.lang.editor.editor.Styles_StyleSheet.propertyStyleClass;
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole;
import jetbrains.mps.lang.editor.cellProviders.RefCellCellProvider;
import jetbrains.mps.util.Computable;
import jetbrains.mps.editor.runtime.impl.CellUtil;
import jetbrains.mps.nodeEditor.EditorManager;
import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider;
import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import jetbrains.mps.openapi.editor.cells.CellActionType;
import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart;
import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.nodeEditor.cellMenu.CompositeSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SubstituteInfoPartExt;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfoPartEx;
import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_PropertyValues;
import java.util.List;
import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;
import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_Generic_Item;
import org.jetbrains.mps.openapi.model.SModel;
import jetbrains.mps.smodel.action.SNodeFactoryOperations;
import jetbrains.mps.openapi.editor.style.StyleRegistry;
import jetbrains.mps.nodeEditor.MPSColors;
import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_Generic_Group;
import jetbrains.mps.lang.editor.cellProviders.AggregationCellContext;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
/*package*/ class CellModel_RefNodeList_InspectorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public CellModel_RefNodeList_InspectorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_2v2794_a_0();
}
private EditorCell createCollection_2v2794_a_0() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical());
editorCell.setCellId("Collection_2v2794_a_0");
editorCell.setBig(true);
editorCell.setCellContext(getCellFactory().getCellContext());
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createComponent_2v2794_a0_0());
editorCell.addEditorCell(createConstant_2v2794_b0());
editorCell.addEditorCell(createConstant_2v2794_c0());
editorCell.addEditorCell(createCollection_2v2794_d0());
return editorCell;
}
private EditorCell createComponent_2v2794_a0_0() {
EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.editor.editor._CellModel_Common");
return editorCell;
}
private EditorCell createConstant_2v2794_b0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_2v2794_b0");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_2v2794_c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Ref.node list cell:");
editorCell.setCellId("Constant_2v2794_c0");
Style style = new StyleImpl();
new headerStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_2v2794_d0() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical());
editorCell.setCellId("Collection_2v2794_d0");
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.setGridLayout(true);
editorCell.addEditorCell(createCollection_2v2794_a3a());
editorCell.addEditorCell(createCollection_2v2794_b3a());
editorCell.addEditorCell(createCollection_2v2794_c3a());
editorCell.addEditorCell(createCollection_2v2794_d3a());
editorCell.addEditorCell(createCollection_2v2794_e3a());
editorCell.addEditorCell(createConstant_2v2794_f3a());
editorCell.addEditorCell(createCollection_2v2794_g3a());
editorCell.addEditorCell(createCollection_2v2794_h3a());
editorCell.addEditorCell(createCollection_2v2794_i3a());
editorCell.addEditorCell(createCollection_2v2794_j3a());
editorCell.addEditorCell(createCollection_2v2794_k3a());
editorCell.addEditorCell(createCollection_2v2794_l3a());
editorCell.addEditorCell(createCollection_2v2794_m3a());
editorCell.addEditorCell(createCollection_2v2794_n3a());
editorCell.addEditorCell(createCollection_2v2794_o3a());
return editorCell;
}
private EditorCell createCollection_2v2794_a3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_a3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a0d0());
editorCell.addEditorCell(createRefCell_2v2794_b0d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a0d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "link");
editorCell.setCellId("Constant_2v2794_a0d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefCell_2v2794_b0d0() {
CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) {
@Override
protected EditorCell createRefCell(EditorContext context, final SNode effectiveNode, SNode node) {
EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable<EditorCell>() {
public EditorCell compute() {
return new CellModel_RefNodeList_InspectorBuilder_a.Inline_Builder_2v2794_a1a3a(getEditorContext(), myNode, effectiveNode).createCell();
}
}, effectiveNode, "relationDeclaration");
CellUtil.setupIDeprecatableStyles(effectiveNode, cell);
setSemanticNodeToCells(cell, myNode);
installDeleteActions_atLeastOne(cell);
return cell;
}
};
provider.setRole("linkDeclaration");
provider.setNoTargetText("<no link>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
if (editorCell.getRole() == null) {
editorCell.setReferenceCell(true);
editorCell.setRole("relationDeclaration");
}
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
/*package*/ static class Inline_Builder_2v2794_a1a3a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
private SNode myReferencingNode;
/*package*/ Inline_Builder_2v2794_a1a3a(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) {
super(context);
myReferencingNode = referencingNode;
myNode = node;
}
/*package*/ EditorCell createCell() {
return createProperty_2v2794_a0b0d0();
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
private EditorCell createProperty_2v2794_a0b0d0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("role");
provider.setNoTargetText("<no role>");
provider.setReadOnly(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_role_2");
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
}
private EditorCell createCollection_2v2794_b3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_b3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a1d0());
editorCell.addEditorCell(createRefNode_2v2794_b1d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a1d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "filter");
editorCell.setCellId("Constant_2v2794_a1d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b1d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.filterSingleRoleHandler_2v2794_b1d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x1134299ee53L, "filter"), getEditorContext());
return provider.createCell();
}
private static class filterSingleRoleHandler_2v2794_b1d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public filterSingleRoleHandler_2v2794_b1d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x1134299ee53L, "filter"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x1134299ee53L, "filter"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x1134299ee53L, "filter"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("filter");
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x1134299ee53L, "filter")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_filter");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no filter>";
}
}
private EditorCell createCollection_2v2794_c3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_c3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a2d0());
editorCell.addEditorCell(createRefNode_2v2794_b2d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a2d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "cell layout");
editorCell.setCellId("Constant_2v2794_a2d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b2d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.cellLayoutSingleRoleHandler_2v2794_b2d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x1098c8e38e8L, "cellLayout"), getEditorContext());
return provider.createCell();
}
private static class cellLayoutSingleRoleHandler_2v2794_b2d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public cellLayoutSingleRoleHandler_2v2794_b2d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x1098c8e38e8L, "cellLayout"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x1098c8e38e8L, "cellLayout"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x1098c8e38e8L, "cellLayout"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("cellLayout");
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x1098c8e38e8L, "cellLayout")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_cellLayout");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no cellLayout>";
}
}
private EditorCell createCollection_2v2794_d3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_d3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a3d0());
editorCell.addEditorCell(createProperty_2v2794_b3d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a3d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "uses braces");
editorCell.setCellId("Constant_2v2794_a3d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createProperty_2v2794_b3d0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("usesBraces");
provider.setNoTargetText("<no usesBraces>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_usesBraces");
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
private EditorCell createCollection_2v2794_e3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_e3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a4d0());
editorCell.addEditorCell(createAlternation_2v2794_b4d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a4d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "uses folding");
editorCell.setCellId("Constant_2v2794_a4d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createAlternation_2v2794_b4d0() {
boolean alternationCondition = true;
alternationCondition = nodeCondition_2v2794_a1e3a();
EditorCell editorCell = null;
if (alternationCondition) {
editorCell = createProperty_2v2794_a1e3a();
} else {
editorCell = createRefNode_2v2794_a1e3a();
}
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
return editorCell;
}
private boolean nodeCondition_2v2794_a1e3a() {
return (SLinkOperations.getTarget(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition")) == null);
}
private EditorCell createProperty_2v2794_a1e3a() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("usesFolding");
provider.setNoTargetText("<no usesFolding>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_usesFolding");
editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), provider.getCellContext(), new SubstituteInfoPartExt[]{new CellModel_RefNodeList_InspectorBuilder_a.CellModel_RefNodeList_usesFolding_cellMenu_2v2794_a0a1e3a(), new CellModel_RefNodeList_InspectorBuilder_a.CellModel_RefNodeList_generic_cellMenu_2v2794_b0a1e3a(), new SChildSubstituteInfoPartEx(editorCell)}));
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
public static class CellModel_RefNodeList_usesFolding_cellMenu_2v2794_a0a1e3a extends AbstractCellMenuPart_PropertyValues {
public CellModel_RefNodeList_usesFolding_cellMenu_2v2794_a0a1e3a() {
}
public List<String> getPropertyValues(SNode node, IOperationContext operationContext, EditorContext editorContext) {
return ListSequence.fromListAndArray(new ArrayList<String>(), "true", "false");
}
}
public static class CellModel_RefNodeList_generic_cellMenu_2v2794_b0a1e3a extends AbstractCellMenuPart_Generic_Item {
public CellModel_RefNodeList_generic_cellMenu_2v2794_b0a1e3a() {
}
public void handleAction(SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition"), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x10a1953c797L, "jetbrains.mps.lang.editor.structure.QueryFunction_NodeCondition")));
}
public String getMatchingText() {
return "query";
}
}
private EditorCell createRefNode_2v2794_a1e3a() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.usesFoldingConditionSingleRoleHandler_2v2794_a1e3a(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition"), getEditorContext());
return provider.createCell();
}
private static class usesFoldingConditionSingleRoleHandler_2v2794_a1e3a extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public usesFoldingConditionSingleRoleHandler_2v2794_a1e3a(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("usesFoldingCondition");
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x3fdace61664c27e7L, "usesFoldingCondition")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_usesFoldingCondition");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no usesFoldingCondition>";
}
}
private EditorCell createConstant_2v2794_f3a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "list element:");
editorCell.setCellId("Constant_2v2794_f3a");
Style style = new StyleImpl();
new headerStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_2v2794_g3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_g3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a6d0());
if (nodeCondition_2v2794_a1g3a()) {
editorCell.addEditorCell(createProperty_2v2794_b6d0());
}
editorCell.addEditorCell(createRefNode_2v2794_c6d0());
return editorCell;
}
private boolean nodeCondition_2v2794_a1g3a() {
return SLinkOperations.getTarget(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery")) == null;
}
private EditorCell createConstant_2v2794_a6d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "separator");
editorCell.setCellId("Constant_2v2794_a6d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createProperty_2v2794_b6d0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("separatorText");
provider.setNoTargetText("<no separator>");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_separatorText");
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.yellow));
style.set(StyleAttributes.SELECTED_TEXT_BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.cyan));
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), provider.getCellContext(), new SubstituteInfoPartExt[]{new CellModel_RefNodeList_InspectorBuilder_a.CellModel_RefNodeList_generic_cellMenu_2v2794_a0b6d0(), new SChildSubstituteInfoPartEx(editorCell)}));
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
public static class CellModel_RefNodeList_generic_cellMenu_2v2794_a0b6d0 extends AbstractCellMenuPart_Generic_Group {
public CellModel_RefNodeList_generic_cellMenu_2v2794_a0b6d0() {
}
public List<?> createParameterObjects(SNode node, IOperationContext operationContext, EditorContext editorContext) {
List<SNode> result = ListSequence.fromList(new ArrayList<SNode>());
ListSequence.fromList(result).addElement(SNodeFactoryOperations.createNewNode(SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x9da6a4591fc7fb5L, "jetbrains.mps.lang.editor.structure.QueryFunction_SeparatorText")), null));
return result;
}
protected void handleAction(Object parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) {
this.handleAction_impl((SNode) parameterObject, node, model, operationContext, editorContext);
}
public void handleAction_impl(SNode parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) {
SLinkOperations.setTarget(node, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery"), parameterObject);
}
public boolean isReferentPresentation() {
return false;
}
public String getMatchingText(Object parameterObject) {
return this.getMatchingText_internal((SNode) parameterObject);
}
public String getMatchingText_internal(SNode parameterObject) {
return "query";
}
}
private EditorCell createRefNode_2v2794_c6d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.separatorTextQuerySingleRoleHandler_2v2794_c6d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery"), getEditorContext());
return provider.createCell();
}
private static class separatorTextQuerySingleRoleHandler_2v2794_c6d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public separatorTextQuerySingleRoleHandler_2v2794_c6d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), new AggregationCellContext(myNode, child, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery"), MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x9da6a4591fc7fb5L, "jetbrains.mps.lang.editor.structure.QueryFunction_SeparatorText")), new SubstituteInfoPartExt[]{new CellModel_RefNodeList_InspectorBuilder_a.separatorTextQuerySingleRoleHandler_2v2794_c6d0.CellModel_RefNodeList_generic_cellMenu_2v2794_a0c6d0(), new SChildSubstituteInfoPartEx(editorCell)}));
}
if (editorCell.getRole() == null) {
editorCell.setRole("separatorTextQuery");
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery")));
try {
EditorCell editorCell = createCollection_2v2794_a2g3a();
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
private EditorCell createCollection_2v2794_a2g3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_2v2794_a2g3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
return editorCell;
}
public static class CellModel_RefNodeList_generic_cellMenu_2v2794_a0c6d0 extends AbstractCellMenuPart_Generic_Group {
public CellModel_RefNodeList_generic_cellMenu_2v2794_a0c6d0() {
}
public List<?> createParameterObjects(SNode node, IOperationContext operationContext, EditorContext editorContext) {
List<String> result = ListSequence.fromList(new ArrayList<String>());
ListSequence.fromList(result).addElement(SPropertyOperations.getString(node, MetaAdapterFactory.getProperty(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x1098c8e02fdL, "separatorText")));
return result;
}
protected void handleAction(Object parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) {
this.handleAction_impl((String) parameterObject, node, model, operationContext, editorContext);
}
public void handleAction_impl(String parameterObject, SNode node, SModel model, IOperationContext operationContext, EditorContext editorContext) {
SNodeOperations.deleteNode(SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0xce215999c843265L, "separatorTextQuery")));
}
public boolean isReferentPresentation() {
return false;
}
public String getMatchingText(Object parameterObject) {
return this.getMatchingText_internal((String) parameterObject);
}
public String getMatchingText_internal(String parameterObject) {
return parameterObject;
}
public String getDescriptionText(Object parameterObject) {
return this.getDescriptionText_internal((String) parameterObject);
}
public String getDescriptionText_internal(String parameterObject) {
return "static text";
}
}
}
private EditorCell createCollection_2v2794_h3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_h3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a7d0());
editorCell.addEditorCell(createProperty_2v2794_b7d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a7d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "separator constraint");
editorCell.setCellId("Constant_2v2794_a7d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createProperty_2v2794_b7d0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("separatorLayoutConstraint");
provider.setNoTargetText("<no separatorLayoutConstraint>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_separatorLayoutConstraint");
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
private EditorCell createCollection_2v2794_i3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_i3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a8d0());
editorCell.addEditorCell(createRefNode_2v2794_b8d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a8d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "separator style");
editorCell.setCellId("Constant_2v2794_a8d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b8d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.separatorStyleSingleRoleHandler_2v2794_b8d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11f1cf0e6aeL, "separatorStyle"), getEditorContext());
return provider.createCell();
}
private static class separatorStyleSingleRoleHandler_2v2794_b8d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public separatorStyleSingleRoleHandler_2v2794_b8d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11f1cf0e6aeL, "separatorStyle"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11f1cf0e6aeL, "separatorStyle"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11f1cf0e6aeL, "separatorStyle"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("separatorStyle");
}
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11f1cf0e6aeL, "separatorStyle")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_separatorStyle");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "default";
}
}
private EditorCell createCollection_2v2794_j3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_j3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a9d0());
editorCell.addEditorCell(createProperty_2v2794_b9d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a9d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "reverse order");
editorCell.setCellId("Constant_2v2794_a9d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createProperty_2v2794_b9d0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("reverse");
provider.setNoTargetText("<no reverse>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_reverse");
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
private EditorCell createCollection_2v2794_k3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_k3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a01d0());
editorCell.addEditorCell(createRefNode_2v2794_b01d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a01d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "element factory");
editorCell.setCellId("Constant_2v2794_a01d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b01d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.nodeFactorySingleRoleHandler_2v2794_b01d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11204946ab7L, "nodeFactory"), getEditorContext());
return provider.createCell();
}
private static class nodeFactorySingleRoleHandler_2v2794_b01d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public nodeFactorySingleRoleHandler_2v2794_b01d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11204946ab7L, "nodeFactory"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11204946ab7L, "nodeFactory"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11204946ab7L, "nodeFactory"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("nodeFactory");
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1098c8cf48aL, 0x11204946ab7L, "nodeFactory")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_nodeFactory");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no factory>";
}
}
private EditorCell createCollection_2v2794_l3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_l3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a11d0());
editorCell.addEditorCell(createRefCell_2v2794_b11d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a11d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "element action map");
editorCell.setCellId("Constant_2v2794_a11d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefCell_2v2794_b11d0() {
CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) {
@Override
protected EditorCell createRefCell(EditorContext context, final SNode effectiveNode, SNode node) {
EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable<EditorCell>() {
public EditorCell compute() {
return new CellModel_RefNodeList_InspectorBuilder_a.Inline_Builder_2v2794_a1l3a(getEditorContext(), myNode, effectiveNode).createCell();
}
}, effectiveNode, "elementActionMap");
CellUtil.setupIDeprecatableStyles(effectiveNode, cell);
setSemanticNodeToCells(cell, myNode);
installDeleteActions_nullable_reference(cell);
return cell;
}
};
provider.setRole("elementActionMap");
provider.setNoTargetText("<default>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
if (editorCell.getRole() == null) {
editorCell.setReferenceCell(true);
editorCell.setRole("elementActionMap");
}
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
/*package*/ static class Inline_Builder_2v2794_a1l3a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
private SNode myReferencingNode;
/*package*/ Inline_Builder_2v2794_a1l3a(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) {
super(context);
myReferencingNode = referencingNode;
myNode = node;
}
/*package*/ EditorCell createCell() {
return createProperty_2v2794_a0b11d0();
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
private EditorCell createProperty_2v2794_a0b11d0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("name");
provider.setNoTargetText("<no name>");
provider.setReadOnly(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_name");
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
}
private EditorCell createCollection_2v2794_m3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_m3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a21d0());
editorCell.addEditorCell(createRefNode_2v2794_b21d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a21d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "element menu");
editorCell.setCellId("Constant_2v2794_a21d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b21d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.elementMenuDescriptorSingleRoleHandler_2v2794_b21d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x10f54188d34L, "elementMenuDescriptor"), getEditorContext());
return provider.createCell();
}
private static class elementMenuDescriptorSingleRoleHandler_2v2794_b21d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public elementMenuDescriptorSingleRoleHandler_2v2794_b21d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x10f54188d34L, "elementMenuDescriptor"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x10f54188d34L, "elementMenuDescriptor"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x10f54188d34L, "elementMenuDescriptor"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("elementMenuDescriptor");
}
Style style = new StyleImpl();
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x10f54188d34L, "elementMenuDescriptor")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_elementMenuDescriptor");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<default>";
}
}
private EditorCell createCollection_2v2794_n3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_n3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a31d0());
editorCell.addEditorCell(createRefNode_2v2794_b31d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a31d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "add context hints");
editorCell.setCellId("Constant_2v2794_a31d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b31d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.addHintsSingleRoleHandler_2v2794_b31d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245646L, "addHints"), getEditorContext());
return provider.createCell();
}
private static class addHintsSingleRoleHandler_2v2794_b31d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public addHintsSingleRoleHandler_2v2794_b31d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245646L, "addHints"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245646L, "addHints"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245646L, "addHints"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("addHints");
}
CellModel_RefNodeList_AddHint_Actions.setCellActions(editorCell, getNode(), getEditorContext());
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245646L, "addHints")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_addHints");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no addHints>";
}
}
private EditorCell createCollection_2v2794_o3a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_2v2794_o3a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.DRAW_BORDER, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_2v2794_a41d0());
editorCell.addEditorCell(createRefNode_2v2794_b41d0());
return editorCell;
}
private EditorCell createConstant_2v2794_a41d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "remove context hints");
editorCell.setCellId("Constant_2v2794_a41d0");
Style style = new StyleImpl();
new propertyStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2v2794_b41d0() {
SingleRoleCellProvider provider = new CellModel_RefNodeList_InspectorBuilder_a.removeHintsSingleRoleHandler_2v2794_b41d0(myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245647L, "removeHints"), getEditorContext());
return provider.createCell();
}
private static class removeHintsSingleRoleHandler_2v2794_b41d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public removeHintsSingleRoleHandler_2v2794_b41d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245647L, "removeHints"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245647L, "removeHints"), child));
installCellInfo(child, editorCell);
return editorCell;
}
private void installCellInfo(SNode child, EditorCell editorCell) {
if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell, myNode, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245647L, "removeHints"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("removeHints");
}
CellModel_RefNodeList_RemoveHint_Actions.setCellActions(editorCell, getNode(), getEditorContext());
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9eb0ad38eL, 0x650641cc62245647L, "removeHints")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_removeHints");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no removeHints>";
}
}
}