package jetbrains.mps.lang.dataFlow.analyzers.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.nodeEditor.cellProviders.CellProviderWithRole;
import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider;
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.EditorManager;
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.nodeEditor.cellProviders.AbstractCellListHandler;
import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler;
import jetbrains.mps.smodel.action.NodeFactoryManager;
import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal;
import jetbrains.mps.nodeEditor.cells.EditorCell_Indent;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical;
import jetbrains.mps.lang.editor.cellProviders.RefCellCellProvider;
/*package*/ class Analyzer_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public Analyzer_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_590xoz_a();
}
private EditorCell createCollection_590xoz_a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_590xoz_a");
editorCell.setBig(true);
editorCell.setCellContext(getCellFactory().getCellContext());
editorCell.addEditorCell(createConstant_590xoz_a0());
editorCell.addEditorCell(createProperty_590xoz_b0());
editorCell.addEditorCell(createConstant_590xoz_c0());
editorCell.addEditorCell(createRefNode_590xoz_d0());
editorCell.addEditorCell(createConstant_590xoz_e0());
editorCell.addEditorCell(createRefNode_590xoz_f0());
editorCell.addEditorCell(createConstant_590xoz_g0());
editorCell.addEditorCell(createRefNodeList_590xoz_h0());
editorCell.addEditorCell(createConstant_590xoz_i0());
editorCell.addEditorCell(createCollection_590xoz_j0());
editorCell.addEditorCell(createConstant_590xoz_k0());
editorCell.addEditorCell(createRefCell_590xoz_l0());
editorCell.addEditorCell(createRefNode_590xoz_m0());
editorCell.addEditorCell(createConstant_590xoz_n0());
editorCell.addEditorCell(createRefCell_590xoz_o0());
editorCell.addEditorCell(createRefNode_590xoz_p0());
editorCell.addEditorCell(createConstant_590xoz_q0());
editorCell.addEditorCell(createRefCell_590xoz_r0());
editorCell.addEditorCell(createRefNode_590xoz_s0());
editorCell.addEditorCell(createConstant_590xoz_t0());
editorCell.addEditorCell(createConstant_590xoz_u0());
editorCell.addEditorCell(createRefNodeList_590xoz_v0());
editorCell.addEditorCell(createConstant_590xoz_w0());
return editorCell;
}
private EditorCell createConstant_590xoz_a0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "analyzer");
editorCell.setCellId("Constant_590xoz_a0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createProperty_590xoz_b0() {
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.INDENT_LAYOUT_NEW_LINE, 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 createConstant_590xoz_c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "analysis direction:");
editorCell.setCellId("Constant_590xoz_c0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_590xoz_d0() {
SingleRoleCellProvider provider = new Analyzer_EditorBuilder_a.directionSingleRoleHandler_590xoz_d0(myNode, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c2fb98L, "direction"), getEditorContext());
return provider.createCell();
}
private static class directionSingleRoleHandler_590xoz_d0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public directionSingleRoleHandler_590xoz_d0(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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c2fb98L, "direction"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c2fb98L, "direction"), 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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c2fb98L, "direction"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("direction");
}
Style style = new StyleImpl();
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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c2fb98L, "direction")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_direction");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no direction>";
}
}
private EditorCell createConstant_590xoz_e0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "lattice element type:");
editorCell.setCellId("Constant_590xoz_e0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_590xoz_f0() {
SingleRoleCellProvider provider = new Analyzer_EditorBuilder_a.latticeElementTypeSingleRoleHandler_590xoz_f0(myNode, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c51bbbL, "latticeElementType"), getEditorContext());
return provider.createCell();
}
private static class latticeElementTypeSingleRoleHandler_590xoz_f0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public latticeElementTypeSingleRoleHandler_590xoz_f0(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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c51bbbL, "latticeElementType"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c51bbbL, "latticeElementType"), 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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c51bbbL, "latticeElementType"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("latticeElementType");
}
Style style = new StyleImpl();
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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x7f5b799a00c51bbbL, "latticeElementType")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_latticeElementType");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no latticeElementType>";
}
}
private EditorCell createConstant_590xoz_g0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "uses instructions from");
editorCell.setCellId("Constant_590xoz_g0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNodeList_590xoz_h0() {
AbstractCellListHandler handler = new Analyzer_EditorBuilder_a.usedContainersListHandler_590xoz_h0(myNode, "usedContainers", getEditorContext());
EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false);
editorCell.setCellId("refNodeList_usedContainers");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setRole(handler.getElementRole());
return editorCell;
}
private static class usedContainersListHandler_590xoz_h0 extends RefNodeListHandler {
@NotNull
private SNode myNode;
public usedContainersListHandler_590xoz_h0(SNode ownerNode, String childRole, EditorContext context) {
super(ownerNode, childRole, context, false);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
public SNode createNodeToInsert(EditorContext editorContext) {
return NodeFactoryManager.createNode(MetaAdapterFactory.getConcept(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x73e1fea9c1738798L, "jetbrains.mps.lang.dataFlow.analyzers.structure.CustomInstructionsContainerReference"), null, getNode(), getNode().getModel());
}
public EditorCell createNodeCell(SNode elementNode) {
EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode);
installElementCellActions(elementNode, elementCell);
return elementCell;
}
public EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(usedContainersListHandler_590xoz_h0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x73e1fea9c173f804L, "usedContainers")));
try {
EditorCell emptyCell = null;
emptyCell = super.createEmptyCell();
installElementCellActions(null, emptyCell);
setCellContext(emptyCell);
return emptyCell;
} finally {
getCellFactory().popCellContext();
}
}
public void installElementCellActions(SNode elementNode, EditorCell elementCell) {
if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET);
if (elementNode != null) {
elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
}
if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x73e1fea9c173f804L, "usedContainers"), elementNode));
}
}
}
}
private EditorCell createConstant_590xoz_i0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "construction parameters");
editorCell.setCellId("Constant_590xoz_i0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCollection_590xoz_j0() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
editorCell.setCellId("Collection_590xoz_j0");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createIndentCell_590xoz_a9a());
editorCell.addEditorCell(createRefNodeList_590xoz_b9a());
return editorCell;
}
private EditorCell createIndentCell_590xoz_a9a() {
EditorCell_Indent editorCell = new EditorCell_Indent(getEditorContext(), myNode);
return editorCell;
}
private EditorCell createRefNodeList_590xoz_b9a() {
AbstractCellListHandler handler = new Analyzer_EditorBuilder_a.constructorParametersListHandler_590xoz_b9a(myNode, "constructorParameters", getEditorContext());
EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false);
editorCell.setCellId("refNodeList_constructorParameters");
editorCell.setRole(handler.getElementRole());
return editorCell;
}
private static class constructorParametersListHandler_590xoz_b9a extends RefNodeListHandler {
@NotNull
private SNode myNode;
public constructorParametersListHandler_590xoz_b9a(SNode ownerNode, String childRole, EditorContext context) {
super(ownerNode, childRole, context, false);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
public SNode createNodeToInsert(EditorContext editorContext) {
return NodeFactoryManager.createNode(MetaAdapterFactory.getConcept(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x376a4d52f8c420b0L, "jetbrains.mps.lang.dataFlow.analyzers.structure.AnalyzerConstructorParameter"), null, getNode(), getNode().getModel());
}
public EditorCell createNodeCell(SNode elementNode) {
EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode);
installElementCellActions(elementNode, elementCell);
return elementCell;
}
public EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(constructorParametersListHandler_590xoz_b9a.this.getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x376a4d52f8c2e303L, "constructorParameters")));
try {
EditorCell emptyCell = null;
emptyCell = super.createEmptyCell();
installElementCellActions(null, emptyCell);
setCellContext(emptyCell);
return emptyCell;
} finally {
getCellFactory().popCellContext();
}
}
public void installElementCellActions(SNode elementNode, EditorCell elementCell) {
if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET);
if (elementNode != null) {
elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
}
if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x376a4d52f8c2e303L, "constructorParameters"), elementNode));
}
}
}
}
private EditorCell createConstant_590xoz_k0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_590xoz_k0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_ON_NEW_LINE, true);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefCell_590xoz_l0() {
CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) {
@Override
protected EditorCell createRefCell(EditorContext context, SNode effectiveNode, SNode node) {
EditorCell cell = new Analyzer_EditorBuilder_a.Inline_Builder_590xoz_a11a(getEditorContext(), myNode, effectiveNode).createCell();
installDeleteActions_atLeastOne(cell);
return cell;
}
};
provider.setRole("initialFunction");
provider.setNoTargetText("<no initialFunction>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
if (editorCell.getRole() == null) {
editorCell.setReferenceCell(true);
editorCell.setRole("initialFunction");
}
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_590xoz_a11a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
private SNode myReferencingNode;
/*package*/ Inline_Builder_590xoz_a11a(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) {
super(context);
myReferencingNode = referencingNode;
myNode = node;
}
/*package*/ EditorCell createCell() {
return createComponent_590xoz_a0l0();
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
private EditorCell createComponent_590xoz_a0l0() {
EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias");
return editorCell;
}
}
private EditorCell createRefNode_590xoz_m0() {
SingleRoleCellProvider provider = new Analyzer_EditorBuilder_a.initialFunctionSingleRoleHandler_590xoz_m0(myNode, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4ddL, "initialFunction"), getEditorContext());
return provider.createCell();
}
private static class initialFunctionSingleRoleHandler_590xoz_m0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public initialFunctionSingleRoleHandler_590xoz_m0(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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4ddL, "initialFunction"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4ddL, "initialFunction"), 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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4ddL, "initialFunction"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("initialFunction");
}
Style style = new StyleImpl();
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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4ddL, "initialFunction")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_initialFunction");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no initialFunction>";
}
}
private EditorCell createConstant_590xoz_n0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_590xoz_n0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.EDITABLE, false);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefCell_590xoz_o0() {
CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) {
@Override
protected EditorCell createRefCell(EditorContext context, SNode effectiveNode, SNode node) {
EditorCell cell = new Analyzer_EditorBuilder_a.Inline_Builder_590xoz_a41a(getEditorContext(), myNode, effectiveNode).createCell();
installDeleteActions_atLeastOne(cell);
return cell;
}
};
provider.setRole("mergeFunction");
provider.setNoTargetText("<no mergeFunction>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
if (editorCell.getRole() == null) {
editorCell.setReferenceCell(true);
editorCell.setRole("mergeFunction");
}
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_590xoz_a41a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
private SNode myReferencingNode;
/*package*/ Inline_Builder_590xoz_a41a(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) {
super(context);
myReferencingNode = referencingNode;
myNode = node;
}
/*package*/ EditorCell createCell() {
return createComponent_590xoz_a0o0();
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
private EditorCell createComponent_590xoz_a0o0() {
EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias");
return editorCell;
}
}
private EditorCell createRefNode_590xoz_p0() {
SingleRoleCellProvider provider = new Analyzer_EditorBuilder_a.mergeFunctionSingleRoleHandler_590xoz_p0(myNode, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dcaccL, "mergeFunction"), getEditorContext());
return provider.createCell();
}
private static class mergeFunctionSingleRoleHandler_590xoz_p0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public mergeFunctionSingleRoleHandler_590xoz_p0(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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dcaccL, "mergeFunction"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dcaccL, "mergeFunction"), 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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dcaccL, "mergeFunction"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("mergeFunction");
}
Style style = new StyleImpl();
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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dcaccL, "mergeFunction")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_mergeFunction");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no mergeFunction>";
}
}
private EditorCell createConstant_590xoz_q0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_590xoz_q0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.EDITABLE, false);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefCell_590xoz_r0() {
CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) {
@Override
protected EditorCell createRefCell(EditorContext context, SNode effectiveNode, SNode node) {
EditorCell cell = new Analyzer_EditorBuilder_a.Inline_Builder_590xoz_a71a(getEditorContext(), myNode, effectiveNode).createCell();
installDeleteActions_atLeastOne(cell);
return cell;
}
};
provider.setRole("funFunction");
provider.setNoTargetText("<no funFunction>");
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
if (editorCell.getRole() == null) {
editorCell.setReferenceCell(true);
editorCell.setRole("funFunction");
}
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_590xoz_a71a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
private SNode myReferencingNode;
/*package*/ Inline_Builder_590xoz_a71a(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) {
super(context);
myReferencingNode = referencingNode;
myNode = node;
}
/*package*/ EditorCell createCell() {
return createComponent_590xoz_a0r0();
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
private EditorCell createComponent_590xoz_a0r0() {
EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias");
return editorCell;
}
}
private EditorCell createRefNode_590xoz_s0() {
SingleRoleCellProvider provider = new Analyzer_EditorBuilder_a.funFunctionSingleRoleHandler_590xoz_s0(myNode, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4deL, "funFunction"), getEditorContext());
return provider.createCell();
}
private static class funFunctionSingleRoleHandler_590xoz_s0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public funFunctionSingleRoleHandler_590xoz_s0(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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4deL, "funFunction"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4deL, "funFunction"), 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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4deL, "funFunction"), child));
}
if (editorCell.getRole() == null) {
editorCell.setRole("funFunction");
}
Style style = new StyleImpl();
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(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x41dd50940e1dd4deL, "funFunction")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_funFunction");
installCellInfo(null, editorCell);
setCellContext(editorCell);
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
protected String getNoTargetText() {
return "<no funFunction>";
}
}
private EditorCell createConstant_590xoz_t0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_590xoz_t0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_590xoz_u0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "instructions:");
editorCell.setCellId("Constant_590xoz_u0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNodeList_590xoz_v0() {
AbstractCellListHandler handler = new Analyzer_EditorBuilder_a.instructionListHandler_590xoz_v0(myNode, "instruction", getEditorContext());
EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false);
editorCell.setCellId("refNodeList_instruction");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, true);
editorCell.getStyle().putAll(style);
editorCell.setRole(handler.getElementRole());
return editorCell;
}
private static class instructionListHandler_590xoz_v0 extends RefNodeListHandler {
@NotNull
private SNode myNode;
public instructionListHandler_590xoz_v0(SNode ownerNode, String childRole, EditorContext context) {
super(ownerNode, childRole, context, false);
myNode = ownerNode;
}
@Override
@NotNull
public SNode getNode() {
return myNode;
}
public SNode createNodeToInsert(EditorContext editorContext) {
return NodeFactoryManager.createNode(MetaAdapterFactory.getConcept(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f4678aL, "jetbrains.mps.lang.dataFlow.analyzers.structure.Instruction"), null, getNode(), getNode().getModel());
}
public EditorCell createNodeCell(SNode elementNode) {
EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode);
installElementCellActions(elementNode, elementCell);
return elementCell;
}
public EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(instructionListHandler_590xoz_v0.this.getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x2e25b6b7919ac138L, "instruction")));
try {
EditorCell emptyCell = null;
emptyCell = super.createEmptyCell();
installElementCellActions(null, emptyCell);
setCellContext(emptyCell);
return emptyCell;
} finally {
getCellFactory().popCellContext();
}
}
public void installElementCellActions(SNode elementNode, EditorCell elementCell) {
if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET);
if (elementNode != null) {
elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
}
if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
elementCell.setSubstituteInfo(new SChildSubstituteInfo(elementCell, getNode(), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x2e25b6b7919ac138L, "instruction"), elementNode));
}
}
}
}
private EditorCell createConstant_590xoz_w0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
editorCell.setCellId("Constant_590xoz_w0");
Style style = new StyleImpl();
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
}