package jetbrains.mps.lang.editor.editorTest.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_Indent;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
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;
/*package*/ class SwingComponentContainer_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public SwingComponentContainer_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_ycnsl1_a();
}
private EditorCell createCollection_ycnsl1_a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_ycnsl1_a");
editorCell.setBig(true);
editorCell.setCellContext(getCellFactory().getCellContext());
editorCell.addEditorCell(createConstant_ycnsl1_a0());
editorCell.addEditorCell(createConstant_ycnsl1_b0());
editorCell.addEditorCell(createCollection_ycnsl1_c0());
editorCell.addEditorCell(createConstant_ycnsl1_d0());
return editorCell;
}
private EditorCell createConstant_ycnsl1_a0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "container");
editorCell.setCellId("Constant_ycnsl1_a0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_b0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{");
editorCell.setCellId("Constant_ycnsl1_b0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.MATCHING_LABEL, "brace");
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_ycnsl1_c0() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_ycnsl1_c0");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_ycnsl1_a2a());
editorCell.addEditorCell(createConstant_ycnsl1_b2a());
editorCell.addEditorCell(createCollection_ycnsl1_c2a());
editorCell.addEditorCell(createConstant_ycnsl1_d2a());
editorCell.addEditorCell(createConstant_ycnsl1_e2a());
editorCell.addEditorCell(createConstant_ycnsl1_f2a());
editorCell.addEditorCell(createConstant_ycnsl1_g2a());
editorCell.addEditorCell(createCollection_ycnsl1_h2a());
editorCell.addEditorCell(createConstant_ycnsl1_i2a());
editorCell.addEditorCell(createConstant_ycnsl1_j2a());
editorCell.addEditorCell(createConstant_ycnsl1_k2a());
editorCell.addEditorCell(createConstant_ycnsl1_l2a());
editorCell.addEditorCell(createCollection_ycnsl1_m2a());
editorCell.addEditorCell(createConstant_ycnsl1_n2a());
editorCell.addEditorCell(createConstant_ycnsl1_o2a());
editorCell.addEditorCell(createConstant_ycnsl1_p2a());
editorCell.addEditorCell(createConstant_ycnsl1_q2a());
editorCell.addEditorCell(createCollection_ycnsl1_r2a());
editorCell.addEditorCell(createConstant_ycnsl1_s2a());
return editorCell;
}
private EditorCell createConstant_ycnsl1_a2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "collapsedComponent");
editorCell.setCellId("Constant_ycnsl1_a2a");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_b2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{");
editorCell.setCellId("Constant_ycnsl1_b2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_cc");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_ycnsl1_c2a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_ycnsl1_c2a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
editorCell.getStyle().putAll(style);
editorCell.setFoldable(true);
editorCell.setFoldedCell(createConstant_ycnsl1_a2c0_0());
editorCell.addEditorCell(createConstant_ycnsl1_a2c0());
editorCell.addEditorCell(createRefNode_ycnsl1_b2c0());
editorCell.setInitiallyCollapsed(true);
return editorCell;
}
private EditorCell createConstant_ycnsl1_a2c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "component");
editorCell.setCellId("Constant_ycnsl1_a2c0");
Style style = new StyleImpl();
style.set(StyleAttributes.UNDERLINED, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_ycnsl1_b2c0() {
SingleRoleCellProvider provider = new SwingComponentContainer_EditorBuilder_a.collapsedComponentSingleRoleHandler_ycnsl1_b2c0(myNode, MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1cL, "collapsedComponent"), getEditorContext());
return provider.createCell();
}
private static class collapsedComponentSingleRoleHandler_ycnsl1_b2c0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public collapsedComponentSingleRoleHandler_ycnsl1_b2c0(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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1cL, "collapsedComponent"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1cL, "collapsedComponent"), 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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1cL, "collapsedComponent"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("collapsedComponent");
}
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1cL, "collapsedComponent")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_collapsedComponent");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no collapsedComponent>";
}
}
private EditorCell createConstant_ycnsl1_a2c0_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "...");
editorCell.setCellId("Constant_ycnsl1_a2c0_0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.SELECTABLE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_d2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
editorCell.setCellId("Constant_ycnsl1_d2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_cc");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_e2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_ycnsl1_e2a");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_f2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "expandedComponent");
editorCell.setCellId("Constant_ycnsl1_f2a");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_g2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{");
editorCell.setCellId("Constant_ycnsl1_g2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_ec");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_ycnsl1_h2a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_ycnsl1_h2a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
editorCell.getStyle().putAll(style);
editorCell.setFoldable(true);
editorCell.setFoldedCell(createConstant_ycnsl1_a7c0_0());
editorCell.addEditorCell(createConstant_ycnsl1_a7c0());
editorCell.addEditorCell(createRefNode_ycnsl1_b7c0());
return editorCell;
}
private EditorCell createConstant_ycnsl1_a7c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "component");
editorCell.setCellId("Constant_ycnsl1_a7c0");
Style style = new StyleImpl();
style.set(StyleAttributes.UNDERLINED, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_ycnsl1_b7c0() {
SingleRoleCellProvider provider = new SwingComponentContainer_EditorBuilder_a.expandedComponentSingleRoleHandler_ycnsl1_b7c0(myNode, MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1eL, "expandedComponent"), getEditorContext());
return provider.createCell();
}
private static class expandedComponentSingleRoleHandler_ycnsl1_b7c0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public expandedComponentSingleRoleHandler_ycnsl1_b7c0(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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1eL, "expandedComponent"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1eL, "expandedComponent"), 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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1eL, "expandedComponent"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("expandedComponent");
}
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x4c2f3af68cccbb1eL, "expandedComponent")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_expandedComponent");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no expandedComponent>";
}
}
private EditorCell createConstant_ycnsl1_a7c0_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "...");
editorCell.setCellId("Constant_ycnsl1_a7c0_0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.SELECTABLE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_i2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
editorCell.setCellId("Constant_ycnsl1_i2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_ec");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_j2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_ycnsl1_j2a");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_k2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "collapsedInner");
editorCell.setCellId("Constant_ycnsl1_k2a");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_l2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{");
editorCell.setCellId("Constant_ycnsl1_l2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_ci");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_ycnsl1_m2a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_ycnsl1_m2a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
editorCell.getStyle().putAll(style);
editorCell.setFoldable(true);
editorCell.setFoldedCell(createConstant_ycnsl1_a21c0_0());
editorCell.addEditorCell(createConstant_ycnsl1_a21c0());
editorCell.addEditorCell(createRefNode_ycnsl1_b21c0());
editorCell.setInitiallyCollapsed(true);
return editorCell;
}
private EditorCell createConstant_ycnsl1_a21c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "inner container");
editorCell.setCellId("Constant_ycnsl1_a21c0");
Style style = new StyleImpl();
style.set(StyleAttributes.UNDERLINED, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_ycnsl1_b21c0() {
SingleRoleCellProvider provider = new SwingComponentContainer_EditorBuilder_a.collapsedInnerContainerSingleRoleHandler_ycnsl1_b21c0(myNode, MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164e6L, "collapsedInnerContainer"), getEditorContext());
return provider.createCell();
}
private static class collapsedInnerContainerSingleRoleHandler_ycnsl1_b21c0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public collapsedInnerContainerSingleRoleHandler_ycnsl1_b21c0(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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164e6L, "collapsedInnerContainer"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164e6L, "collapsedInnerContainer"), 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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164e6L, "collapsedInnerContainer"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("collapsedInnerContainer");
}
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164e6L, "collapsedInnerContainer")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_collapsedInnerContainer");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no collapsedInnerContainer>";
}
}
private EditorCell createConstant_ycnsl1_a21c0_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "...");
editorCell.setCellId("Constant_ycnsl1_a21c0_0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.SELECTABLE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_n2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
editorCell.setCellId("Constant_ycnsl1_n2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_ci");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_o2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_ycnsl1_o2a");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_p2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "expandedInner");
editorCell.setCellId("Constant_ycnsl1_p2a");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_q2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{");
editorCell.setCellId("Constant_ycnsl1_q2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_ei");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_ycnsl1_r2a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_ycnsl1_r2a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
editorCell.getStyle().putAll(style);
editorCell.setFoldable(true);
editorCell.setFoldedCell(createConstant_ycnsl1_a71c0_0());
editorCell.addEditorCell(createConstant_ycnsl1_a71c0());
editorCell.addEditorCell(createRefNode_ycnsl1_b71c0());
return editorCell;
}
private EditorCell createConstant_ycnsl1_a71c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "expande container");
editorCell.setCellId("Constant_ycnsl1_a71c0");
Style style = new StyleImpl();
style.set(StyleAttributes.UNDERLINED, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_ycnsl1_b71c0() {
SingleRoleCellProvider provider = new SwingComponentContainer_EditorBuilder_a.expandedInnerContainerSingleRoleHandler_ycnsl1_b71c0(myNode, MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164eaL, "expandedInnerContainer"), getEditorContext());
return provider.createCell();
}
private static class expandedInnerContainerSingleRoleHandler_ycnsl1_b71c0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public expandedInnerContainerSingleRoleHandler_ycnsl1_b71c0(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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164eaL, "expandedInnerContainer"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164eaL, "expandedInnerContainer"), 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(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164eaL, "expandedInnerContainer"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("expandedInnerContainer");
}
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0x4c2f3af68ccbed52L, 0x3511b2d0e7c164eaL, "expandedInnerContainer")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_expandedInnerContainer");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no expandedInnerContainer>";
}
}
private EditorCell createConstant_ycnsl1_a71c0_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "...");
editorCell.setCellId("Constant_ycnsl1_a71c0_0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.SELECTABLE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_s2a() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
editorCell.setCellId("Constant_ycnsl1_s2a");
Style style = new StyleImpl();
style.set(StyleAttributes.MATCHING_LABEL, "brace_ei");
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_ycnsl1_d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
editorCell.setCellId("Constant_ycnsl1_d0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.MATCHING_LABEL, "brace");
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
}