Пример #1
0
 private EditorCell createProperty_uugm4e_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("elementName");
   provider.setNoTargetText("<no elementName>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_elementName");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
     style.set(
         StyleAttributes.TEXT_COLOR,
         new AttributeCalculator<Color>() {
           public Color calculate(EditorCell cell) {
             return ElementReference_Editor._Inline_uugm4e_a0a
                 ._StyleParameter_QueryFunction_uugm4e_a1a0a0(
                     (cell == null ? null : cell.getSNode()),
                     (cell == null ? null : cell.getEditorContext()));
           }
         });
   }
   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;
 }
Пример #2
0
 private EditorCell createProperty_40aq2x_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("entityName");
   provider.setNoTargetText("<no entityName>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_entityName");
   Style style = new StyleImpl();
   XmlSS_StyleSheet.applyXmlEntityRef(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new XmlEntityRef_Editor.XmlEntityRef_entityName_cellMenu_a0b0()
           }));
   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 createComponent_7agu8k_a0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new AliasEditorComponent(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   Style style = new StyleImpl();
   DataFlow_StyleSheet.applyInstruction(style, editorCell);
   editorCell.getStyle().putAll(style);
   return editorCell;
 }
 private EditorCell createComponent_hs064c_a(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new AliasEditorComponent(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyKeyWord(style, editorCell);
   editorCell.getStyle().putAll(style);
   return editorCell;
 }
 private EditorCell createComponent_x00uq0_a0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new AliasEditorComponent(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   Style style = new StyleImpl();
   PackagingStyles_StyleSheet.applyKeyword(style, editorCell);
   editorCell.getStyle().putAll(style);
   return editorCell;
 }
Пример #6
0
 private EditorCell createComponent_h8u2a4_c0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new MessageComponent(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.SELECTABLE, false);
   }
   return editorCell;
 }
 private EditorCell createComponent_1x071y_a0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new _DeprecatedPart(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
   }
   return editorCell;
 }
Пример #8
0
 private EditorCell createComponent_2jlgx_a0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new IMethodCall_typeArguments(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.SELECTABLE, false);
   }
   return editorCell;
 }
Пример #9
0
  public void removeCell(jetbrains.mps.nodeEditor.cells.EditorCell cellToRemove) {
    ((EditorCell_Basic) cellToRemove).setParent(null);
    getEditorCells().remove(cellToRemove);
    getStyle().remove(cellToRemove.getStyle());

    if (isInTree()) {
      ((EditorCell_Basic) cellToRemove).onRemove();
    }
  }
Пример #10
0
 private EditorCell createAttributedNodeCell_73o0fl_c0(EditorContext editorContext, SNode node) {
   IOperationContext opContext = editorContext.getOperationContext();
   EditorManager manager = EditorManager.getInstanceFromContext(opContext);
   EditorCell editorCell = manager.getCurrentAttributedNodeCell();
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.DRAW_BRACKETS, true);
     style.set(StyleAttributes.BRACKETS_COLOR, MPSColors.pink);
   }
   return editorCell;
 }
 private EditorCell createComponent_n84rmm_a0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new AliasEditorComponent(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           new BasicCellContext(node),
           new SubstituteInfoPartExt[] {
             new ReplaceableAliasAndParms_Comp.ReplaceWith_SNodeOperation_cellMenu_a0a0_0()
           }));
   return editorCell;
 }
Пример #12
0
 private EditorCell createProperty_ey2x64_a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("value");
   provider.setNoTargetText("<no value>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_value");
   Style style = new StyleImpl();
   style.set(StyleAttributes.TEXT_COLOR, MPSColors.blue);
   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;
 }
Пример #13
0
 private EditorCell createRefNode_oq95n1_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefNodeCellProvider(node, editorContext);
   provider.setRole("statement");
   provider.setNoTargetText("<no statement>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.BACKGROUND_COLOR, MPSColors.lightGray);
   }
   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;
 }
