Пример #1
0
 private EditorCell createCollection_c4imx1_e0(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_c4imx1_e0");
   Style style = new StyleImpl();
   style.set(StyleAttributes.SELECTABLE, 0, false);
   editorCell.getStyle().putAll(style);
   RemoveDocComment.setCellActions(editorCell, node, editorContext);
   editorCell.addEditorCell(this.createConstant_c4imx1_a4a(editorContext, node));
   if (renderingCondition_c4imx1_a1e0(node, editorContext)) {
     editorCell.addEditorCell(this.createRefNodeList_c4imx1_b4a(editorContext, node));
   }
   if (renderingCondition_c4imx1_a2e0(node, editorContext)) {
     editorCell.addEditorCell(this.createRefNodeList_c4imx1_c4a(editorContext, node));
   }
   if (renderingCondition_c4imx1_a3e0(node, editorContext)) {
     editorCell.addEditorCell(this.createRefNodeList_c4imx1_d4a(editorContext, node));
   }
   if (renderingCondition_c4imx1_a4e0(node, editorContext)) {
     editorCell.addEditorCell(this.createRefNodeList_c4imx1_e4a(editorContext, node));
   }
   if (renderingCondition_c4imx1_a5e0(node, editorContext)) {
     editorCell.addEditorCell(this.createRefNode_c4imx1_f4a(editorContext, node));
   }
   return editorCell;
 }
 private EditorCell createProperty_3uf681_a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   Style style = new StyleImpl();
   style.set(
       StyleAttributes.NAVIGATABLE_NODE,
       0,
       FigureParameterMapping_Editor._StyleParameter_QueryFunction_3uf681_a0a0(
           (editorCell == null ? null : editorCell.getContext()),
           (editorCell == null ? null : editorCell.getSNode())));
   style.set(StyleAttributes.AUTO_DELETABLE, 0, true);
   editorCell.getStyle().putAll(style);
   FigureParameterMappingName_Actions.setCellActions(editorCell, node, editorContext);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new FigureParameterMapping_Editor
                 .FigureParameterMapping_generic_cellMenu_3uf681_a0a0()
           }));
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(editorContext);
     return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
Пример #3
0
  private EditorCell createReadOnlyModelAccessor_7k9x8q_a0(
      final EditorContext editorContext, final SNode node) {
    EditorCell_Property editorCell =
        EditorCell_Property.create(
            editorContext,
            new ModelAccessor() {
              public String getText() {
                return (String)
                    INodeWithReference__BehaviorDescriptor.getTextWhenBroken_idigjXyuNrou.invoke(
                        node);
              }

              public void setText(String s) {}

              public boolean isValidText(String s) {
                return EqualUtil.equals(s, getText());
              }
            },
            node);
    editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance());
    editorCell.setAction(CellActionType.BACKSPACE, EmptyCellAction.getInstance());
    editorCell.setCellId("ReadOnlyModelAccessor_7k9x8q_a0");
    Style style = new StyleImpl();
    style.set(
        StyleAttributes.TEXT_COLOR, 0, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray));
    editorCell.getStyle().putAll(style);
    return editorCell;
  }
 private EditorCell createProperty_689p1d_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("flag");
   provider.setNoTargetText("<no flag>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_flag");
   Style style = new StyleImpl();
   style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new BooleanStyleSheetItem_Editor.BooleanStyleSheetItem_flag_cellMenu_689p1d_a0c0(),
             new BooleanStyleSheetItem_Editor.BooleanStyleSheetItem_generic_cellMenu_689p1d_b0c0()
           }));
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
Пример #5
0
 private EditorCell createProperty_3mrn5h_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("target");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.AUTO_DELETABLE, false);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createRefCell_d5p1uc_b0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new AnnotationInstance_EditorBuilder_a._Inline_d5p1uc_a1a(innerCellNode, myNode);
         }
       };
   provider.setRole("annotation");
   provider.setNoTargetText("<no annotation>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("annotation");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation");
   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;
 }
