private EditorCell createCustom_bjjsvn_a(final EditorContext editorContext, final SNode node) {
   AbstractCellProvider provider =
       new _FunctionTypes._return_P0_E0<AbstractCellProvider>() {
         public AbstractCellProvider invoke() {
           return new AbstractCellProvider() {
             @Override
             public EditorCell createEditorCell(EditorContext context) {
               EditorCell_Error result = new EditorCell_Error(context, node, "<no classpath>");
               result.getStyle().set(StyleAttributes.PADDING_LEFT, new Padding(0.0));
               result.getStyle().set(StyleAttributes.PADDING_RIGHT, new Padding(0.0));
               return result;
             }
           };
         }
       }.invoke();
   EditorCell editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("Custom_bjjsvn_a");
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   } else {
     throw new RuntimeException("No big cell found!");
   }
   return editorCell;
 }
Esempio n. 2
0
 private EditorCell createComponent_qilpva_a(EditorContext editorContext, SNode node) {
   EditorCell editorCell =
       editorContext
           .getCellFactory()
           .createEditorComponentCell(
               node, "jetbrains.mps.baseLanguage.editor.ConceptFunction_Component");
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   }
   editorCell.setAction(CellActionType.COMMENT, new CellAction_Comment(node));
   return editorCell;
 }
 private EditorCell createComponent_4cp5nl_a(EditorContext editorContext, SNode node) {
   EditorCell editorCell =
       editorContext
           .getCellFactory()
           .createEditorComponentCell(
               node, "jetbrains.mps.lang.smodel.editor.ReplaceableAliasAndParms_Comp");
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   } else {
     throw new RuntimeException("No big cell found!");
   }
   return editorCell;
 }
Esempio n. 4
0
 private EditorCell createComponent_r8n5dq_a(EditorContext editorContext, SNode node) {
   EditorCell editorCell =
       editorContext
           .getCellFactory()
           .createEditorComponentCell(node, "jetbrains.mps.lang.core.editor.alias");
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   }
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.apply_StringLiteral(style, editorCell);
   editorCell.getStyle().putAll(style);
   return editorCell;
 }
Esempio n. 5
0
 private EditorCell createAlternation_zc016d_a(EditorContext editorContext, SNode node) {
   boolean alternationCondition = true;
   alternationCondition = BLCommand_Editor.renderingCondition_zc016d_a0(node, editorContext);
   EditorCell editorCell = null;
   if (alternationCondition) {
     editorCell = this.createCollection_zc016d_a0(editorContext, node);
   } else {
     editorCell = this.createRefNode_zc016d_a0(editorContext, node);
   }
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   }
   editorCell.setAction(CellActionType.COMMENT, new CellAction_Comment(node));
   return editorCell;
 }
 private EditorCell createAlternation_7k9x8q_a(EditorContext editorContext, SNode node) {
   boolean alternationCondition = true;
   alternationCondition =
       PastedNodeReference_Editor.renderingCondition_7k9x8q_a0(node, editorContext);
   EditorCell editorCell = null;
   if (alternationCondition) {
     editorCell = this.createCollection_7k9x8q_a0(editorContext, node);
   } else {
     editorCell = this.createReadOnlyModelAccessor_7k9x8q_a0(editorContext, node);
   }
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   }
   Style style = new StyleImpl();
   style.set(
       StyleAttributes.BACKGROUND_COLOR,
       0,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.yellow));
   editorCell.getStyle().putAll(style);
   return editorCell;
 }
Esempio n. 7
0
 private EditorCell createCustom_qilpva_a(final EditorContext editorContext, final SNode node) {
   AbstractCellProvider provider =
       new _FunctionTypes._return_P0_E0<AbstractCellProvider>() {
         public AbstractCellProvider invoke() {
           return new AbstractCellProvider() {
             @Override
             public EditorCell createEditorCell(EditorContext context) {
               EditorCell_Collection collection =
                   jetbrains.mps.nodeEditor.cells.EditorCell_Collection.createVertical(
                       context, node);
               collection.addEditorCell(
                   new EditorCell_Constant(context, node, "Concept function help:"));
               if (SPropertyOperations.getString(
                       SNodeOperations.getConceptDeclaration(node),
                       MetaAdapterFactory.getProperty(
                           0xc72da2b97cce4447L,
                           0x8389f407dc1158b7L,
                           0x1103553c5ffL,
                           0x403a32c5772bbe20L,
                           "conceptShortDescription"))
                   != null) {
                 collection.addEditorCell(
                     new EditorCell_Constant(
                         context,
                         node,
                         SPropertyOperations.getString(
                             SNodeOperations.getConceptDeclaration(node),
                             MetaAdapterFactory.getProperty(
                                 0xc72da2b97cce4447L,
                                 0x8389f407dc1158b7L,
                                 0x1103553c5ffL,
                                 0x403a32c5772bbe20L,
                                 "conceptShortDescription"))));
               }
               collection.addEditorCell(new EditorCell_Constant(context, node, ""));
               collection.addEditorCell(new EditorCell_Constant(context, node, "Parameter help:"));
               for (SNode cfp :
                   BehaviorReflection.invokeVirtual(
                       (Class<List<SNode>>) ((Class) Object.class),
                       node,
                       "virtual_getParameters_1213877374450",
                       new Object[] {})) {
                 String alias =
                     SPropertyOperations.getString(
                         cfp,
                         MetaAdapterFactory.getProperty(
                             0xc72da2b97cce4447L,
                             0x8389f407dc1158b7L,
                             0x1103553c5ffL,
                             0x46ab0ad5826c74caL,
                             "conceptAlias"));
                 String description =
                     SPropertyOperations.getString(
                         cfp,
                         MetaAdapterFactory.getProperty(
                             0xc72da2b97cce4447L,
                             0x8389f407dc1158b7L,
                             0x1103553c5ffL,
                             0x403a32c5772bbe20L,
                             "conceptShortDescription"));
                 if (description == null) {
                   description =
                       "<no help. use conceptShortDescription concept function property to create one>";
                 }
                 EditorCell_Constant message =
                     new EditorCell_Constant(context, node, alias + " : " + description);
                 collection.addEditorCell(message);
               }
               return collection;
             }
           };
         }
       }.invoke();
   EditorCell editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("Custom_qilpva_a");
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   }
   editorCell.setAction(CellActionType.COMMENT, new CellAction_Comment(node));
   return editorCell;
 }