Пример #14
0
 private EditorCell createRefNode_vspo6f_j0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefNodeCellProvider(node, editorContext);
   provider.setRole("disposeTabClosure");
   provider.setNoTargetText("<no dispose block>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
   }
   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 createProperty_al4u6z_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("workName");
   provider.setNoTargetText("<no workName>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_workName");
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyStringLiteral(style, editorCell);
   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 createRefNode_uv9f3e_d0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefNodeCellProvider(node, editorContext);
   provider.setRole("instance");
   provider.setNoTargetText("<no instance>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES));
   }
   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;
 }
Пример #17
0
 private EditorCell createConceptProperty_mb7jv_a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new ConceptPropertyCellProvider(node, editorContext);
   provider.setRole("alias");
   provider.setNoTargetText("<no alias>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("conceptProperty_alias");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN);
   }
   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_6g21z_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("concept");
   provider.setNoTargetText("<no concept>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(
       new NF_Model_CreateNewNodeOperation_Editor._Inline_6g21z_a2a());
   editorCell = provider.createEditorCell(editorContext);
   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.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
Пример #19
0
 private EditorCell createProperty_4kucyt_b0(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 = editorCell.getStyle();
     style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
   }
   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_hplu10_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("enumDeclaration");
   provider.setNoTargetText("<no name>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(new SEnumOperationInvocation_Editor._Inline_hplu10_a2a());
   editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES));
   }
   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 createRefNode_89tgy3_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefNodeCellProvider(node, editorContext);
   provider.setRole("rValue");
   provider.setNoTargetText("<no rValue>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.SELECTABLE, true);
   }
   AssignmentExpression_RightArgument_Actions.setCellActions(editorCell, node, editorContext);
   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;
 }
Пример #22
0
 private EditorCell createProperty_urzn0w_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("charCode");
   provider.setNoTargetText("<no charCode>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_charCode");
   Style style = new StyleImpl();
   XmlSS_StyleSheet.applyXmlAttrCharRefValue(style, editorCell);
   editorCell.getStyle().putAll(style);
   delete_XmlEntityRefValueDelete.setCellActions(editorCell, node, editorContext);
   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 createProperty_t4awil_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();
   Styles_StyleSheet.applyReference(style, editorCell);
   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;
 }
Пример #24
0
 private EditorCell createProperty_dvtb4y_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("id");
   provider.setNoTargetText("<no id>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_id");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.RT_ANCHOR_TAG, "ext_3_RTransform");
   }
   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 createConceptProperty_p022p0_a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new ConceptPropertyCellProvider(node, editorContext);
   provider.setRole("alias");
   provider.setNoTargetText("choose parameter");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("conceptProperty_alias");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.TEXT_COLOR, MPSColors.DARK_MAGENTA);
   }
   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 createProperty_vipxp6_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();
   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;
 }
Пример #27
0
 private EditorCell createProperty_73o0fl_a0b0(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_1");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.TEXT_BACKGROUND_COLOR, MPSColors.orange);
   }
   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;
 }
Пример #28
0
 private EditorCell createProperty_47eu07_d0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("deg");
   provider.setNoTargetText("<no deg>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_deg");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.FONT_SIZE, 10);
     style.set(StyleAttributes.SCRIPT_KIND, ScriptKind.SUBSCRIPT);
   }
   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 createProperty_daqvaj_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);
   style.set(StyleAttributes.TEXT_COLOR, MPSColors.DARK_MAGENTA);
   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;
 }
Пример #30
0
 private EditorCell createConceptProperty_si17nj_a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new ConceptPropertyCellProvider(node, editorContext);
   provider.setRole("alias");
   provider.setNoTargetText("<no alias>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("conceptProperty_alias");
   BaseLanguageStyle_StyleSheet.getKeyWord(editorCell).apply(editorCell);
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.PUNCTUATION_RIGHT, true);
   }
   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;
 }