Пример #7
0
  private EditorCell createReadOnlyModelAccessor_mtiojs_a(
      final EditorContext editorContext, final SNode node) {
    EditorCell_Property editorCell =
        EditorCell_Property.create(
            editorContext,
            new ModelAccessor() {
              public String getText() {
                return EditorCellModel_Behavior.call_getOpeningTag_1220340471382(node);
              }

              public void setText(String s) {}

              public boolean isValidText(String s) {
                return EqualUtil.equals(s, getText());
              }
            },
            node);
    editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance());
    editorCell.setCellId("ReadOnlyModelAccessor_mtiojs_a");
    Style style = new StyleImpl();
    Styles_StyleSheet.applyBordered(style, editorCell);
    style.set(
        StyleAttributes.BACKGROUND_COLOR,
        StyleRegistry.getInstance()
            .getSimpleColor(
                _OpenTag._StyleParameter_QueryFunction_mtiojs_a0a(
                    (editorCell == null ? null : editorCell.getContext()),
                    (editorCell == null ? null : editorCell.getSNode()))));
    style.set(StyleAttributes.EDITABLE, false);
    editorCell.getStyle().putAll(style);
    return editorCell;
  }
Пример #8
0
 private EditorCell createProperty_y27sly_n0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("javaLevelTarget");
   provider.setNoTargetText("<default>");
   provider.setAllowsEmptyTarget(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_javaLevelTarget");
   Style style = new StyleImpl();
   style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, 0, true);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new BwfJavaModule_Editor.BwfJavaModule_javaLevelTarget_cellMenu_y27sly_a0n0()
           }));
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(editorContext);
     return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
  private EditorCell createReadOnlyModelAccessor_clzyhh_a0(
      final EditorContext editorContext, final SNode node) {
    EditorCell_Property editorCell =
        EditorCell_Property.create(
            editorContext,
            new ModelAccessor() {
              public String getText() {
                return BehaviorReflection.invokeVirtual(
                    String.class,
                    node,
                    "virtual_getTextWhenBroken_328850564593858078",
                    new Object[] {});
              }

              public void setText(String s) {}

              public boolean isValidText(String s) {
                return EqualUtil.equals(s, getText());
              }
            },
            node);
    editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance());
    editorCell.setCellId("ReadOnlyModelAccessor_clzyhh_a0");
    Style style = new StyleImpl();
    style.set(
        StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.darkGray));
    editorCell.getStyle().putAll(style);
    return editorCell;
  }
Пример #10
0
 private EditorCell createProperty_1qbsjw_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
   style.set(StyleAttributes.AUTO_DELETABLE, true);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createNodeRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
