コード例 #1
0
 private EditorCell createCollection_ed1xw0_a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_ed1xw0_a");
   editorCell.setBig(true);
   editorCell.addEditorCell(this.createConstant_ed1xw0_a0(editorContext, node));
   if (renderingCondition_ed1xw0_a1a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_ed1xw0_b0(editorContext, node));
   }
   if (renderingCondition_ed1xw0_a2a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createConstant_ed1xw0_c0(editorContext, node));
   }
   editorCell.addEditorCell(this.createRefCell_ed1xw0_d0(editorContext, node));
   if (renderingCondition_ed1xw0_a4a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_ed1xw0_e0(editorContext, node));
   }
   if (renderingCondition_ed1xw0_a5a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_ed1xw0_f0(editorContext, node));
   }
   editorCell.addEditorCell(this.createConstant_ed1xw0_g0(editorContext, node));
   return editorCell;
 }
コード例 #2
0
 private EditorCell createCollection_yxeg41_a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_yxeg41_a");
   if (renderingCondition_yxeg41_a0a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_yxeg41_a0(editorContext, node));
   }
   if (renderingCondition_yxeg41_a1a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_yxeg41_b0(editorContext, node));
   }
   return editorCell;
 }
コード例 #3
0
 private EditorCell createCollection_689p1d_a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createHorizontal(editorContext, node);
   editorCell.setCellId("Collection_689p1d_a");
   editorCell.addEditorCell(this.createComponent_689p1d_a0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_689p1d_b0(editorContext, node));
   if (renderingCondition_689p1d_a2a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createProperty_689p1d_c0(editorContext, node));
   }
   if (renderingCondition_689p1d_a3a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createRefNode_689p1d_d0(editorContext, node));
   }
   return editorCell;
 }
 private EditorCell createProperty_1clvom_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");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("persistentConfiguration");
   }
   Style style = new StyleImpl();
   ExecutionSettings_StyleSheet.apply_persistentConfigurationRefDeprecated(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;
 }
コード例 #5
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;
 }
コード例 #6
0
 private EditorCell createProperty_ed1xw0_a0d0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("pluralForm");
   provider.setNoTargetText("<no pluralForm>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_pluralForm");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("property");
   }
   Style style = new StyleImpl();
   Dates_StyleSheet.applyDateFormat(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;
 }
コード例 #7
0
 private EditorCell createProperty_djrnp4_a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("encoding");
   provider.setNoTargetText("<no encoding>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_encoding");
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.apply_StringLiteral(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new EncodingLiteral_Editor.ReplaceWith_EncodingLiteral_cellMenu_djrnp4_a0a0()
           }));
   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;
 }
コード例 #8
0
 private EditorCell createConceptProperty_89tgy3_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new ConceptPropertyCellProvider(node, editorContext);
   provider.setRole("alias");
   provider.setNoTargetText("<no operation>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("conceptProperty_alias");
   BaseLanguageStyle_StyleSheet.getOperator(editorCell).apply(editorCell);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new BaseAssignmentExpression_Editor
                 .ReplaceWith_BaseAssignmentExpression_cellMenu_a0b0(),
             new BaseAssignmentExpression_Editor.BaseAssignmentExpression_generic_cellMenu_b0b0()
           }));
   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;
 }
コード例 #9
0
 private EditorCell createProperty_2l0gvl_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("tag");
   provider.setNoTargetText("<no tag>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_tag");
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new SideTransformAnchorTagStyleClassItem_Editor
                 .SideTransformAnchorTagStyleClassItem_generic_cellMenu_2l0gvl_a0c0(),
             new SideTransformAnchorTagStyleClassItem_Editor
                 .SideTransformAnchorTagStyleClassItem_generic_cellMenu_2l0gvl_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;
 }
コード例 #10
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;
 }
コード例 #11
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;
 }
コード例 #12
0
 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;
 }
コード例 #13
0
 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;
 }
