package org.eclipse.uml2.diagram.csd.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.CanonicalStyle; 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.DrawerStyle; 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; import org.eclipse.uml2.diagram.common.notation.u2tnotation.U2TDiagramCanonicalStyle; import org.eclipse.uml2.diagram.common.notation.u2tnotation.U2TNotationFactory; import org.eclipse.uml2.diagram.common.view.ViewProviderUtils; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationInstanceEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationInstanceSourceEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationInstanceTargetEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationName3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationName4EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationName5EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationName6EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationName7EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.AssociationNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Class2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Class3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Class4EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassAttributesEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassClass_contentsEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassClassesEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassOperationsEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ClassStereoEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationContentsEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationStereoEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationUse2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationUseName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CollaborationUseStereoEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CommentAnnotatedElementEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CommentBodyEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.CommentEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorName3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorName4EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorName5EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorName6EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorName7EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConnectorNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConstraintConstrainedElementEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConstraintEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConstraintLanguageEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ConstraintNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Dependency2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.DependencyEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.DependencyName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.DependencyName3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.DependencyNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.ElementImportEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InstanceSpecificationEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InstanceSpecificationNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InstanceSpecificationSlotsEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InstanceSpecificationStereoEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Interface2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceAttributesEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceClassesEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceOperationsEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceRealizationEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.InterfaceStereotypeEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Operation2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.OperationEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Package2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PackageEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PackageImportsEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PackageNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PackageStereo2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Port2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Port3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortIsBehavior2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortIsBehaviorEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortName3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortProvidedEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PortRequiredEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Property2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Property3EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.Property4EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PropertyEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PropertyName2EditPart; import org.eclipse.uml2.diagram.csd.edit.parts.PropertyNameEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.SlotEditPart; import org.eclipse.uml2.diagram.csd.edit.parts.UsageEditPart; import org.eclipse.uml2.diagram.csd.part.UMLVisualIDRegistry; /** * @generated */ public class UMLViewProvider 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 PackageEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.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 = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); } else { visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint()); if (elementType != null) { if (!UMLElementTypes.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 && !UMLVisualIDRegistry.checkNodeVisualID(op.getContainerView(), domainElement, visualID)) { return false; // visual id for node EClass should match visual id from element type, or at least be substitutable for it } } else { if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) { return false; // foreign diagram } switch (visualID) { case ClassEditPart.VISUAL_ID: { if (domainElement == null) { return false; } int suggestedID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); if (visualID != suggestedID && Class3EditPart.VISUAL_ID != suggestedID && true) { return false; } break; } case Class3EditPart.VISUAL_ID: { if (domainElement == null) { return false; } int suggestedID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); if (visualID != suggestedID && ClassEditPart.VISUAL_ID != suggestedID && true) { return false; } break; } case InterfaceEditPart.VISUAL_ID: { if (domainElement == null) { return false; } int suggestedID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); if (visualID != suggestedID && Interface2EditPart.VISUAL_ID != suggestedID && true) { return false; } break; } case Interface2EditPart.VISUAL_ID: { if (domainElement == null) { return false; } int suggestedID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); if (visualID != suggestedID && InterfaceEditPart.VISUAL_ID != suggestedID && true) { return false; } break; } case CollaborationEditPart.VISUAL_ID: case InstanceSpecificationEditPart.VISUAL_ID: case ConstraintEditPart.VISUAL_ID: case CommentEditPart.VISUAL_ID: case CollaborationUse2EditPart.VISUAL_ID: case PropertyEditPart.VISUAL_ID: case OperationEditPart.VISUAL_ID: case PortEditPart.VISUAL_ID: case ElementImportEditPart.VISUAL_ID: case SlotEditPart.VISUAL_ID: case Package2EditPart.VISUAL_ID: case Property2EditPart.VISUAL_ID: case Class2EditPart.VISUAL_ID: case Property3EditPart.VISUAL_ID: case Port2EditPart.VISUAL_ID: case Port3EditPart.VISUAL_ID: case Property4EditPart.VISUAL_ID: case Operation2EditPart.VISUAL_ID: case Class4EditPart.VISUAL_ID: if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) { return false; // visual id in semantic hint should match visual id for domain element } break; default: return false; } } } return CollaborationEditPart.VISUAL_ID == visualID || ClassEditPart.VISUAL_ID == visualID || Package2EditPart.VISUAL_ID == visualID || Class3EditPart.VISUAL_ID == visualID || InterfaceEditPart.VISUAL_ID == visualID || InstanceSpecificationEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || Interface2EditPart.VISUAL_ID == visualID || CollaborationUse2EditPart.VISUAL_ID == visualID || PropertyEditPart.VISUAL_ID == visualID || Property2EditPart.VISUAL_ID == visualID || OperationEditPart.VISUAL_ID == visualID || Class2EditPart.VISUAL_ID == visualID || PortEditPart.VISUAL_ID == visualID || ElementImportEditPart.VISUAL_ID == visualID || Property3EditPart.VISUAL_ID == visualID || Port2EditPart.VISUAL_ID == visualID || Port3EditPart.VISUAL_ID == visualID || SlotEditPart.VISUAL_ID == visualID || Property4EditPart.VISUAL_ID == visualID || Operation2EditPart.VISUAL_ID == visualID || Class4EditPart.VISUAL_ID == visualID; } /** * @generated */ protected boolean provides(CreateEdgeViewOperation op) { IElementType elementType = getSemanticElementType(op.getSemanticAdapter()); if (!UMLElementTypes.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 = UMLVisualIDRegistry.getVisualID(elementTypeHint); EObject domainElement = getSemanticElement(op.getSemanticAdapter()); if (domainElement != null && visualID != UMLVisualIDRegistry.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()); U2TDiagramCanonicalStyle canonicalStyle_Package_1000 = U2TNotationFactory.eINSTANCE.createU2TDiagramCanonicalStyle(); canonicalStyle_Package_1000.setCanonical(true); canonicalStyle_Package_1000.setSyncNodes(true); canonicalStyle_Package_1000.setSyncLinks(true); diagram.getStyles().add(canonicalStyle_Package_1000); diagram.setType(PackageEditPart.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 = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement); } else { visualID = UMLVisualIDRegistry.getVisualID(semanticHint); } switch (visualID) { case CollaborationEditPart.VISUAL_ID: return createCollaboration_2005(domainElement, containerView, index, persisted, preferencesHint); case ClassEditPart.VISUAL_ID: return createClass_2006(domainElement, containerView, index, persisted, preferencesHint); case Package2EditPart.VISUAL_ID: return createPackage_2003(domainElement, containerView, index, persisted, preferencesHint); case Class3EditPart.VISUAL_ID: return createClass_2007(domainElement, containerView, index, persisted, preferencesHint); case InterfaceEditPart.VISUAL_ID: return createInterface_2009(domainElement, containerView, index, persisted, preferencesHint); case InstanceSpecificationEditPart.VISUAL_ID: return createInstanceSpecification_2011(domainElement, containerView, index, persisted, preferencesHint); case ConstraintEditPart.VISUAL_ID: return createConstraint_2012(domainElement, containerView, index, persisted, preferencesHint); case CommentEditPart.VISUAL_ID: return createComment_2013(domainElement, containerView, index, persisted, preferencesHint); case Interface2EditPart.VISUAL_ID: return createInterface_2014(domainElement, containerView, index, persisted, preferencesHint); case CollaborationUse2EditPart.VISUAL_ID: return createCollaborationUse_3002(domainElement, containerView, index, persisted, preferencesHint); case PropertyEditPart.VISUAL_ID: return createProperty_3007(domainElement, containerView, index, persisted, preferencesHint); case Property2EditPart.VISUAL_ID: return createProperty_3008(domainElement, containerView, index, persisted, preferencesHint); case OperationEditPart.VISUAL_ID: return createOperation_3009(domainElement, containerView, index, persisted, preferencesHint); case Class2EditPart.VISUAL_ID: return createClass_3010(domainElement, containerView, index, persisted, preferencesHint); case PortEditPart.VISUAL_ID: return createPort_3011(domainElement, containerView, index, persisted, preferencesHint); case ElementImportEditPart.VISUAL_ID: return createElementImport_3004(domainElement, containerView, index, persisted, preferencesHint); case Property3EditPart.VISUAL_ID: return createProperty_3014(domainElement, containerView, index, persisted, preferencesHint); case Port2EditPart.VISUAL_ID: return createPort_3016(domainElement, containerView, index, persisted, preferencesHint); case Port3EditPart.VISUAL_ID: return createPort_3017(domainElement, containerView, index, persisted, preferencesHint); case SlotEditPart.VISUAL_ID: return createSlot_3015(domainElement, containerView, index, persisted, preferencesHint); case Property4EditPart.VISUAL_ID: return createProperty_3018(domainElement, containerView, index, persisted, preferencesHint); case Operation2EditPart.VISUAL_ID: return createOperation_3019(domainElement, containerView, index, persisted, preferencesHint); case Class4EditPart.VISUAL_ID: return createClass_3020(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 (UMLVisualIDRegistry.getVisualID(elementTypeHint)) { case ConnectorEditPart.VISUAL_ID: return createConnector_4005(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); case DependencyEditPart.VISUAL_ID: return createDependency_4006(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); case InterfaceRealizationEditPart.VISUAL_ID: return createInterfaceRealization_4007(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); case UsageEditPart.VISUAL_ID: return createUsage_4008(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); case PortProvidedEditPart.VISUAL_ID: return createPortProvided_4010(containerView, index, persisted, preferencesHint); case AssociationEditPart.VISUAL_ID: return createAssociation_4011(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); case ConstraintConstrainedElementEditPart.VISUAL_ID: return createConstraintConstrainedElement_4012(containerView, index, persisted, preferencesHint); case PortRequiredEditPart.VISUAL_ID: return createPortRequired_4014(containerView, index, persisted, preferencesHint); case AssociationInstanceEditPart.VISUAL_ID: return createSlot_4015(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); case CommentAnnotatedElementEditPart.VISUAL_ID: return createCommentAnnotatedElement_4016(containerView, index, persisted, preferencesHint); case Dependency2EditPart.VISUAL_ID: return createDependency_4017(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); } // can never happen, provided #provides(CreateEdgeViewOperation) is correct return null; } /** * @generated */ public Node createCollaboration_2005(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(UMLVisualIDRegistry.getType(CollaborationEditPart.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 label5009 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationNameEditPart.VISUAL_ID)); Node label5030 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationStereoEditPart.VISUAL_ID)); Node compartment7003 = createCompartment(node, UMLVisualIDRegistry.getType(CollaborationContentsEditPart.VISUAL_ID), false, false, false, false); CanonicalStyle canonicalStyle_CollaborationContents_7003 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_CollaborationContents_7003.setCanonical(true); compartment7003.getStyles().add(canonicalStyle_CollaborationContents_7003); return node; } /** * @generated */ public Node createClass_2006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); CanonicalStyle canonicalStyle_Class_2006 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_Class_2006.setCanonical(true); node.getStyles().add(canonicalStyle_Class_2006); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(ClassEditPart.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 label5013 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID)); Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ClassStereoEditPart.VISUAL_ID)); Node compartment7004 = createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributesEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_ClassAttributes_7004 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_ClassAttributes_7004.setCanonical(true); compartment7004.getStyles().add(canonicalStyle_ClassAttributes_7004); Node compartment7005 = createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationsEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_ClassOperations_7005 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_ClassOperations_7005.setCanonical(true); compartment7005.getStyles().add(canonicalStyle_ClassOperations_7005); Node compartment7006 = createCompartment(node, UMLVisualIDRegistry.getType(ClassClassesEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_ClassClasses_7006 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_ClassClasses_7006.setCanonical(true); compartment7006.getStyles().add(canonicalStyle_ClassClasses_7006); return node; } /** * @generated */ public Node createPackage_2003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(Package2EditPart.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 label5006 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID)); Node label5033 = createLabel(node, UMLVisualIDRegistry.getType(PackageStereo2EditPart.VISUAL_ID)); Node compartment7002 = createCompartment(node, UMLVisualIDRegistry.getType(PackageImportsEditPart.VISUAL_ID), true, false, true, true); CanonicalStyle canonicalStyle_PackageImports_7002 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_PackageImports_7002.setCanonical(true); compartment7002.getStyles().add(canonicalStyle_PackageImports_7002); DrawerStyle drawerStyle = (DrawerStyle) compartment7002.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); if (drawerStyle != null) { //#216573 [SecondaryDiagramElement] Collapse imports compartment after creation drawerStyle.setCollapsed(true); } return node; } /** * @generated */ public Node createClass_2007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); CanonicalStyle canonicalStyle_Class_2007 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_Class_2007.setCanonical(true); node.getStyles().add(canonicalStyle_Class_2007); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(Class3EditPart.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 label5018 = createLabel(node, UMLVisualIDRegistry.getType(ClassName2EditPart.VISUAL_ID)); Node compartment7007 = createCompartment(node, UMLVisualIDRegistry.getType(ClassClass_contentsEditPart.VISUAL_ID), false, false, false, false); CanonicalStyle canonicalStyle_ClassArtifactFigure_contents_7007 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_ClassArtifactFigure_contents_7007.setCanonical(true); compartment7007.getStyles().add(canonicalStyle_ClassArtifactFigure_contents_7007); return node; } /** * @generated */ public Node createInterface_2009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(InterfaceEditPart.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 label5020 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID)); label5020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location5020 = (Location) label5020.getLayoutConstraint(); location5020.setX(0); location5020.setY(5); return node; } /** * @generated */ public Node createInstanceSpecification_2011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.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 label5022 = createLabel(node, UMLVisualIDRegistry.getType(InstanceSpecificationNameEditPart.VISUAL_ID)); Node label5031 = createLabel(node, UMLVisualIDRegistry.getType(InstanceSpecificationStereoEditPart.VISUAL_ID)); Node compartment7009 = createCompartment(node, UMLVisualIDRegistry.getType(InstanceSpecificationSlotsEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_InstanceSpecificationSlots_7009 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_InstanceSpecificationSlots_7009.setCanonical(true); compartment7009.getStyles().add(canonicalStyle_InstanceSpecificationSlots_7009); return node; } /** * @generated */ public Node createConstraint_2012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(ConstraintEditPart.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 label5024 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID)); Node label5034 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintLanguageEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createComment_2013Gen(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(CommentEditPart.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 label5032 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID)); return node; } /** * @generated NOT */ public Node createComment_2013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = createComment_2013Gen(domainElement, containerView, index, persisted, preferencesHint); ViewProviderUtils.initializeCommentColor(node, preferencesHint); return node; } /** * @generated */ public Node createInterface_2014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(Interface2EditPart.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 label5035 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceName2EditPart.VISUAL_ID)); Node label5036 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceStereotypeEditPart.VISUAL_ID)); Node compartment7010 = createCompartment(node, UMLVisualIDRegistry.getType(InterfaceAttributesEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_InterfaceAttributes_7010 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_InterfaceAttributes_7010.setCanonical(true); compartment7010.getStyles().add(canonicalStyle_InterfaceAttributes_7010); Node compartment7011 = createCompartment(node, UMLVisualIDRegistry.getType(InterfaceOperationsEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_InterfaceOperations_7011 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_InterfaceOperations_7011.setCanonical(true); compartment7011.getStyles().add(canonicalStyle_InterfaceOperations_7011); Node compartment7012 = createCompartment(node, UMLVisualIDRegistry.getType(InterfaceClassesEditPart.VISUAL_ID), true, true, true, true); CanonicalStyle canonicalStyle_InterfaceClasses_7012 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_InterfaceClasses_7012.setCanonical(true); compartment7012.getStyles().add(canonicalStyle_InterfaceClasses_7012); return node; } /** * @generated */ public Node createCollaborationUse_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(CollaborationUse2EditPart.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, UMLVisualIDRegistry.getType(CollaborationUseName2EditPart.VISUAL_ID)); Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationUseStereoEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createProperty_3007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(PropertyEditPart.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, UMLVisualIDRegistry.getType(PropertyNameEditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createProperty_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createOperation_3009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createClass_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createPort_3011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle()); node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); node.getStyles().add(NotationFactory.eINSTANCE.createFillStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); 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 label5012 = createLabel(node, UMLVisualIDRegistry.getType(PortNameEditPart.VISUAL_ID)); label5012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location5012 = (Location) label5012.getLayoutConstraint(); location5012.setX(0); location5012.setY(5); Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(PortIsBehaviorEditPart.VISUAL_ID)); label5026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location5026 = (Location) label5026.getLayoutConstraint(); location5026.setX(0); location5026.setY(5); return node; } /** * @generated */ public Node createElementImport_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(ElementImportEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createProperty_3014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Shape node = NotationFactory.eINSTANCE.createShape(); CanonicalStyle canonicalStyle_Property_3014 = NotationFactory.eINSTANCE.createCanonicalStyle(); canonicalStyle_Property_3014.setCanonical(true); node.getStyles().add(canonicalStyle_Property_3014); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(Property3EditPart.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, UMLVisualIDRegistry.getType(PropertyName2EditPart.VISUAL_ID)); return node; } /** * @generated */ public Node createPort_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle()); node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); node.getStyles().add(NotationFactory.eINSTANCE.createFillStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(Port2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); 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, UMLVisualIDRegistry.getType(PortName2EditPart.VISUAL_ID)); label5025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location5025 = (Location) label5025.getLayoutConstraint(); location5025.setX(0); location5025.setY(5); return node; } /** * @generated */ public Node createPort_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle()); node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); node.getStyles().add(NotationFactory.eINSTANCE.createFillStyle()); node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); node.setType(UMLVisualIDRegistry.getType(Port3EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); // initializeFromPreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); 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, UMLVisualIDRegistry.getType(PortName3EditPart.VISUAL_ID)); label5027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location5027 = (Location) label5027.getLayoutConstraint(); location5027.setX(0); location5027.setY(5); Node label5028 = createLabel(node, UMLVisualIDRegistry.getType(PortIsBehavior2EditPart.VISUAL_ID)); label5028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location5028 = (Location) label5028.getLayoutConstraint(); location5028.setX(0); location5028.setY(5); return node; } /** * @generated */ public Node createSlot_3015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(SlotEditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createProperty_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createOperation_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Node createClass_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Node node = NotationFactory.eINSTANCE.createNode(); node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); node.setType(UMLVisualIDRegistry.getType(Class4EditPart.VISUAL_ID)); ViewUtil.insertChildView(containerView, node, index, persisted); node.setElement(domainElement); return node; } /** * @generated */ public Edge createConnector_4005(EObject domainElement, 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(UMLVisualIDRegistry.getType(ConnectorEditPart.VISUAL_ID)); edge.setElement(domainElement); // 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 label6009 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorNameEditPart.VISUAL_ID)); label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6009 = (Location) label6009.getLayoutConstraint(); location6009.setX(0); location6009.setY(20); Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorName2EditPart.VISUAL_ID)); label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6010 = (Location) label6010.getLayoutConstraint(); location6010.setX(0); location6010.setY(-15); Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorName3EditPart.VISUAL_ID)); label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6011 = (Location) label6011.getLayoutConstraint(); location6011.setX(0); location6011.setY(-15); Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorName4EditPart.VISUAL_ID)); label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6012 = (Location) label6012.getLayoutConstraint(); location6012.setX(0); location6012.setY(-30); Node label6013 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorName5EditPart.VISUAL_ID)); label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6013 = (Location) label6013.getLayoutConstraint(); location6013.setX(0); location6013.setY(-30); Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorName6EditPart.VISUAL_ID)); label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6014 = (Location) label6014.getLayoutConstraint(); location6014.setX(0); location6014.setY(15); Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorName7EditPart.VISUAL_ID)); label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6015 = (Location) label6015.getLayoutConstraint(); location6015.setX(0); location6015.setY(15); return edge; } /** * @generated */ public Edge createDependency_4006(EObject domainElement, 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(UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID)); edge.setElement(domainElement); // 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, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID)); label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6001 = (Location) label6001.getLayoutConstraint(); location6001.setX(0); location6001.setY(40); return edge; } /** * @generated */ public Edge createInterfaceRealization_4007(EObject domainElement, 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(UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID)); edge.setElement(domainElement); // 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); } return edge; } /** * @generated */ public Edge createUsage_4008(EObject domainElement, 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(UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID)); edge.setElement(domainElement); // 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); } return edge; } /** * @generated */ public Edge createPortProvided_4010(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(UMLVisualIDRegistry.getType(PortProvidedEditPart.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); } return edge; } /** * @generated */ public Edge createAssociation_4011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Edge edge = NotationFactory.eINSTANCE.createEdge(); edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); 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(UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID)); edge.setElement(domainElement); // initializePreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); 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, UMLVisualIDRegistry.getType(AssociationNameEditPart.VISUAL_ID)); label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6002 = (Location) label6002.getLayoutConstraint(); location6002.setX(0); location6002.setY(20); Node label6003 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationName2EditPart.VISUAL_ID)); label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6003 = (Location) label6003.getLayoutConstraint(); location6003.setX(0); location6003.setY(-15); Node label6004 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationName3EditPart.VISUAL_ID)); label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6004 = (Location) label6004.getLayoutConstraint(); location6004.setX(0); location6004.setY(-15); Node label6005 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationName4EditPart.VISUAL_ID)); label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6005 = (Location) label6005.getLayoutConstraint(); location6005.setX(0); location6005.setY(-30); Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationName5EditPart.VISUAL_ID)); label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6006 = (Location) label6006.getLayoutConstraint(); location6006.setX(0); location6006.setY(-30); Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationName6EditPart.VISUAL_ID)); label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6007 = (Location) label6007.getLayoutConstraint(); location6007.setX(0); location6007.setY(15); Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationName7EditPart.VISUAL_ID)); label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6008 = (Location) label6008.getLayoutConstraint(); location6008.setX(0); location6008.setY(15); return edge; } /** * @generated */ public Edge createConstraintConstrainedElement_4012(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(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.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); } return edge; } /** * @generated */ public Edge createPortRequired_4014(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(UMLVisualIDRegistry.getType(PortRequiredEditPart.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); } return edge; } /** * @generated */ public Edge createSlot_4015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Edge edge = NotationFactory.eINSTANCE.createEdge(); edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); 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(UMLVisualIDRegistry.getType(AssociationInstanceEditPart.VISUAL_ID)); edge.setElement(domainElement); // initializePreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); 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 label6016 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationInstanceSourceEditPart.VISUAL_ID)); label6016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6016 = (Location) label6016.getLayoutConstraint(); location6016.setX(0); location6016.setY(20); Node label6017 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationInstanceTargetEditPart.VISUAL_ID)); label6017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6017 = (Location) label6017.getLayoutConstraint(); location6017.setX(0); location6017.setY(-15); return edge; } /** * @generated */ public Edge createCommentAnnotatedElement_4016(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(UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.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); } return edge; } /** * @generated */ public Edge createDependency_4017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { Edge edge = NotationFactory.eINSTANCE.createEdge(); edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); 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(UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID)); edge.setElement(domainElement); // initializePreferences final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); 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 label6018 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyName2EditPart.VISUAL_ID)); label6018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6018 = (Location) label6018.getLayoutConstraint(); location6018.setX(0); location6018.setY(40); Node label6019 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyName3EditPart.VISUAL_ID)); label6019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); Location location6019 = (Location) label6019.getLayoutConstraint(); location6019.setX(0); location6019.setY(20); return edge; } /** * @generated */ private void stampShortcut(View containerView, Node target) { if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.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); } }