Пример #11
0
 public static void apply_Keyword(Style style, EditorCell editorCell) {
   style.set(StyleAttributes.FONT_STYLE, 0, MPSFonts.BOLD);
   style.set(
       StyleAttributes.TEXT_COLOR,
       0,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
 }
Пример #12
0
 private EditorCell createProperty_hntvsg_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, 0, MPSFonts.ITALIC);
   style.set(
       StyleAttributes.TEXT_COLOR,
       0,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.darkGray));
   style.set(StyleAttributes.PADDING_RIGHT, 0, new Padding(0.0, Measure.SPACES));
   style.set(StyleAttributes.AUTO_DELETABLE, 0, true);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(editorContext);
     return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createCollection_58m68g_b0(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_58m68g_b0");
   Style style = new StyleImpl();
   style.set(StyleAttributes.SELECTABLE, 0, false);
   style.set(
       StyleAttributes.getInstance()
           .<String>getAttribute(
               "jetbrains.mps.lang.editor.styleTests", "test-inherited-attribute"),
       0,
       TestConceptWithStyleAttributes_Editor._StyleParameter_QueryFunction_58m68g_a1b0(
           (editorCell == null ? null : editorCell.getContext()),
           (editorCell == null ? null : editorCell.getSNode())));
   style.set(
       StyleAttributes.getInstance()
           .<Boolean>getAttribute("jetbrains.mps.lang.editor.styleTests", "test-simple-attribute"),
       0,
       TestConceptWithStyleAttributes_Editor._StyleParameter_QueryFunction_58m68g_a2b0(
           (editorCell == null ? null : editorCell.getContext()),
           (editorCell == null ? null : editorCell.getSNode())));
   editorCell.getStyle().putAll(style);
   editorCell.addEditorCell(this.createConstant_58m68g_a1a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_58m68g_b1a(editorContext, node));
   editorCell.addEditorCell(this.createCollection_58m68g_c1a(editorContext, node));
   return editorCell;
 }
 private EditorCell createCollection_gmtuod_c0(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_gmtuod_c0");
   Style style = new StyleImpl();
   style.set(StyleAttributes.SELECTABLE, 0, false);
   editorCell.getStyle().putAll(style);
   editorCell.addEditorCell(this.createRefNode_gmtuod_a2a(editorContext, node));
   if (renderingCondition_gmtuod_a1c0(node, editorContext)) {
     editorCell.addEditorCell(this.createConstant_gmtuod_b2a(editorContext, node));
   }
   if (renderingCondition_gmtuod_a2c0(node, editorContext)) {
     editorCell.addEditorCell(this.createConstant_gmtuod_c2a(editorContext, node));
   }
   if (renderingCondition_gmtuod_a3c0(node, editorContext)) {
     editorCell.addEditorCell(this.createConstant_gmtuod_d2a(editorContext, node));
   }
   editorCell.addEditorCell(this.createRefNode_gmtuod_e2a(editorContext, node));
   editorCell.addEditorCell(this.createProperty_gmtuod_f2a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_gmtuod_g2a(editorContext, node));
   editorCell.addEditorCell(this.createRefNodeList_gmtuod_h2a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_gmtuod_i2a(editorContext, node));
   if (renderingCondition_gmtuod_a9c0(node, editorContext)) {
     editorCell.addEditorCell(this.createCollection_gmtuod_j2a(editorContext, node));
   }
   editorCell.addEditorCell(this.createAlternation_gmtuod_k2a(editorContext, node));
   return editorCell;
 }
Пример #15
0
  private EditorCell createReadOnlyModelAccessor_rnm7c_a(
      final EditorContext editorContext, final SNode node) {
    EditorCell_Property editorCell =
        EditorCell_Property.create(
            editorContext,
            new ModelAccessor() {
              public String getText() {
                return SPropertyOperations.getString(
                    SNodeOperations.getConceptDeclaration(node), "conceptAlias");
              }

              public void setText(String s) {}

              public boolean isValidText(String s) {
                return EqualUtil.equals(s, getText());
              }
            },
            node);
    editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance());
    editorCell.setAction(CellActionType.BACKSPACE, EmptyCellAction.getInstance());
    editorCell.setCellId("ALIAS_EDITOR_COMPONENT");
    Style style = new StyleImpl();
    style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
    editorCell.getStyle().putAll(style);
    return editorCell;
  }
Пример #16
0
 private EditorCell createRefCell_uze3jf_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("concept");
   provider.setNoTargetText("<no concept>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(
       new Model_CreateNewRootNodeOperation_Editor._Inline_uze3jf_a2a());
   editorCell = provider.createEditorCell(editorContext);
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("concept");
   }
   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();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createNodeRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
