Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java317
1 files changed, 193 insertions, 124 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 31f48216e10..e6938b9c0db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -1,13 +1,13 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.policies;
@@ -106,14 +106,12 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
-
/**
* Extended request data key to hold the edge view during a reconnect request.
*
* @generated
*/
public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
-
/**
* @generated
*/
@@ -135,10 +133,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* Add the reoriented view to the request extended data so that the view
* currently edited can be distinguished from other views of the same element
* and these latter possibly removed if they become inconsistent after reconnect
- *
+ *
* @generated
*/
- @Override
@SuppressWarnings("unchecked")
public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
@@ -164,7 +161,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- @Override
protected Command getSemanticCommand(IEditCommandRequest request) {
IEditCommandRequest completedRequest = completeRequest(request);
Command semanticCommand = getSemanticCommandSwitch(completedRequest);
@@ -189,8 +185,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
if (editPolicyCommand != null) {
- ICommand command = editPolicyCommand instanceof ICommandProxy
- ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
}
IElementType requestContextElementType = getContextElementType(request);
@@ -276,7 +271,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return null;
}
- // RS: End of add code for extended types
+
/**
* @generated
*/
@@ -371,14 +366,14 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
for (Iterator<?> it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
View nextView = (View) it.next();
- if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() //$NON-NLS-1$
- || nextView.getElement() != view.getElement()) {
+ if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
continue;
}
cmd.add(new DeleteCommand(getEditingDomain(), nextView));
}
}
+
/**
* @generated
*/
@@ -411,155 +406,195 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateAssociationClass_Edge(Package container, Type source, Type target) {
- return canExistAssociationClass_Edge(container, null, source, target);
+ public boolean canCreateAssociationClass_Edge(
+ Package container, Type source, Type target) {
+ return canExistAssociationClass_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateAssociation_Edge(Package container, Type source, Type target) {
- return canExistAssociation_Edge(container, null, source, target);
+ public boolean canCreateAssociation_Edge(
+ Package container, Type source, Type target) {
+ return canExistAssociation_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateAssociation_BranchEdge(Package container, Type source, Type target) {
- return canExistAssociation_BranchEdge(container, null, source, target);
+ public boolean canCreateAssociation_BranchEdge(
+ Package container, Type source, Type target) {
+ return canExistAssociation_BranchEdge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateGeneralization_Edge(Classifier source, Classifier target) {
- return canExistGeneralization_Edge(null, source, target);
+ public boolean canCreateGeneralization_Edge(
+ Classifier source, Classifier target) {
+ return canExistGeneralization_Edge(
+ null, source, target);
}
/**
* @generated
*/
- public boolean canCreateInterfaceRealization_Edge(BehavioredClassifier source, Interface target) {
- return canExistInterfaceRealization_Edge(null, source, target);
+ public boolean canCreateInterfaceRealization_Edge(
+ BehavioredClassifier source, Interface target) {
+ return canExistInterfaceRealization_Edge(
+ null, source, target);
}
/**
* @generated
*/
- public boolean canCreateSubstitution_Edge(Classifier container, Classifier source, Classifier target) {
- return canExistSubstitution_Edge(container, null, source, target);
+ public boolean canCreateSubstitution_Edge(
+ Classifier container, Classifier source, Classifier target) {
+ return canExistSubstitution_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateRealization_Edge(Package container, NamedElement source, NamedElement target) {
- return canExistRealization_Edge(container, null, source, target);
+ public boolean canCreateRealization_Edge(
+ Package container, NamedElement source, NamedElement target) {
+ return canExistRealization_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateAbstraction_Edge(Package container, NamedElement source, NamedElement target) {
- return canExistAbstraction_Edge(container, null, source, target);
+ public boolean canCreateAbstraction_Edge(
+ Package container, NamedElement source, NamedElement target) {
+ return canExistAbstraction_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateUsage_Edge(Package container, NamedElement source, NamedElement target) {
- return canExistUsage_Edge(container, null, source, target);
+ public boolean canCreateUsage_Edge(
+ Package container, NamedElement source, NamedElement target) {
+ return canExistUsage_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateDependency_Edge(Package container, NamedElement source, NamedElement target) {
- return canExistDependency_Edge(container, null, source, target);
+ public boolean canCreateDependency_Edge(
+ Package container, NamedElement source, NamedElement target) {
+ return canExistDependency_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateDependency_BranchEdge(Package container, NamedElement source, NamedElement target) {
- return canExistDependency_BranchEdge(container, null, source, target);
+ public boolean canCreateDependency_BranchEdge(
+ Package container, NamedElement source, NamedElement target) {
+ return canExistDependency_BranchEdge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateElementImport_Edge(Namespace source, PackageableElement target) {
- return canExistElementImport_Edge(null, source, target);
+ public boolean canCreateElementImport_Edge(
+ Namespace source, PackageableElement target) {
+ return canExistElementImport_Edge(
+ null, source, target);
}
/**
* @generated
*/
- public boolean canCreatePackageImport_Edge(Namespace source, Package target) {
- return canExistPackageImport_Edge(null, source, target);
+ public boolean canCreatePackageImport_Edge(
+ Namespace source, Package target) {
+ return canExistPackageImport_Edge(
+ null, source, target);
}
/**
* @generated
*/
- public boolean canCreatePackageMerge_Edge(Package container, Package source, Package target) {
- return canExistPackageMerge_Edge(container, null, source, target);
+ public boolean canCreatePackageMerge_Edge(
+ Package container, Package source, Package target) {
+ return canExistPackageMerge_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateProfileApplication_Edge(Package source, Profile target) {
- return canExistProfileApplication_Edge(null, source, target);
+ public boolean canCreateProfileApplication_Edge(
+ Package source, Profile target) {
+ return canExistProfileApplication_Edge(
+ null, source, target);
}
/**
* @generated
*/
- public boolean canCreateComment_AnnotatedElementEdge(Comment source, Element target) {
+ public boolean canCreateComment_AnnotatedElementEdge(
+ Comment source, Element target) {
if (source != null) {
- if (source.getAnnotatedElements().contains(target)) {
+ if (source.getAnnotatedElements()
+ .contains(target)) {
return false;
}
}
- return canExistComment_AnnotatedElementEdge(source, target);
+ return canExistComment_AnnotatedElementEdge(
+ source, target);
}
/**
* @generated
*/
- public boolean canCreateConstraint_ConstrainedElementEdge(Constraint source, Element target) {
+ public boolean canCreateConstraint_ConstrainedElementEdge(
+ Constraint source, Element target) {
if (source != null) {
- if (source.getConstrainedElements().contains(target)) {
+ if (source.getConstrainedElements()
+ .contains(target)) {
return false;
}
}
- return canExistConstraint_ConstrainedElementEdge(source, target);
+ return canExistConstraint_ConstrainedElementEdge(
+ source, target);
}
/**
* @generated
*/
- public boolean canCreateTemplateBinding_Edge(TemplateableElement container, TemplateableElement source,
- TemplateableElement target) {
- return canExistTemplateBinding_Edge(container, null, source, target);
+ public boolean canCreateTemplateBinding_Edge(
+ TemplateableElement container, TemplateableElement source, TemplateableElement target) {
+ return canExistTemplateBinding_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateGeneralizationSet_Edge(Package container, Generalization source,
- Generalization target) {
- return canExistGeneralizationSet_Edge(container, null, source, target);
+ public boolean canCreateGeneralizationSet_Edge(
+ Package container, Generalization source, Generalization target) {
+ return canExistGeneralizationSet_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateInstanceSpecification_Edge(Package container, Slot source, Slot target) {
- return canExistInstanceSpecification_Edge(container, null, source, target);
+ public boolean canCreateInstanceSpecification_Edge(
+ Package container, Slot source, Slot target) {
+ return canExistInstanceSpecification_Edge(
+ container, null, source, target);
}
/**
@@ -572,50 +607,63 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateTimeObservation_EventEdge(TimeObservation source, NamedElement target) {
+ public boolean canCreateTimeObservation_EventEdge(
+ TimeObservation source, NamedElement target) {
if (source != null) {
if (source.getEvent() != null) {
return false;
}
}
- return canExistTimeObservation_EventEdge(source, target);
+ return canExistTimeObservation_EventEdge(
+ source, target);
}
/**
* @generated
*/
- public boolean canCreateDurationObservation_EventEdge(DurationObservation source, NamedElement target) {
+ public boolean canCreateDurationObservation_EventEdge(
+ DurationObservation source, NamedElement target) {
if (source != null) {
- if (source.getEvents().size() >= 2 || source.getEvents().contains(target)) {
+ if (source.getEvents()
+ .size() >= 2
+ ||
+ source.getEvents()
+ .contains(target)) {
return false;
}
}
- return canExistDurationObservation_EventEdge(source, target);
+ return canExistDurationObservation_EventEdge(
+ source, target);
}
/**
* @generated
*/
- public boolean canCreateInformationFlow_Edge(Package container, NamedElement source, NamedElement target) {
- return canExistInformationFlow_Edge(container, null, source, target);
+ public boolean canCreateInformationFlow_Edge(
+ Package container, NamedElement source, NamedElement target) {
+ return canExistInformationFlow_Edge(
+ container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateConstraint_ContextEdge(Constraint source, Namespace target) {
+ public boolean canCreateConstraint_ContextEdge(
+ Constraint source, Namespace target) {
if (source != null) {
if (source.getContext() != null) {
return false;
}
}
- if (target != null && (target.getOwnedRules().contains(target))) {
+ if (target != null && (target.getOwnedRules()
+ .contains(target))) {
return false;
}
- return canExistConstraint_ContextEdge(source, target);
+ return canExistConstraint_ContextEdge(
+ source, target);
}
/**
@@ -628,155 +676,160 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistAssociationClass_Edge(Package container, AssociationClass linkInstance, Type source,
- Type target) {
+ public boolean canExistAssociationClass_Edge(
+ Package container, AssociationClass linkInstance, Type source, Type target) {
return true;
}
/**
* @generated
*/
- public boolean canExistAssociation_Edge(Package container, Association linkInstance, Type source, Type target) {
+ public boolean canExistAssociation_Edge(
+ Package container, Association linkInstance, Type source, Type target) {
return true;
}
/**
* @generated
*/
- public boolean canExistAssociation_BranchEdge(Package container, Association linkInstance, Type source,
- Type target) {
+ public boolean canExistAssociation_BranchEdge(
+ Package container, Association linkInstance, Type source, Type target) {
return true;
}
/**
* @generated
*/
- public boolean canExistGeneralization_Edge(Generalization linkInstance, Classifier source, Classifier target) {
+ public boolean canExistGeneralization_Edge(
+ Generalization linkInstance, Classifier source, Classifier target) {
return true;
}
/**
* @generated
*/
- public boolean canExistInterfaceRealization_Edge(InterfaceRealization linkInstance, BehavioredClassifier source,
- Interface target) {
+ public boolean canExistInterfaceRealization_Edge(
+ InterfaceRealization linkInstance, BehavioredClassifier source, Interface target) {
return true;
}
/**
* @generated
*/
- public boolean canExistSubstitution_Edge(Classifier container, Substitution linkInstance, Classifier source,
- Classifier target) {
+ public boolean canExistSubstitution_Edge(
+ Classifier container, Substitution linkInstance, Classifier source, Classifier target) {
return true;
}
/**
* @generated
*/
- public boolean canExistRealization_Edge(Package container, Realization linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistRealization_Edge(
+ Package container, Realization linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistAbstraction_Edge(Package container, Abstraction linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistAbstraction_Edge(
+ Package container, Abstraction linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistUsage_Edge(Package container, Usage linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistUsage_Edge(
+ Package container, Usage linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDependency_Edge(Package container, Dependency linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistDependency_Edge(
+ Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDependency_BranchEdge(Package container, Dependency linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistDependency_BranchEdge(
+ Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistElementImport_Edge(ElementImport linkInstance, Namespace source,
- PackageableElement target) {
+ public boolean canExistElementImport_Edge(
+ ElementImport linkInstance, Namespace source, PackageableElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistPackageImport_Edge(PackageImport linkInstance, Namespace source, Package target) {
+ public boolean canExistPackageImport_Edge(
+ PackageImport linkInstance, Namespace source, Package target) {
return true;
}
/**
* @generated
*/
- public boolean canExistPackageMerge_Edge(Package container, PackageMerge linkInstance, Package source,
- Package target) {
+ public boolean canExistPackageMerge_Edge(
+ Package container, PackageMerge linkInstance, Package source, Package target) {
return true;
}
/**
* @generated
*/
- public boolean canExistProfileApplication_Edge(ProfileApplication linkInstance, Package source,
- Profile target) {
+ public boolean canExistProfileApplication_Edge(
+ ProfileApplication linkInstance, Package source, Profile target) {
return true;
}
/**
* @generated
*/
- public boolean canExistComment_AnnotatedElementEdge(Comment source, Element target) {
+ public boolean canExistComment_AnnotatedElementEdge(
+ Comment source, Element target) {
return true;
}
/**
* @generated
*/
- public boolean canExistConstraint_ConstrainedElementEdge(Constraint source, Element target) {
+ public boolean canExistConstraint_ConstrainedElementEdge(
+ Constraint source, Element target) {
return true;
}
/**
* @generated
*/
- public boolean canExistTemplateBinding_Edge(TemplateableElement container, TemplateBinding linkInstance,
- TemplateableElement source, TemplateableElement target) {
+ public boolean canExistTemplateBinding_Edge(
+ TemplateableElement container, TemplateBinding linkInstance, TemplateableElement source, TemplateableElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistGeneralizationSet_Edge(Package container, GeneralizationSet linkInstance,
- Generalization source, Generalization target) {
+ public boolean canExistGeneralizationSet_Edge(
+ Package container, GeneralizationSet linkInstance, Generalization source, Generalization target) {
return true;
}
/**
* @generated
*/
- public boolean canExistInstanceSpecification_Edge(Package container, InstanceSpecification linkInstance,
- Slot source, Slot target) {
+ public boolean canExistInstanceSpecification_Edge(
+ Package container, InstanceSpecification linkInstance, Slot source, Slot target) {
return true;
}
@@ -790,31 +843,39 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistTimeObservation_EventEdge(TimeObservation source, NamedElement target) {
+ public boolean canExistTimeObservation_EventEdge(
+ TimeObservation source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDurationObservation_EventEdge(DurationObservation source, NamedElement target) {
+ public boolean canExistDurationObservation_EventEdge(
+ DurationObservation source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistInformationFlow_Edge(Package container, InformationFlow linkInstance,
- NamedElement source, NamedElement target) {
+ public boolean canExistInformationFlow_Edge(
+ Package container, InformationFlow linkInstance, NamedElement source, NamedElement target) {
try {
// Information Flow source constraint
if (source != null) {
- if (!((source instanceof Actor) || (source instanceof Node) || (source instanceof UseCase)
- || (source instanceof Artifact) || (source instanceof Class)
- || (source instanceof Component) || (source instanceof Port) || (source instanceof Property)
- || (source instanceof Interface) || (source instanceof Package)
- || (source instanceof ActivityNode) || (source instanceof ActivityPartition)
- || (source instanceof InstanceSpecification))) {
+ if (!((source instanceof Actor)
+ || (source instanceof Node)
+ || (source instanceof UseCase)
+ || (source instanceof Artifact)
+ || (source instanceof Class)
+ || (source instanceof Component)
+ || (source instanceof Port)
+ || (source instanceof Property)
+ || (source instanceof Interface)
+ || (source instanceof Package)
+ || (source instanceof ActivityNode)
+ || (source instanceof ActivityPartition) || (source instanceof InstanceSpecification))) {
return false;
@@ -830,12 +891,18 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
// Information Flow target constraint
if (target != null) {
- if (!((target instanceof Actor) || (target instanceof Node) || (target instanceof UseCase)
- || (target instanceof Artifact) || (target instanceof Class)
- || (target instanceof Component) || (target instanceof Port) || (target instanceof Property)
- || (target instanceof Interface) || (target instanceof Package)
- || (target instanceof ActivityNode) || (target instanceof ActivityPartition)
- || (target instanceof InstanceSpecification))) {
+ if (!((target instanceof Actor)
+ || (target instanceof Node)
+ || (target instanceof UseCase)
+ || (target instanceof Artifact)
+ || (target instanceof Class)
+ || (target instanceof Component)
+ || (target instanceof Port)
+ || (target instanceof Property)
+ || (target instanceof Interface)
+ || (target instanceof Package)
+ || (target instanceof ActivityNode)
+ || (target instanceof ActivityPartition) || (target instanceof InstanceSpecification))) {
return false;
@@ -859,8 +926,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistConstraint_ContextEdge(Constraint source, Namespace target) {
+ public boolean canExistConstraint_ContextEdge(
+ Constraint source, Namespace target) {
return true;
}
}
+
}

Back to the top