package jetbrains.mps.lang.plugin.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.BlockCells; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal; import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.editor.runtime.style.Padding; import jetbrains.mps.editor.runtime.style.Measure; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.nodeEditor.MPSFonts; import jetbrains.mps.nodeEditor.cells.EditorCell_Indent; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; 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; /*package*/ class PreferencePage_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public PreferencePage_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_fl5ndt_a(); } private EditorCell createCollection_fl5ndt_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_fl5ndt_a"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createCollection_fl5ndt_a0()); editorCell.addEditorCell(createCollection_fl5ndt_b0()); if (nodeCondition_fl5ndt_a2a()) { editorCell.addEditorCell(createConstant_fl5ndt_c0()); } return editorCell; } private boolean nodeCondition_fl5ndt_a2a() { return BlockCells.useBraces(); } private EditorCell createCollection_fl5ndt_a0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createCollection_fl5ndt_a0a()); if (nodeCondition_fl5ndt_a1a0()) { editorCell.addEditorCell(createConstant_fl5ndt_b0a()); } return editorCell; } private boolean nodeCondition_fl5ndt_a1a0() { return BlockCells.useBraces(); } private EditorCell createCollection_fl5ndt_a0a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_a0a"); editorCell.addEditorCell(createConstant_fl5ndt_a0a0()); editorCell.addEditorCell(createProperty_fl5ndt_b0a0()); return editorCell; } private EditorCell createConstant_fl5ndt_a0a0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "page"); editorCell.setCellId("Constant_fl5ndt_a0a0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_fl5ndt_b0a0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("name"); provider.setNoTargetText("<no name>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_name"); Style style = new StyleImpl(); style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES)); 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 createConstant_fl5ndt_b0a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{"); editorCell.setCellId("Constant_fl5ndt_b0a"); Style style = new StyleImpl(); style.set(StyleAttributes.MATCHING_LABEL, "brace"); style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, true); style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createCollection_fl5ndt_b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createIndentCell_fl5ndt_a1a()); editorCell.addEditorCell(createCollection_fl5ndt_b1a()); return editorCell; } private EditorCell createIndentCell_fl5ndt_a1a() { EditorCell_Indent editorCell = new EditorCell_Indent(getEditorContext(), myNode); return editorCell; } private EditorCell createCollection_fl5ndt_b1a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_fl5ndt_b1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createCollection_fl5ndt_a1b0()); if (nodeCondition_fl5ndt_a1b1a()) { editorCell.addEditorCell(createCollection_fl5ndt_b1b0()); } editorCell.addEditorCell(createCollection_fl5ndt_c1b0()); editorCell.addEditorCell(createCollection_fl5ndt_d1b0()); editorCell.addEditorCell(createConstant_fl5ndt_e1b0()); editorCell.addEditorCell(createRefNode_fl5ndt_f1b0()); editorCell.addEditorCell(createConstant_fl5ndt_g1b0()); editorCell.addEditorCell(createRefNode_fl5ndt_h1b0()); editorCell.addEditorCell(createConstant_fl5ndt_i1b0()); editorCell.addEditorCell(createRefNode_fl5ndt_j1b0()); return editorCell; } private boolean nodeCondition_fl5ndt_a1b1a() { return isNotEmptyString(SPropertyOperations.getString(myNode, MetaAdapterFactory.getProperty(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e28e412bL, "iconPath"))); } private EditorCell createCollection_fl5ndt_a1b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_a1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_fl5ndt_a0b1a()); editorCell.addEditorCell(createConstant_fl5ndt_b0b1a()); editorCell.addEditorCell(createRefNode_fl5ndt_c0b1a()); return editorCell; } private EditorCell createConstant_fl5ndt_a0b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "component"); editorCell.setCellId("Constant_fl5ndt_a0b1a"); Style style = new StyleImpl(); new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_fl5ndt_b0b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); editorCell.setCellId("Constant_fl5ndt_b0b1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation"); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_fl5ndt_c0b1a() { SingleRoleCellProvider provider = new PreferencePage_EditorBuilder_a.componentSingleRoleHandler_fl5ndt_c0b1a(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e28f326fL, "component"), getEditorContext()); return provider.createCell(); } private static class componentSingleRoleHandler_fl5ndt_c0b1a extends SingleRoleCellProvider { @NotNull private SNode myNode; public componentSingleRoleHandler_fl5ndt_c0b1a(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e28f326fL, "component"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e28f326fL, "component"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e28f326fL, "component"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("component"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e28f326fL, "component"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_component"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no component>"; } } private EditorCell createCollection_fl5ndt_b1b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_b1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_fl5ndt_a1b1a()); editorCell.addEditorCell(createConstant_fl5ndt_b1b1a()); editorCell.addEditorCell(createProperty_fl5ndt_c1b1a()); return editorCell; } private EditorCell createConstant_fl5ndt_a1b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "icon(deprecated)"); editorCell.setCellId("Constant_fl5ndt_a1b1a"); Style style = new StyleImpl(); new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.SELECTABLE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_fl5ndt_b1b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); editorCell.setCellId("Constant_fl5ndt_b1b1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation"); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_fl5ndt_c1b1a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("iconPath"); provider.setNoTargetText("<no iconPath>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_iconPath"); 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_fl5ndt_c1b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_c1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_fl5ndt_a2b1a()); editorCell.addEditorCell(createConstant_fl5ndt_b2b1a()); editorCell.addEditorCell(createRefNode_fl5ndt_c2b1a()); return editorCell; } private EditorCell createConstant_fl5ndt_a2b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "icon"); editorCell.setCellId("Constant_fl5ndt_a2b1a"); Style style = new StyleImpl(); new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.SELECTABLE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_fl5ndt_b2b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); editorCell.setCellId("Constant_fl5ndt_b2b1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation"); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_fl5ndt_c2b1a() { SingleRoleCellProvider provider = new PreferencePage_EditorBuilder_a.iconSingleRoleHandler_fl5ndt_c2b1a(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0xf7553d42b3b5673L, "icon"), getEditorContext()); return provider.createCell(); } private static class iconSingleRoleHandler_fl5ndt_c2b1a extends SingleRoleCellProvider { @NotNull private SNode myNode; public iconSingleRoleHandler_fl5ndt_c2b1a(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0xf7553d42b3b5673L, "icon"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0xf7553d42b3b5673L, "icon"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0xf7553d42b3b5673L, "icon"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("icon"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0xf7553d42b3b5673L, "icon"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_icon"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no icon>"; } } private EditorCell createCollection_fl5ndt_d1b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_fl5ndt_d1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_fl5ndt_a3b1a()); editorCell.addEditorCell(createConstant_fl5ndt_b3b1a()); editorCell.addEditorCell(createProperty_fl5ndt_c3b1a()); return editorCell; } private EditorCell createConstant_fl5ndt_a3b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "help topic"); editorCell.setCellId("Constant_fl5ndt_a3b1a"); Style style = new StyleImpl(); new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createConstant_fl5ndt_b3b1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); editorCell.setCellId("Constant_fl5ndt_b3b1a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation"); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_fl5ndt_c3b1a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("helpTopic"); provider.setNoTargetText("<default help topic>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_helpTopic"); 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 createConstant_fl5ndt_e1b0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_fl5ndt_e1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_fl5ndt_f1b0() { SingleRoleCellProvider provider = new PreferencePage_EditorBuilder_a.resetBlockSingleRoleHandler_fl5ndt_f1b0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290979cL, "resetBlock"), getEditorContext()); return provider.createCell(); } private static class resetBlockSingleRoleHandler_fl5ndt_f1b0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public resetBlockSingleRoleHandler_fl5ndt_f1b0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290979cL, "resetBlock"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290979cL, "resetBlock"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290979cL, "resetBlock"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("resetBlock"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290979cL, "resetBlock"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_resetBlock"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no resetBlock>"; } } private EditorCell createConstant_fl5ndt_g1b0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_fl5ndt_g1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_fl5ndt_h1b0() { SingleRoleCellProvider provider = new PreferencePage_EditorBuilder_a.commitBlockSingleRoleHandler_fl5ndt_h1b0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290e426L, "commitBlock"), getEditorContext()); return provider.createCell(); } private static class commitBlockSingleRoleHandler_fl5ndt_h1b0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public commitBlockSingleRoleHandler_fl5ndt_h1b0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290e426L, "commitBlock"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290e426L, "commitBlock"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290e426L, "commitBlock"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("commitBlock"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e290e426L, "commitBlock"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_commitBlock"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no commitBlock>"; } } private EditorCell createConstant_fl5ndt_i1b0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_fl5ndt_i1b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createRefNode_fl5ndt_j1b0() { SingleRoleCellProvider provider = new PreferencePage_EditorBuilder_a.isModifiedBlockSingleRoleHandler_fl5ndt_j1b0(myNode, MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e723184aL, "isModifiedBlock"), getEditorContext()); return provider.createCell(); } private static class isModifiedBlockSingleRoleHandler_fl5ndt_j1b0 extends SingleRoleCellProvider { @NotNull private SNode myNode; public isModifiedBlockSingleRoleHandler_fl5ndt_j1b0(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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e723184aL, "isModifiedBlock"), child)); editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e723184aL, "isModifiedBlock"), 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(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e723184aL, "isModifiedBlock"), child)); } if (editorCell.getRole() == null) { editorCell.setRole("isModifiedBlock"); } } @Override protected EditorCell createEmptyCell() { getCellFactory().pushCellContext(); getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x119e269a79fL, 0x119e723184aL, "isModifiedBlock"))); try { EditorCell editorCell = super.createEmptyCell(); editorCell.setCellId("empty_isModifiedBlock"); installCellInfo(null, editorCell); setCellContext(editorCell); return editorCell; } finally { getCellFactory().popCellContext(); } } protected String getNoTargetText() { return "<no isModifiedBlock>"; } } private EditorCell createConstant_fl5ndt_c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}"); editorCell.setCellId("Constant_fl5ndt_c0"); Style style = new StyleImpl(); style.set(StyleAttributes.MATCHING_LABEL, "brace"); style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, true); style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private static boolean isNotEmptyString(String str) { return str != null && str.length() > 0; } }