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; }
public void setFoldedCell(EditorCell foldedCell) { if (myFoldedCell != null) { ((EditorCell_Basic) myFoldedCell).setParent(null); getStyle().remove(myFoldedCell.getStyle()); } myFoldedCell = foldedCell; ((EditorCell_Basic) myFoldedCell).setParent(this); getStyle().add(myFoldedCell.getStyle()); }
private Pair<EditorCell, String> getMatchingLabelAndCell(EditorCell editorCell) { SNode node = editorCell.getSNode(); while (editorCell != null && editorCell.getSNode() == node) { if (editorCell.getStyle().get(StyleAttributes.MATCHING_LABEL) != null) { return new Pair(editorCell, editorCell.getStyle().get(StyleAttributes.MATCHING_LABEL)); } editorCell = editorCell.getParent(); } return null; }
private EditorCell createRefCell_1x8nz9_a0(EditorContext editorContext, SNode node) { CellProviderWithRole provider = new RefCellCellProvider(node, editorContext); provider.setRole("declaration"); provider.setNoTargetText("<no declaration>"); EditorCell editorCell; provider.setAuxiliaryCellProvider(new NodePatternVariableReference_Editor._Inline_1x8nz9_a0a()); editorCell = provider.createEditorCell(editorContext); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("declaration"); } Style style = new StyleImpl(); style.set(StyleAttributes.FONT_STYLE, 0, MPSFonts.BOLD); style.set( StyleAttributes.TEXT_COLOR, 0, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN)); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); Class attributeKind = provider.getRoleAttributeClass(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(editorContext); return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell); } else return editorCell; }
private EditorCell createProperty_3uf681_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(); style.set( StyleAttributes.NAVIGATABLE_NODE, 0, FigureParameterMapping_Editor._StyleParameter_QueryFunction_3uf681_a0a0( (editorCell == null ? null : editorCell.getContext()), (editorCell == null ? null : editorCell.getSNode()))); style.set(StyleAttributes.AUTO_DELETABLE, 0, true); editorCell.getStyle().putAll(style); FigureParameterMappingName_Actions.setCellActions(editorCell, node, editorContext); editorCell.setSubstituteInfo( new CompositeSubstituteInfo( editorContext, provider.getCellContext(), new SubstituteInfoPartExt[] { new FigureParameterMapping_Editor .FigureParameterMapping_generic_cellMenu_3uf681_a0a0() })); SNode attributeConcept = provider.getRoleAttribute(); Class attributeKind = provider.getRoleAttributeClass(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(editorContext); return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell); } else return editorCell; }
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; }
private EditorCell createRefCell_kasd0f_b1a0() { CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) { @Override protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) { return new MigrateManuallyAnnotation_EditorBuilder_a._Inline_kasd0f_a1b0a( innerCellNode, myNode); } }; provider.setRole("migrateTo"); provider.setNoTargetText("<no migrateTo>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("migrateTo"); } Style style = new StyleImpl(); style.set(StyleAttributes.NAVIGATABLE_REFERENCE, "migrateTo"); style.set( StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE)); style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC); 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 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; }
private EditorCell createProperty_y27sly_n0(EditorContext editorContext, SNode node) { CellProviderWithRole provider = new PropertyCellProvider(node, editorContext); provider.setRole("javaLevelTarget"); provider.setNoTargetText("<default>"); provider.setAllowsEmptyTarget(true); EditorCell editorCell; editorCell = provider.createEditorCell(editorContext); editorCell.setCellId("property_javaLevelTarget"); Style style = new StyleImpl(); style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, 0, true); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo( new CompositeSubstituteInfo( editorContext, provider.getCellContext(), new SubstituteInfoPartExt[] { new BwfJavaModule_Editor.BwfJavaModule_javaLevelTarget_cellMenu_y27sly_a0n0() })); SNode attributeConcept = provider.getRoleAttribute(); Class attributeKind = provider.getRoleAttributeClass(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(editorContext); return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell); } else return editorCell; }
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; }
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; }
private EditorCell createProperty_hntvsg_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, 0, MPSFonts.ITALIC); style.set( StyleAttributes.TEXT_COLOR, 0, StyleRegistry.getInstance().getSimpleColor(MPSColors.darkGray)); style.set(StyleAttributes.PADDING_RIGHT, 0, new Padding(0.0, Measure.SPACES)); style.set(StyleAttributes.AUTO_DELETABLE, 0, true); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); Class attributeKind = provider.getRoleAttributeClass(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(editorContext); return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell); } else return editorCell; }
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; }
private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo( new OldNewCompositeSubstituteInfo( getEditorContext(), new SChildSubstituteInfo( editorCell, myNode, MetaAdapterFactory.getContainmentLink( 0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x63a87b9320d31b36L, 0x63a87b9320d31b94L, "fileName"), child), new DefaultChildSubstituteInfo( myNode, myContainmentLink.getDeclarationNode(), getEditorContext()))); } if (editorCell.getRole() == null) { editorCell.setRole("fileName"); } if (true) { editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.ATTRACTS_FOCUS); } }
private EditorCell createProperty_gmtuod_f2a(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.apply_MethodName(style, editorCell); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo( new CompositeSubstituteInfo( editorContext, provider.getCellContext(), new SubstituteInfoPartExt[] { new ConceptMethodDeclaration_Editor .ConceptMethodDeclaration_component_cellMenu_gmtuod_a0f2a() })); SNode attributeConcept = provider.getRoleAttribute(); Class attributeKind = provider.getRoleAttributeClass(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(editorContext); return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell); } else 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; }
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; }
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; }
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; }
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; }
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; }
private EditorCell createRefCell_tjtxbf_a0() { CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) { @Override protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) { return new DataDependencyReference_EditorBuilder_a._Inline_tjtxbf_a0a( innerCellNode, myNode); } }; provider.setRole("dataDependency"); provider.setNoTargetText("<no dataDependency>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("dataDependency"); } Style style = new StyleImpl(); new VariableNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); 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 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; }
private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo( new OldNewCompositeSubstituteInfo( getEditorContext(), new SChildSubstituteInfo( editorCell, myNode, MetaAdapterFactory.getContainmentLink( 0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x5869770da61dfe28L, 0x19bfb4173fb5241eL, "moduleRef"), child), new DefaultChildSubstituteInfo( myNode, myContainmentLink.getDeclarationNode(), getEditorContext()))); } if (editorCell.getRole() == null) { editorCell.setRole("moduleRef"); } Style style = new StyleImpl(); style.set(StyleAttributes.PUNCTUATION_RIGHT, true); editorCell.getStyle().putAll(style); }
private void installCellInfo(SNode child, EditorCell editorCell) { if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { editorCell.setSubstituteInfo( new OldNewCompositeSubstituteInfo( getEditorContext(), new SChildSubstituteInfo( editorCell, myNode, MetaAdapterFactory.getContainmentLink( 0xb401a68083254110L, 0x8fd384331ff25befL, 0x1231e32ff7a958ceL, 0x1231e32ff7a9efcdL, "createNodeQuery"), child), new DefaultChildSubstituteInfo( myNode, myContainmentLink.getDeclarationNode(), getEditorContext()))); } if (editorCell.getRole() == null) { editorCell.setRole("createNodeQuery"); } if (true) { editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.FIRST_EDITABLE_CELL); } }
private EditorCell createRefCell_d5p1uc_b0() { CellProviderWithRole provider = new RefCellCellProvider(myNode, getEditorContext()) { @Override protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) { return new AnnotationInstance_EditorBuilder_a._Inline_d5p1uc_a1a(innerCellNode, myNode); } }; provider.setRole("annotation"); provider.setNoTargetText("<no annotation>"); EditorCell editorCell; editorCell = provider.createEditorCell(getEditorContext()); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("annotation"); } Style style = new StyleImpl(); style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation"); 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 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; }
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; }
private EditorCell createRefCell_m29bq_b0(EditorContext editorContext, SNode node) { CellProviderWithRole provider = new RefCellCellProvider(node, editorContext); provider.setRole("label"); provider.setNoTargetText("<choose mapping label>"); EditorCell editorCell; provider.setAuxiliaryCellProvider( new GenerationContextOp_GetOutputByLabelAndInputAndReferenceScope_Editor ._Inline_m29bq_a1a()); editorCell = provider.createEditorCell(editorContext); if (editorCell.getRole() == null) { editorCell.setReferenceCell(true); editorCell.setRole("label"); } Style style = new StyleImpl(); jetbrains.mps.lang.generator.editor.Styles_StyleSheet.apply_mappingLabelReference( style, editorCell); editorCell.getStyle().putAll(style); editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo()); SNode attributeConcept = provider.getRoleAttribute(); Class attributeKind = provider.getRoleAttributeClass(); if (attributeConcept != null) { EditorManager manager = EditorManager.getInstanceFromContext(editorContext); return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell); } else return editorCell; }
private EditorCell createComponent_jn1wx6_a0a0(EditorContext editorContext, SNode node) { AbstractCellProvider provider = new AliasEditorComponent(node); EditorCell editorCell = provider.createEditorCell(editorContext); Style style = new StyleImpl(); RunConfigurations_StyleSheet.applyOperation(style, editorCell); editorCell.getStyle().putAll(style); return editorCell; }