コード例 #14
0
 private EditorCell createProperty_poez2y_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.applyXmlAttrEntityRefValue(style, editorCell);
   editorCell.getStyle().putAll(style);
   delete_XmlEntityRefValueDelete.setCellActions(editorCell, node, editorContext);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new XmlEntityRefValue_Editor.XmlEntityRefValue_entityName_cellMenu_poez2y_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;
 }
コード例 #15
0
 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;
 }
コード例 #16
0
 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;
 }
コード例 #17
0
 private EditorCell createProperty_7qsf43_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();
   BaseLanguageStyle_StyleSheet.applyLocalVariable(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new IfInstanceOfVariable_Editor
                 .IfInstanceOfVariable_name_postfixCellMenu_7qsf43_a0a0()
           }));
   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;
 }
コード例 #18
0
 private EditorCell createProperty_26flog_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("function");
   }
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyMethodName(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;
 }
コード例 #19
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;
 }
コード例 #20
0
 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;
 }
コード例 #21
0
 @Override
 public List<INodeSubstituteAction> createActions(
     CellContext cellContext, EditorContext editorContext) {
   SNode referenceNode = (SNode) cellContext.get(BasicCellContext.EDITED_NODE);
   SNode linkDeclaration = ((SNode) cellContext.get(ReferenceCellContext.LINK_DECLARATION));
   SNode currentReferent = (SNode) cellContext.getOpt(ReferenceCellContext.CURRENT_REFERENT_NODE);
   return ModelActions.createReferentSubstituteActions(
       referenceNode, currentReferent, linkDeclaration, editorContext.getOperationContext());
 }
コード例 #22
0
 private EditorCell createAttributedLinkCell_9o3sb9_c0(EditorContext editorContext, SNode node) {
   IOperationContext opContext = editorContext.getOperationContext();
   EditorManager manager = EditorManager.getInstanceFromContext(opContext);
   EditorCell editorCell = manager.getCurrentAttributedCellWithRole(AttributeKind.Reference.class);
   Style style = new StyleImpl();
   Styles_StyleSheet.applyNodeUnderMacro(style, editorCell);
   editorCell.getStyle().putAll(style);
   return editorCell;
 }
コード例 #23
0
 private EditorCell createCollection_vddsqv_a0(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createHorizontal(editorContext, node);
   editorCell.setCellId("Collection_vddsqv_a0");
   {
     Style style = editorCell.getStyle();
     style.set(StyleAttributes.SELECTABLE, false);
   }
   editorCell.addEditorCell(this.createRefNode_vddsqv_a0a(editorContext, node));
   editorCell.addEditorCell(this.createProperty_vddsqv_b0a(editorContext, node));
   if (renderingCondition_vddsqv_a2a0(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_vddsqv_c0a(editorContext, node));
   }
   if (renderingCondition_vddsqv_a3a0(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_vddsqv_d0a(editorContext, node));
   }
   return editorCell;
 }
コード例 #24
0
 private EditorCell createCollection_fty1bq_a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_fty1bq_a");
   editorCell.addEditorCell(this.createConstant_fty1bq_a0(editorContext, node));
   if (renderingCondition_fty1bq_a1a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createRefNode_fty1bq_b0(editorContext, node));
   }
   if (renderingCondition_fty1bq_a2a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createRefNodeList_fty1bq_c0(editorContext, node));
   }
   if (renderingCondition_fty1bq_a3a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_fty1bq_d0(editorContext, node));
   }
   editorCell.addEditorCell(this.createConstant_fty1bq_e0(editorContext, node));
   return editorCell;
 }
コード例 #25
0
  @Override
  public void execute(EditorContext context) {
    LOG.assertInCommand();
    EditorComponent editorComponent = (EditorComponent) context.getEditorComponent();
    EditorCell selectedCell = editorComponent.getSelectedCell();
    SNode anchorNode = selectedCell.getSNode();

    PasteNodeData pasteNodeData =
        CopyPasteUtil.getPasteNodeDataFromClipboard(anchorNode.getModel());
    if (pasteNodeData == null || pasteNodeData.getNodes().isEmpty()) {
      pasteNodeData =
          CopyPasteUtil.getConvertedFromClipboard(
              anchorNode.getModel(), context.getOperationContext().getProject());
      if (pasteNodeData == null) return;
    }
    List<SNode> pasteNodes = pasteNodeData.getNodes();
    Set<SReference> requireResolveReferences = pasteNodeData.getRequireResolveReferences();

    new NodePaster(pasteNodes).pasteRelative(anchorNode, myPastePlaceHint);
    ResolverComponent.getInstance()
        .resolveScopesOnly(requireResolveReferences, context.getOperationContext());

    // set selection
    editorComponent.flushEvents();
    EditorCell nodeCell = editorComponent.findNodeCell(pasteNodes.get(0));
    if (nodeCell == null) return; // after 'set reference'?
    EditorCell_Label labelCell =
        CellFinderUtil.findChildByClass(nodeCell, EditorCell_Label.class, true);

    if (labelCell != null) {
      editorComponent.changeSelection(labelCell);
    }

    if (pasteNodes.size() == 1) {
      editorComponent.pushSelection(nodeCell);
    } else {
      SelectionManager selectionManager = editorComponent.getSelectionManager();
      selectionManager.pushSelection(
          selectionManager.createRangeSelection(
              pasteNodes.get(0), pasteNodes.get(pasteNodes.size() - 1)));
    }
  }
コード例 #26
0
ファイル: AddExecutor_Intention.java プロジェクト: sprig/MPS
 public void execute(final SNode node, final EditorContext editorContext) {
   SNode executor =
       SNodeFactoryOperations.createNewNode(
           "jetbrains.mps.execution.configurations.structure.RunConfigurationExecutor", null);
   SLinkOperations.setTarget(executor, "configuration", node, false);
   SPropertyOperations.set(
       executor, "virtualPackage", SPropertyOperations.getString(node, "virtualPackage"));
   SModelOperations.addRootNode(SNodeOperations.getModel(node), executor);
   NavigationSupport.getInstance()
       .openNode(editorContext.getOperationContext(), executor, true, false);
 }
コード例 #27
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;
 }
コード例 #28
0
 private EditorCell createCollection_z29e2a_a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createIndent2(editorContext, node);
   editorCell.setCellId("Collection_z29e2a_a");
   editorCell.addEditorCell(this.createConstant_z29e2a_a0(editorContext, node));
   editorCell.addEditorCell(this.createRefNode_z29e2a_b0(editorContext, node));
   if (renderingCondition_z29e2a_a2a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createCollection_z29e2a_c0(editorContext, node));
   }
   return editorCell;
 }
コード例 #29
0
 private EditorCell createCollection_9o3sb9_a(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createHorizontal(editorContext, node);
   editorCell.setCellId("Collection_9o3sb9_a");
   editorCell.setBig(true);
   editorCell.addEditorCell(this.createConstant_9o3sb9_a0(editorContext, node));
   if (renderingCondition_9o3sb9_a1a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createProperty_9o3sb9_b0(editorContext, node));
   }
   editorCell.addEditorCell(this.createAttributedLinkCell_9o3sb9_c0(editorContext, node));
   return editorCell;
 }
コード例 #30
0
 private EditorCell createCollection_73o0fl_a_0(EditorContext editorContext, SNode node) {
   EditorCell_Collection editorCell = EditorCell_Collection.createHorizontal(editorContext, node);
   editorCell.setCellId("Collection_73o0fl_a_0");
   editorCell.addEditorCell(this.createConstant_73o0fl_a0_0(editorContext, node));
   if (renderingCondition_73o0fl_a1a(
       node, editorContext, editorContext.getOperationContext().getScope())) {
     editorCell.addEditorCell(this.createRefCell_73o0fl_b0(editorContext, node));
   }
   editorCell.addEditorCell(this.createAttributedNodeCell_73o0fl_c0(editorContext, node));
   editorCell.addEditorCell(this.createConstant_73o0fl_d0(editorContext, node));
   return editorCell;
 }