package jetbrains.mps.build.mps.editor; /*Generated by MPS */ import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; import org.jetbrains.annotations.NotNull; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.openapi.editor.EditorContext; import jetbrains.mps.openapi.editor.cells.EditorCell; import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; import jetbrains.mps.openapi.editor.style.Style; import jetbrains.mps.editor.runtime.style.StyleImpl; import jetbrains.mps.build.editor.buildStyles_StyleSheet.keywordStyleClass; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; /*package*/ class BuildMpsAspect_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public BuildMpsAspect_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_koy33t_a(); } private EditorCell createCollection_koy33t_a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_koy33t_a"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); editorCell.addEditorCell(createConstant_koy33t_a0()); editorCell.addEditorCell(createCollection_koy33t_b0()); editorCell.addEditorCell(createCollection_koy33t_c0()); editorCell.addEditorCell(createCollection_koy33t_d0()); editorCell.addEditorCell(createCollection_koy33t_e0()); editorCell.addEditorCell(createConstant_koy33t_f0()); return editorCell; } private EditorCell createConstant_koy33t_a0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "mps settings"); editorCell.setCellId("Constant_koy33t_a0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createCollection_koy33t_b0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_koy33t_b0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_koy33t_a1a()); editorCell.addEditorCell(createProperty_koy33t_b1a()); return editorCell; } private EditorCell createConstant_koy33t_a1a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "bootstrap"); editorCell.setCellId("Constant_koy33t_a1a"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_koy33t_b1a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("bootstrap"); provider.setNoTargetText("<no bootstrap>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_bootstrap"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createCollection_koy33t_c0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_koy33t_c0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_koy33t_a2a()); editorCell.addEditorCell(createProperty_koy33t_b2a()); if (nodeCondition_koy33t_a2c0()) { editorCell.addEditorCell(createCollection_koy33t_c2a()); } return editorCell; } private boolean nodeCondition_koy33t_a2c0() { return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x5a408fb8c80220a9L, 0x18cf12266aabddbfL, "testGeneration")); } private EditorCell createConstant_koy33t_a2a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "test generation"); editorCell.setCellId("Constant_koy33t_a2a"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_koy33t_b2a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("testGeneration"); provider.setNoTargetText("<no testGeneration>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_testGeneration"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createCollection_koy33t_c2a() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_koy33t_c2a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_koy33t_a2c0()); editorCell.addEditorCell(createProperty_koy33t_b2c0()); return editorCell; } private EditorCell createConstant_koy33t_a2c0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "excludes:"); editorCell.setCellId("Constant_koy33t_a2c0"); Style style = new StyleImpl(); new jetbrains.mps.build.workflow.editor.workflowStyles_StyleSheet.keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_koy33t_b2c0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("excludes"); provider.setNoTargetText("<pattern1, pattern2,...>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_excludes"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createCollection_koy33t_d0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_koy33t_d0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_koy33t_a3a()); editorCell.addEditorCell(createProperty_koy33t_b3a()); return editorCell; } private EditorCell createConstant_koy33t_a3a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "generation max heap size in mb"); editorCell.setCellId("Constant_koy33t_a3a"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_koy33t_b3a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("generationMaxHeapSizeInMb"); provider.setNoTargetText("512"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_generationMaxHeapSizeInMb"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createCollection_koy33t_e0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_koy33t_e0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_koy33t_a4a()); editorCell.addEditorCell(createProperty_koy33t_b4a()); return editorCell; } private EditorCell createConstant_koy33t_a4a() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "generation max perm size in mb"); editorCell.setCellId("Constant_koy33t_a4a"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_koy33t_b4a() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("generationMaxPermSizeInMb"); provider.setNoTargetText("default"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_generationMaxPermSizeInMb"); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } private EditorCell createConstant_koy33t_f0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); editorCell.setCellId("Constant_koy33t_f0"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } }