package jetbrains.mps.build.workflow.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.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; 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.workflow.editor.workflowStyles_StyleSheet.keywordStyleClass; import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; import jetbrains.mps.lang.editor.cellProviders.PropertyCellProvider; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.nodeEditor.cellMenu.CompositeSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SubstituteInfoPartExt; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfoPartEx; import jetbrains.mps.lang.editor.generator.internal.AbstractCellMenuPart_PropertyValues; import java.util.List; import jetbrains.mps.smodel.IOperationContext; import jetbrains.mps.build.workflow.behavior.BwfJavaModule__BehaviorDescriptor; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import java.util.Arrays; /*package*/ class BwfJavaModule_InspectorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public BwfJavaModule_InspectorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_y27sly_a_0(); } private EditorCell createCollection_y27sly_a_0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); editorCell.setCellId("Collection_y27sly_a_0"); editorCell.setBig(true); editorCell.setCellContext(getCellFactory().getCellContext()); editorCell.addEditorCell(createConstant_y27sly_a0_0()); editorCell.addEditorCell(createProperty_y27sly_b0_0()); editorCell.addEditorCell(createConstant_y27sly_c0_0()); editorCell.addEditorCell(createProperty_y27sly_d0()); editorCell.addEditorCell(createConstant_y27sly_e0()); editorCell.addEditorCell(createProperty_y27sly_f0()); editorCell.addEditorCell(createConstant_y27sly_g0()); editorCell.addEditorCell(createProperty_y27sly_h0()); if (nodeCondition_y27sly_a8a()) { editorCell.addEditorCell(createConstant_y27sly_i0()); } if (nodeCondition_y27sly_a9a()) { editorCell.addEditorCell(createProperty_y27sly_j0()); } editorCell.addEditorCell(createConstant_y27sly_k0()); editorCell.addEditorCell(createProperty_y27sly_l0()); editorCell.addEditorCell(createConstant_y27sly_m0()); editorCell.addEditorCell(createProperty_y27sly_n0()); editorCell.addEditorCell(createConstant_y27sly_o0()); editorCell.addEditorCell(createProperty_y27sly_p0()); return editorCell; } private boolean nodeCondition_y27sly_a8a() { return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0x698a8d22a10447a0L, 0xba8d10e3ec237f13L, 0x41fde5e4adce38bbL, 0x3d4a6c597112f405L, "fork")); } private boolean nodeCondition_y27sly_a9a() { return SPropertyOperations.getBoolean(myNode, MetaAdapterFactory.getProperty(0x698a8d22a10447a0L, 0xba8d10e3ec237f13L, 0x41fde5e4adce38bbL, 0x3d4a6c597112f405L, "fork")); } private EditorCell createConstant_y27sly_a0_0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "generate debug info"); editorCell.setCellId("Constant_y27sly_a0_0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_b0_0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("generateDebugInfo"); provider.setNoTargetText("<no generateDebugInfo>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_generateDebugInfo"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); 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 EditorCell createConstant_y27sly_c0_0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "generate no warnings"); editorCell.setCellId("Constant_y27sly_c0_0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_d0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("noWarnings"); provider.setNoTargetText("<no noWarnings>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_noWarnings"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); 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 EditorCell createConstant_y27sly_e0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "compiler"); editorCell.setCellId("Constant_y27sly_e0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_f0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("compiler"); provider.setNoTargetText("<default compiler>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_compiler"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), provider.getCellContext(), new SubstituteInfoPartExt[]{new BwfJavaModule_InspectorBuilder_a.BwfJavaModule_compiler_cellMenu_y27sly_a0f0(), new SChildSubstituteInfoPartEx(editorCell)})); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } public static class BwfJavaModule_compiler_cellMenu_y27sly_a0f0 extends AbstractCellMenuPart_PropertyValues { public BwfJavaModule_compiler_cellMenu_y27sly_a0f0() { } public List<String> getPropertyValues(SNode node, IOperationContext operationContext, EditorContext editorContext) { return (List<String>) BwfJavaModule__BehaviorDescriptor.getCompilerNames_id3Par5_LaIPl.invoke(SNodeOperations.asSConcept(MetaAdapterFactory.getConcept(0x698a8d22a10447a0L, 0xba8d10e3ec237f13L, 0x41fde5e4adce38bbL, "jetbrains.mps.build.workflow.structure.BwfJavaModule"))); } } private EditorCell createConstant_y27sly_g0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "fork"); editorCell.setCellId("Constant_y27sly_g0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_h0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("fork"); provider.setNoTargetText("<fork jvm>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_fork"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); 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 EditorCell createConstant_y27sly_i0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "maximum heap size (MB)"); editorCell.setCellId("Constant_y27sly_i0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_j0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("heapSize"); provider.setNoTargetText("<default>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_heapSize"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); 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 EditorCell createConstant_y27sly_k0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "java compliance source"); editorCell.setCellId("Constant_y27sly_k0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_l0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("javaLevelSource"); provider.setNoTargetText("<default>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_javaLevelSource"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), provider.getCellContext(), new SubstituteInfoPartExt[]{new BwfJavaModule_InspectorBuilder_a.BwfJavaModule_javaLevelSource_cellMenu_y27sly_a0l0(), new SChildSubstituteInfoPartEx(editorCell)})); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } public static class BwfJavaModule_javaLevelSource_cellMenu_y27sly_a0l0 extends AbstractCellMenuPart_PropertyValues { public BwfJavaModule_javaLevelSource_cellMenu_y27sly_a0l0() { } public List<String> getPropertyValues(SNode node, IOperationContext operationContext, EditorContext editorContext) { return Arrays.asList(new String[]{"1.5", "1.6", "1.7", "1.8"}); } } private EditorCell createConstant_y27sly_m0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "java compliance target"); editorCell.setCellId("Constant_y27sly_m0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_n0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("javaLevelTarget"); provider.setNoTargetText("<default>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_javaLevelTarget"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo(new CompositeSubstituteInfo(getEditorContext(), provider.getCellContext(), new SubstituteInfoPartExt[]{new BwfJavaModule_InspectorBuilder_a.BwfJavaModule_javaLevelTarget_cellMenu_y27sly_a0n0(), new SChildSubstituteInfoPartEx(editorCell)})); SNode attributeConcept = provider.getRoleAttribute(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell); } else return editorCell; } public static class BwfJavaModule_javaLevelTarget_cellMenu_y27sly_a0n0 extends AbstractCellMenuPart_PropertyValues { public BwfJavaModule_javaLevelTarget_cellMenu_y27sly_a0n0() { } public List<String> getPropertyValues(SNode node, IOperationContext operationContext, EditorContext editorContext) { return Arrays.asList(new String[]{"1.5", "1.6", "1.7", "1.8"}); } } private EditorCell createConstant_y27sly_o0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "java compiler options"); editorCell.setCellId("Constant_y27sly_o0"); Style style = new StyleImpl(); new keywordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_y27sly_p0() { CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext()); provider.setRole("compilerOptions"); provider.setNoTargetText("<no additional options>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); editorCell.setCellId("property_compilerOptions"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true); 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; } }