Пример #17
0
  private EditorCell createReadOnlyModelAccessor_lbdr4h_f0(
      final EditorContext editorContext, final SNode node) {
    EditorCell_Property editorCell =
        EditorCell_Property.create(
            editorContext,
            new ModelAccessor() {
              public String getText() {
                SNode parent = SNodeOperations.getParent(node);
                if ((parent != null)) {
                  return parent.getRoleInParent();
                } else {
                  return "";
                }
              }

              public void setText(String s) {}

              public boolean isValidText(String s) {
                return EqualUtil.equals(s, getText());
              }
            },
            node);
    editorCell.setAction(CellActionType.DELETE, EmptyCellAction.getInstance());
    editorCell.setAction(CellActionType.BACKSPACE, EmptyCellAction.getInstance());
    editorCell.setCellId("ReadOnlyModelAccessor_lbdr4h_f0");
    Style style = new StyleImpl();
    style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
    editorCell.getStyle().putAll(style);
    return editorCell;
  }
 private EditorCell createProperty_j36akn_a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("VDNCC_property_name");
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyVariableName(style, editorCell);
   style.set(StyleAttributes.RT_ANCHOR_TAG, "default_RTransform");
   editorCell.getStyle().putAll(style);
   if (renderingCondition_j36akn_a0(node, editorContext, editorContext.getScope())) {
     editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.FIRST_EDITABLE_CELL);
   }
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new VariableDeclaration_NameCellComponent
                 .VariableDeclaration_name_postfixCellMenu_j36akn_a0a()
           }));
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
Пример #19
0
 private EditorCell createProperty_lbdr4h_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("label");
   provider.setNoTargetText("");
   provider.setAllowsEmptyTarget(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_label");
   Style style = new StyleImpl();
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance()
           .getSimpleColor(
               Antiquotation_Editor._StyleParameter_QueryFunction_lbdr4h_a0b0(
                   (editorCell == null ? null : editorCell.getContext()),
                   (editorCell == null ? null : editorCell.getSNode()))));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createNodeRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createProperty_cv1jro_b1a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("comment");
   provider.setNoTargetText("<no comment>");
   provider.setAllowsEmptyTarget(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_comment");
   Style style = new StyleImpl();
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
   style.set(StyleAttributes.PADDING_LEFT, new Padding(0.0, Measure.SPACES));
   style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createRefCell_kasd0f_b1a0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new MigrateManuallyAnnotation_EditorBuilder_a._Inline_kasd0f_a1b0a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("migrateTo");
   provider.setNoTargetText("<no migrateTo>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("migrateTo");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.NAVIGATABLE_REFERENCE, "migrateTo");
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
   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 void installCellInfo(SNode child, EditorCell editorCell) {
   if (editorCell.getSubstituteInfo() == null
       || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
     editorCell.setSubstituteInfo(
         new OldNewCompositeSubstituteInfo(
             getEditorContext(),
             new SChildSubstituteInfo(
                 editorCell,
                 myNode,
                 MetaAdapterFactory.getContainmentLink(
                     0x86ef829012bb4ca7L,
                     0x947f093788f263a9L,
                     0x5869770da61dfe28L,
                     0x19bfb4173fb5241eL,
                     "moduleRef"),
                 child),
             new DefaultChildSubstituteInfo(
                 myNode, myContainmentLink.getDeclarationNode(), getEditorContext())));
   }
   if (editorCell.getRole() == null) {
     editorCell.setRole("moduleRef");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.PUNCTUATION_RIGHT, true);
   editorCell.getStyle().putAll(style);
 }
 private EditorCell createRefNodeList_2ntrw4_c1b3a(EditorContext editorContext, SNode node) {
   AbstractCellListHandler handler =
       new OverloadedOperatorContainer_Editor.operatorsListHandler_2ntrw4_c1b3a(
           node, "operators", editorContext);
   EditorCell_Collection editorCell =
       handler.createCells(editorContext, new CellLayout_Indent(), false);
   editorCell.setCellId("refNodeList_operators");
   Style style = new StyleImpl();
   style.set(StyleAttributes.POSITION_CHILDREN, 0, "indented");
   style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, 0, true);
   style.set(StyleAttributes.INDENT_LAYOUT_CHILDREN_NEWLINE, 0, true);
   editorCell.getStyle().putAll(style);
   editorCell.setAction(
       CellActionType.COMMENT,
       new CellAction_CommentOrUncommentChild(
           node,
           MetaAdapterFactory.getContainmentLink(
               0xfc8d557e5de64dd8L,
               0xb749aab2fb23aefcL,
               0x6b6f5c413011207L,
               0x6b6f5c413011208L,
               "operators")));
   editorCell.setRole(handler.getElementRole());
   return editorCell;
 }
 private EditorCell createProperty_vgxjtu_a1a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("label");
   provider.setNoTargetText("<no label>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_label");
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.apply_Label(style, editorCell);
   style.set(StyleAttributes.SELECTABLE, true);
   style.set(StyleAttributes.EDITABLE, true);
   editorCell.getStyle().putAll(style);
   ContinueStatement_Actions.setCellActions(editorCell, node, editorContext);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new ContinueStatement_Editor.ContinueStatement_generic_cellMenu_vgxjtu_a0a1a()
           }));
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createRefCell_1x8nz9_a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("declaration");
   provider.setNoTargetText("<no declaration>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(new NodePatternVariableReference_Editor._Inline_1x8nz9_a0a());
   editorCell = provider.createEditorCell(editorContext);
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("declaration");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, 0, MPSFonts.BOLD);
   style.set(
       StyleAttributes.TEXT_COLOR,
       0,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(editorContext);
     return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createCollection_60liib_b1a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createVertical(editorContext, node);
   editorCell.setCellId("Collection_60liib_b1a");
   Style style = new StyleImpl();
   style.set(StyleAttributes.SELECTABLE, false);
   editorCell.getStyle().putAll(style);
   editorCell.addEditorCell(this.createCollection_60liib_a1b0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_60liib_b1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_c1b0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_60liib_d1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_e1b0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_60liib_f1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_g1b0(editorContext, node));
   if (renderingCondition_60liib_a7b1a(node, editorContext)) {
     editorCell.addEditorCell(this.createCollection_60liib_h1b0(editorContext, node));
   }
   editorCell.addEditorCell(this.createConstant_60liib_i1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_j1b0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_60liib_k1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_l1b0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_60liib_m1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_n1b0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_60liib_o1b0(editorContext, node));
   editorCell.addEditorCell(this.createCollection_60liib_p1b0(editorContext, node));
   return editorCell;
 }
 private EditorCell createProperty_7qnrl2_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("member");
   }
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyField(style, editorCell);
   style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createCollection_p9c0o3_d0(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_p9c0o3_d0");
   Style style = new StyleImpl();
   style.set(StyleAttributes.SELECTABLE, 0, false);
   style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, 0, true);
   style.set(StyleAttributes.INDENT_LAYOUT_INDENT, 0, true);
   editorCell.getStyle().putAll(style);
   editorCell.addEditorCell(this.createConstant_p9c0o3_a3a(editorContext, node));
   editorCell.addEditorCell(this.createRefNode_p9c0o3_b3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_c3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_d3a(editorContext, node));
   editorCell.addEditorCell(this.createRefCell_p9c0o3_e3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_f3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_g3a(editorContext, node));
   editorCell.addEditorCell(this.createRefNode_p9c0o3_h3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_i3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_j3a(editorContext, node));
   editorCell.addEditorCell(this.createRefNode_p9c0o3_k3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_l3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_m3a(editorContext, node));
   editorCell.addEditorCell(this.createRefNode_p9c0o3_n3a(editorContext, node));
   editorCell.addEditorCell(this.createConstant_p9c0o3_o3a(editorContext, node));
   editorCell.addEditorCell(this.createRefNodeList_p9c0o3_p3a(editorContext, node));
   return editorCell;
 }
Пример #29
0
 public static void applyMacroStart(Style style, EditorCell editorCell) {
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
   style.set(StyleAttributes.EDITABLE, true);
 }
Пример #30
0
 @Deprecated
 public static Style getGeneratorKeyWord(final EditorCell editorCell) {
   Style style = new StyleImpl(editorCell);
   style.set(
       StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.darkGray));
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
   return style;
 }