/* * */ package stateAnalysis.diagram.providers; import java.util.ArrayList; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.emf.ecore.EAnnotation; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EcoreFactory; import org.eclipse.emf.transaction.util.TransactionUtil; import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; import org.eclipse.gmf.runtime.common.core.service.IOperation; import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider; import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation; import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation; import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation; import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation; import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants; import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.IHintedType; import org.eclipse.gmf.runtime.notation.Connector; import org.eclipse.gmf.runtime.notation.DecorationNode; import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.Edge; import org.eclipse.gmf.runtime.notation.FontStyle; import org.eclipse.gmf.runtime.notation.Location; import org.eclipse.gmf.runtime.notation.MeasurementUnit; import org.eclipse.gmf.runtime.notation.Node; import org.eclipse.gmf.runtime.notation.NotationFactory; import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.RelativeBendpoints; import org.eclipse.gmf.runtime.notation.Routing; import org.eclipse.gmf.runtime.notation.Shape; import org.eclipse.gmf.runtime.notation.TitleStyle; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.FontData; /** * @generated */ public class StateAnalysisViewProvider extends AbstractProvider implements IViewProvider { /** * @generated */ public final boolean provides(IOperation operation) { if (operation instanceof CreateViewForKindOperation) { return provides((CreateViewForKindOperation) operation); } assert operation instanceof CreateViewOperation; if (operation instanceof CreateDiagramViewOperation) { return provides((CreateDiagramViewOperation) operation); } else if (operation instanceof CreateEdgeViewOperation) { return provides((CreateEdgeViewOperation) operation); } else if (operation instanceof CreateNodeViewOperation) { return provides((CreateNodeViewOperation) operation); } return false; } /** * @generated */ protected boolean provides(CreateViewForKindOperation op) { /* if (op.getViewKind() == Node.class) return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null; if (op.getViewKind() == Edge.class) return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null; */ return true; } /** * @generated */ protected boolean provides(CreateDiagramViewOperation op) { return stateAnalysis.diagram.edit.parts.SystemEditPart.MODEL_ID .equals(op.getSemanticHint()) && stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getDiagramVisualID(getSemanticElement(op .getSemanticAdapter())) != -1; } /** * @generated */ protected boolean provides(CreateNodeViewOperation op) { if (op.getContainerView() == null) { return false; } IElementType elementType = getSemanticElementType(op .getSemanticAdapter()); EObject domainElement = getSemanticElement(op.getSemanticAdapter()); int visualID; if (op.getSemanticHint() == null) { // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy. // In this situation there should be NO elementType, visualID will be determined // by VisualIDRegistry.getNodeVisualID() for domainElement. if (elementType != null || domainElement == null) { return false; } visualID = stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getNodeVisualID(op.getContainerView(), domainElement); } else { visualID = stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getVisualID(op.getSemanticHint()); if (elementType != null) { if (!stateAnalysis.diagram.providers.StateAnalysisElementTypes .isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { return false; // foreign element type } String elementTypeHint = ((IHintedType) elementType) .getSemanticHint(); if (!op.getSemanticHint().equals(elementTypeHint)) { return false; // if semantic hint is specified it should be the same as in element type } if (domainElement != null && visualID != stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getNodeVisualID(op.getContainerView(), domainElement)) { return false; // visual id for node EClass should match visual id from element type } } else { if (!stateAnalysis.diagram.edit.parts.SystemEditPart.MODEL_ID .equals(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getModelID(op.getContainerView()))) { return false; // foreign diagram } switch (visualID) { case stateAnalysis.diagram.edit.parts.SubsystemEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DeploymentSetEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DeploymentEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateVariableEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateConstraintEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateUpdateEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.HardwareCommandEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.HardwareMeasurementEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.HardwareAdapterEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DeviceEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DeviceCommandEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DeviceMeasurementEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DataCollectionEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.QosPolicyEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.DataProductEditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateConstraint2EditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateConstraint3EditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateConstraint4EditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.StateUpdate2EditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.HardwareCommand2EditPart.VISUAL_ID: case stateAnalysis.diagram.edit.parts.HardwareMeasurement2EditPart.VISUAL_ID: if (domainElement == null || visualID != stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getNodeVisualID(op.getContainerView(), domainElement)) { return false; // visual id in semantic hint should match visual id for domain element } break; default: return false; } } } return stateAnalysis.diagram.edit.parts.SubsystemEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DeploymentSetEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DeploymentEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateVariableEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateConstraintEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateConstraint2EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateUpdateEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateConstraint3EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.HardwareCommandEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateConstraint4EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.StateUpdate2EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.HardwareMeasurementEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.HardwareAdapterEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.HardwareCommand2EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.HardwareMeasurement2EditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DeviceEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DeviceCommandEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DeviceMeasurementEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DataCollectionEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.QosPolicyEditPart.VISUAL_ID == visualID || stateAnalysis.diagram.edit.parts.DataProductEditPart.VISUAL_ID == visualID; } /** * @generated */ protected boolean provides(CreateEdgeViewOperation op) { IElementType elementType = getSemanticElementType(op .getSemanticAdapter()); if (!stateAnalysis.diagram.providers.StateAnalysisElementTypes .isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { return false; // foreign element type } String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op .getSemanticHint()))) { return false; // our hint is visual id and must be specified, and it should be the same as in element type } int visualID = stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getVisualID(elementTypeHint); EObject domainElement = getSemanticElement(op.getSemanticAdapter()); if (domainElement != null && visualID != stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getLinkWithClassVisualID(domainElement)) { return false; // visual id for link EClass should match visual id from element type } return true; } /** * @generated */ public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) { Diagram diagram = NotationFactory.eINSTANCE.createDiagram(); diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle()); diagram.setType(stateAnalysis.diagram.edit.parts.SystemEditPart.MODEL_ID); diagram.setElement(getSemanticElement(semanticAdapter)); diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL); return diagram; } /** * @generated */ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { final EObject domainElement = getSemanticElement(semanticAdapter); final int visualID; if (semanticHint == null) { visualID = stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getNodeVisualID(containerView, domainElement); } else { visualID = stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getVisualID(semanticHint); } switch (visualID) { case stateAnalysis.diagram.edit.parts.SubsystemEditPart.VISUAL_ID: return createSubsystem_2001(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DeploymentSetEditPart.VISUAL_ID: return createDeploymentSet_3001(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DeploymentEditPart.VISUAL_ID: return createDeployment_3002(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateVariableEditPart.VISUAL_ID: return createStateVariable_3027(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID: return createStateVariable_3011(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateConstraintEditPart.VISUAL_ID: return createStateConstraint_3008(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateConstraint2EditPart.VISUAL_ID: return createStateConstraint_3009(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateUpdateEditPart.VISUAL_ID: return createStateUpdate_3010(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID: return createController_3028(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateConstraint3EditPart.VISUAL_ID: return createStateConstraint_3013(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.HardwareCommandEditPart.VISUAL_ID: return createHardwareCommand_3014(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID: return createEstimator_3029(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateConstraint4EditPart.VISUAL_ID: return createStateConstraint_3016(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.StateUpdate2EditPart.VISUAL_ID: return createStateUpdate_3017(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.HardwareMeasurementEditPart.VISUAL_ID: return createHardwareMeasurement_3018(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.HardwareAdapterEditPart.VISUAL_ID: return createHardwareAdapter_3030(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.HardwareCommand2EditPart.VISUAL_ID: return createHardwareCommand_3020(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.HardwareMeasurement2EditPart.VISUAL_ID: return createHardwareMeasurement_3021(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DeviceEditPart.VISUAL_ID: return createDevice_3024(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DeviceCommandEditPart.VISUAL_ID: return createDeviceCommand_3025(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DeviceMeasurementEditPart.VISUAL_ID: return createDeviceMeasurement_3026(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DataCollectionEditPart.VISUAL_ID: return createDataCollection_3004(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.QosPolicyEditPart.VISUAL_ID: return createQosPolicy_3005(domainElement, containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.DataProductEditPart.VISUAL_ID: return createDataProduct_3006(domainElement, containerView, index, persisted, preferencesHint); } // can't happen, provided #provides(CreateNodeViewOperation) is correct return null; } /** * @generated */ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { IElementType elementType = getSemanticElementType(semanticAdapter); String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); switch (stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getVisualID(elementTypeHint)) { case stateAnalysis.diagram.edit.parts.ControllerDelegatesEditPart.VISUAL_ID: return createControllerDelegates_4001(containerView, index, persisted, preferencesHint); case stateAnalysis.diagram.edit.parts.EstimatorDistilledMeasurementsEditPart.VISUAL_ID: return createEstimatorDistilledMeasurements_4002(containerView, index, persisted, preferencesHint); } // can never happen, provided #provides(CreateEdgeViewOperation) is correct return null; } /** * @generated */ public Node createSubsystem_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.SubsystemEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); stampShortcut(containerView, node); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5001 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.SubsystemNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.SubsystemSubsystemDeploymentSetsCompartmentEditPart.VISUAL_ID), true, false, false, false); return node; } /** * @generated */ public Node createDeploymentSet_3001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentSetEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5002 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentSetNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentSetDeploymentSetDeploymentsCompartmentEditPart.VISUAL_ID), true, false, false, false); return node; } /** * @generated */ public Node createDeployment_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5003 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentDeploymentComponentsCompartmentEditPart.VISUAL_ID), true, false, false, false); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeploymentDeploymentCatalogsCompartmentEditPart.VISUAL_ID), true, false, false, false); return node; } /** * @generated */ public Node createStateVariable_3027(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5028 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableInStateConstraintsCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableOutStateConstraintsCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableStateUpdatesCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableInfluencedByCompartmentEditPart.VISUAL_ID), true, false, true, true); return node; } /** * @generated */ public Node createStateConstraint_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraintEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5008 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraintNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createStateConstraint_3009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraint2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5009 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraintName2EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createStateUpdate_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateUpdateEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5010 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateUpdateNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createController_3028(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5029 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.ControllerNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.ControllerControllerStateConstraintCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.ControllerControllerHardwareCommandCompartmentEditPart.VISUAL_ID), true, false, true, true); return node; } /** * @generated */ public Node createStateVariable_3011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5011 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableName2EditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableInStateConstraintsCompartment2EditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableOutStateConstraintsCompartment2EditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableStateUpdatesCompartment2EditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateVariableStateVariableInfluencedByCompartment2EditPart.VISUAL_ID), true, false, true, true); return node; } /** * @generated */ public Node createStateConstraint_3013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraint3EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5013 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraintName3EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createHardwareCommand_3014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareCommandEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5014 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareCommandNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createEstimator_3029(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5030 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorEstimatorStateConstraintsCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorEstimatorStateUpdatesCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorEstimatorHardwareMeasurementCompartmentEditPart.VISUAL_ID), true, false, true, true); return node; } /** * @generated */ public Node createStateConstraint_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraint4EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5016 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateConstraintName4EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createStateUpdate_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateUpdate2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5017 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.StateUpdateName2EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createHardwareMeasurement_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareMeasurementEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5018 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareMeasurementNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createHardwareAdapter_3030(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareAdapterEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5031 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareAdapterNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareAdapterHardwareAdapterHardwareCommandsCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareAdapterHardwareAdapterHardwareMeasurementsCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareAdapterHardwareAdapterDevicesCompartmentEditPart.VISUAL_ID), true, false, false, false); return node; } /** * @generated */ public Node createHardwareCommand_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareCommand2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5020 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareCommandName2EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createHardwareMeasurement_3021(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareMeasurement2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5021 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.HardwareMeasurementName2EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createDevice_3024(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5027 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceDeviceDeviceCommandsCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceDeviceDeviceMeasurementsCompartmentEditPart.VISUAL_ID), true, false, true, true); return node; } /** * @generated */ public Node createDeviceCommand_3025(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceCommandEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5025 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceCommandNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createDeviceMeasurement_3026(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceMeasurementEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5026 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DeviceMeasurementNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createDataCollection_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.getStyles().add( NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DataCollectionEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5007 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DataCollectionNameEditPart.VISUAL_ID)); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DataCollectionDataCollectionPoliciesCompartmentEditPart.VISUAL_ID), true, false, true, true); createCompartment( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DataCollectionDataCollectionProductsCompartmentEditPart.VISUAL_ID), true, false, true, true); return node; } /** * @generated */ public Node createQosPolicy_3005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.QosPolicyEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5005 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.QosPolicyNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createDataProduct_3006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DataProductEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle nodeFontStyle = (FontStyle) node .getStyle(NotationPackage.Literals.FONT_STYLE); if (nodeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); nodeFontStyle.setFontName(fontData.getName()); nodeFontStyle.setFontHeight(fontData.getHeight()); nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_FILL_COLOR); ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); Node label5006 = createLabel( node, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.DataProductNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Edge createControllerDelegates_4001(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Connector edge = NotationFactory.eINSTANCE.createConnector(); edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); RelativeBendpoints bendpoints = NotationFactory.eINSTANCE .createRelativeBendpoints(); ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>( 2); points.add(new RelativeBendpoint()); points.add(new RelativeBendpoint()); bendpoints.setPoints(points); edge.setBendpoints(bendpoints); ViewUtil.insertChildView(containerView, edge, index, persisted); edge.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.ControllerDelegatesEditPart.VISUAL_ID)); edge.setElement(null); // initializePreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle edgeFontStyle = (FontStyle) edge .getStyle(NotationPackage.Literals.FONT_STYLE); if (edgeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); edgeFontStyle.setFontName(fontData.getName()); edgeFontStyle.setFontHeight(fontData.getHeight()); edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } Routing routing = Routing.get(prefStore .getInt(IPreferenceConstants.PREF_LINE_STYLE)); if (routing != null) { ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); } Node label6001 = createLabel( edge, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.ControllerDelegatesExternalLabelEditPart.VISUAL_ID)); label6001.getStyles().add( NotationFactory.eINSTANCE.createDescriptionStyle()); label6001.setLayoutConstraint(NotationFactory.eINSTANCE .createLocation()); Location location6001 = (Location) label6001.getLayoutConstraint(); location6001.setX(0); location6001.setY(40); return edge; } /** * @generated */ public Edge createEstimatorDistilledMeasurements_4002(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Connector edge = NotationFactory.eINSTANCE.createConnector(); edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); RelativeBendpoints bendpoints = NotationFactory.eINSTANCE .createRelativeBendpoints(); ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>( 2); points.add(new RelativeBendpoint()); points.add(new RelativeBendpoint()); bendpoints.setPoints(points); edge.setBendpoints(bendpoints); ViewUtil.insertChildView(containerView, edge, index, persisted); edge.setType(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorDistilledMeasurementsEditPart.VISUAL_ID)); edge.setElement(null); // initializePreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint .getPreferenceStore(); org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( prefStore, IPreferenceConstants.PREF_LINE_COLOR); ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); FontStyle edgeFontStyle = (FontStyle) edge .getStyle(NotationPackage.Literals.FONT_STYLE); if (edgeFontStyle != null) { FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT); edgeFontStyle.setFontName(fontData.getName()); edgeFontStyle.setFontHeight(fontData.getHeight()); edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) .intValue()); } Routing routing = Routing.get(prefStore .getInt(IPreferenceConstants.PREF_LINE_STYLE)); if (routing != null) { ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); } Node label6002 = createLabel( edge, stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getType(stateAnalysis.diagram.edit.parts.EstimatorDistilledMeasurementsExternalLabelEditPart.VISUAL_ID)); label6002.getStyles().add( NotationFactory.eINSTANCE.createDescriptionStyle()); label6002.setLayoutConstraint(NotationFactory.eINSTANCE .createLocation()); Location location6002 = (Location) label6002.getLayoutConstraint(); location6002.setX(0); location6002.setY(40); return edge; } /** * @generated */ private void stampShortcut(View containerView, Node target) { if (!stateAnalysis.diagram.edit.parts.SystemEditPart.MODEL_ID .equals(stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry .getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE .createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation .getDetails() .put("modelID", stateAnalysis.diagram.edit.parts.SystemEditPart.MODEL_ID); //$NON-NLS-1$ target.getEAnnotations().add(shortcutAnnotation); } } /** * @generated */ private Node createLabel(View owner, String hint) { DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode(); rv.setType(hint); ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); return rv; } /** * @generated */ private Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) { //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment(); //rv.setShowTitle(showTitle); //rv.setCollapsed(isCollapsed); Node rv; if (canCollapse) { rv = NotationFactory.eINSTANCE.createBasicCompartment(); } else { rv = NotationFactory.eINSTANCE.createDecorationNode(); } if (hasTitle) { TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle(); ts.setShowTitle(true); rv.getStyles().add(ts); } if (canSort) { rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle()); } if (canFilter) { rv.getStyles() .add(NotationFactory.eINSTANCE.createFilteringStyle()); } rv.setType(hint); ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); return rv; } /** * @generated */ private EObject getSemanticElement(IAdaptable semanticAdapter) { if (semanticAdapter == null) { return null; } EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class); if (eObject != null) { return EMFCoreUtil.resolve( TransactionUtil.getEditingDomain(eObject), eObject); } return null; } /** * @generated */ private IElementType getSemanticElementType(IAdaptable semanticAdapter) { if (semanticAdapter == null) { return null; } return (IElementType) semanticAdapter.getAdapter(IElementType.class); } }