/** @generated */ public static LinkConstraints getLinkConstraints() { LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints(); if (cached == null) { UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints()); } return cached; }
/** @generated */ protected NodeFigure createNodePlate() { String prefElementId = "Classifier"; IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey( getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH); String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey( getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT); DefaultSizeNodeFigure result = new DefaultSizeNodeFigure( store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); return result; }
/** @generated */ public boolean canExistAssociation_4011( Package container, Association linkInstance, Type source, Type target) { try { if ((source instanceof Class) || (source instanceof Component) || (source instanceof Actor) || (source instanceof UseCase)) { if ((target instanceof Class) || (target instanceof Component) || (target instanceof Actor) || (target instanceof UseCase)) { if ((source instanceof UseCase) && (target instanceof UseCase)) { return (Collections.disjoint( ((UseCase) source).getSubjects(), ((UseCase) target).getSubjects())); } return true; } } else { return false; } if ((source instanceof Class) || (source instanceof Component) || (source instanceof Actor) || (source instanceof UseCase)) { if ((target instanceof Class) || (target instanceof Component) || (target instanceof Actor) || (target instanceof UseCase)) { if ((source instanceof UseCase) && (target instanceof UseCase)) { return (Collections.disjoint( ((UseCase) source).getSubjects(), ((UseCase) target).getSubjects())); } return true; } } else { return false; } return true; } catch (Exception e) { UMLDiagramEditorPlugin.getInstance() .logError("Link constraint evaluation error", e); // $NON-NLS-1$ return false; } }
/** @generated */ public boolean canExistDependency_4013( Package container, Dependency linkInstance, NamedElement source, NamedElement target) { try { if (target == null) { return true; } else { Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap( "oppositeEnd", UMLPackage.eINSTANCE.getNamedElement()); // $NON-NLS-1$ Object targetVal = UMLOCLFactory.getExpression(17, UMLPackage.eINSTANCE.getNamedElement(), env) .evaluate(target, Collections.singletonMap("oppositeEnd", source)); // $NON-NLS-1$ if (false == targetVal instanceof Boolean || !((Boolean) targetVal).booleanValue()) { return false; } // else fall-through } return true; } catch (Exception e) { UMLDiagramEditorPlugin.getInstance() .logError("Link constraint evaluation error", e); // $NON-NLS-1$ return false; } }
/** @generated */ public boolean canExistGeneralization_4010( Classifier container, Generalization linkInstance, Classifier source, Classifier target) { try { if (source == null) { return true; } else { Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap( "oppositeEnd", UMLPackage.eINSTANCE.getClassifier()); // $NON-NLS-1$ Object sourceVal = UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getClassifier(), env) .evaluate(source, Collections.singletonMap("oppositeEnd", target)); // $NON-NLS-1$ if (false == sourceVal instanceof Boolean || !((Boolean) sourceVal).booleanValue()) { return false; } // else fall-through } if (target == null) { return true; } else { Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap( "oppositeEnd", UMLPackage.eINSTANCE.getClassifier()); // $NON-NLS-1$ Object targetVal = UMLOCLFactory.getExpression(11, UMLPackage.eINSTANCE.getClassifier(), env) .evaluate(target, Collections.singletonMap("oppositeEnd", source)); // $NON-NLS-1$ if (false == targetVal instanceof Boolean || !((Boolean) targetVal).booleanValue()) { return false; } // else fall-through } return true; } catch (Exception e) { UMLDiagramEditorPlugin.getInstance() .logError("Link constraint evaluation error", e); // $NON-NLS-1$ return false; } }
/** @generated */ public DiagramGeneralPreferencePage() { setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore()); setPreferenceKey(UseCaseDiagramEditPart.MODEL_ID); }
/** @generated */ public DiagramPrintingPreferencePage() { setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore()); }