Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AbstractCustomCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationBranchDeletion.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationClassViewCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationDiamonViewCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomCreateContainmentLinkCommand.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyBranchDeletion.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyDiamonViewCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/InitializeDiagramCommand.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/RestoreRelatedLinksCommand.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractAssociationBranchEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CSourceISLinkLabelEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CTargetISLinkLabelEditPart.java4
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationStereotypeLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationStereotypeLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomUMLDiagramUpdater.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentDecoration.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ReceptionFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TemplateParameterFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AbstractAssociationEndEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClassLinkMappingHelper.java16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/InstanceSpecificationLinkHelper.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiDependencyHelper.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/EnumerationHelperAdvice.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/GeneralizationHelperAdvice.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/InnerClassHyperlinkContributor.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestedPackageHyperlinkContributor.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestingPackageHyperlinkContributor.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/locator/ContainmentCircleOnPackageLocator.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_2_0.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/CustomMessageFormatParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/EndMemberKind.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/GeneralizationSetConstraintParser.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeEnumerationLiteralDisplayEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomContainmentCreationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomGraphicalNodeEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomPackageReparentCreationEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/DeleteLinkedAssociationClassViewEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/GeneralizationSetLabelDisplayEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/RemoveOrphanViewPolicy.java86
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/TemplateParamaterDisplayEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/GraphicalAssociationBranchViewCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/utils/GeneralizationUtil.java18
65 files changed, 256 insertions, 246 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java
index f787c4dcfaa..606fbdc66d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java
@@ -44,7 +44,7 @@ public class UmlClassDiagramForMultiEditor extends org.eclipse.papyrus.uml.diagr
/**
* The location of diagram icon in the plug-in
*/
- private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Class.gif"; //$NON-NLS-1$
+ private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Class.gif"; //$NON-NLS-1$
/**
* The image descriptor of the diagram icon
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AbstractCustomCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AbstractCustomCommand.java
index 5ea9e210a9e..00aee0c3a50 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AbstractCustomCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AbstractCustomCommand.java
@@ -51,7 +51,7 @@ public abstract class AbstractCustomCommand extends AbstractTransactionalCommand
}
}
- List<IFile> result = new ArrayList<IFile>();
+ List<IFile> result = new ArrayList<>();
List<?> affectedFiles = super.getAffectedFiles();
for (Object affectedFile : affectedFiles) {
result.add((IFile) affectedFile);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationBranchDeletion.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationBranchDeletion.java
index 8066db76e18..e2c8eb0e5e2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationBranchDeletion.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationBranchDeletion.java
@@ -35,12 +35,12 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.MultiAssociationHelper;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.uml2.uml.Association;
@@ -95,8 +95,8 @@ public class AssociationBranchDeletion implements IObjectActionDelegate {
// 5. Graphical creation of the binary dependency
// 5.1 calculus of the future source and target of the binary
// dependency
- List<EditPart> sourceList = new ArrayList<EditPart>();
- List<EditPart> targetList = new ArrayList<EditPart>();
+ List<EditPart> sourceList = new ArrayList<>();
+ List<EditPart> targetList = new ArrayList<>();
for (Object editPart : associationNodeEditPart.getSourceConnections()) {
sourceList.add((EditPart) editPart);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationClassViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationClassViewCreateCommand.java
index 2a6e154350b..2fca36b5729 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationClassViewCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationClassViewCreateCommand.java
@@ -98,8 +98,7 @@ public class AssociationClassViewCreateCommand extends AbstractCustomCommand {
// UMLElementTypes.AssociationClass_2013).getSemanticHint(), -1,
// true, preferenceHint);
// put to the good position
- if (getNode() instanceof Node)
- {
+ if (getNode() instanceof Node) {
((Bounds) ((Node) getNode()).getLayoutConstraint()).setX(location.x);
((Bounds) ((Node) getNode()).getLayoutConstraint()).setY(location.y);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationDiamonViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationDiamonViewCreateCommand.java
index 7e788d58e3d..eb95d1f6516 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationDiamonViewCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/AssociationDiamonViewCreateCommand.java
@@ -29,8 +29,8 @@ import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
/**
* Custom class to create the associationClass node
@@ -94,8 +94,7 @@ public class AssociationDiamonViewCreateCommand extends AbstractCustomCommand {
Location notationLocation = NotationFactory.eINSTANCE.createLocation();
notationLocation.setX(location.x);
notationLocation.setY(location.y);
- if (getNode() instanceof Node)
- {
+ if (getNode() instanceof Node) {
((Node) getNode()).setLayoutConstraint(notationLocation);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomCreateContainmentLinkCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomCreateContainmentLinkCommand.java
index 6fc78f8b3c0..e1388149c91 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomCreateContainmentLinkCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomCreateContainmentLinkCommand.java
@@ -53,7 +53,7 @@ public class CustomCreateContainmentLinkCommand extends CommonDeferredCreateConn
public CustomCreateContainmentLinkCommand(TransactionalEditingDomain editingDomain, EObject element, IAdaptable sourceViewAdapter, IAdaptable targetViewAdapter, EditPartViewer viewer, PreferencesHint preferencesHint, ICommand command) {
super(editingDomain, element, sourceViewAdapter, targetViewAdapter, viewer, preferencesHint, command);
sourceView = null;
- targetView = (View) targetViewAdapter.getAdapter(View.class);
+ targetView = targetViewAdapter.getAdapter(View.class);
}
/**
@@ -63,7 +63,7 @@ public class CustomCreateContainmentLinkCommand extends CommonDeferredCreateConn
ConnectionViewDescriptor viewDescriptor, ICommand command) {
super(editingDomain, semanticHint, sourceCircleViewAdapter, targetViewAdapter, viewer, preferencesHint, viewDescriptor, command);
sourceView = source;
- targetView = (View) targetViewAdapter.getAdapter(View.class);
+ targetView = targetViewAdapter.getAdapter(View.class);
}
@Override
@@ -104,8 +104,8 @@ public class CustomCreateContainmentLinkCommand extends CommonDeferredCreateConn
if (sourceContainmentCircleEP == null) {
return null;
}
- View targetView = (View) targetViewAdapter.getAdapter(View.class);
- View sourceView = (View) sourceContainmentCircleEP.getParent().getAdapter(View.class);
+ View targetView = targetViewAdapter.getAdapter(View.class);
+ View sourceView = sourceContainmentCircleEP.getParent().getAdapter(View.class);
PackageableElement targetElement = (PackageableElement) targetView.getElement();
PackageableElement sourceElement = (PackageableElement) sourceView.getElement();
EditPart sourceEP = sourceContainmentCircleEP.getParent();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java
index ad32d19ceb3..384045036e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java
@@ -33,10 +33,10 @@ import org.eclipse.uml2.uml.Stereotype;
/**
* The Class DefferedAppliedStereotypeToDisplayCommand used to set the list of applied stereotype to
* display
- *
+ *
* @deprecated The Display of stereotype is now treated with notation View (Bug 455311)
* use the command into oep.uml.diagram.common.stereotype.display.command instead
- *
+ *
*/
@Deprecated
public class DefferedAppliedStereotypeToDisplayCommand extends CreateEAnnotationCommand {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyBranchDeletion.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyBranchDeletion.java
index 92c1435349c..ca1a6fc50ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyBranchDeletion.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyBranchDeletion.java
@@ -35,9 +35,9 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.uml2.uml.Dependency;
@@ -71,7 +71,7 @@ public class DependencyBranchDeletion implements IObjectActionDelegate {
GraphicalEditPart branchSource = (GraphicalEditPart) selectedElement.getSource();
GraphicalEditPart branchtarget = (GraphicalEditPart) selectedElement.getTarget();
EStructuralFeature feature = null;
- List<NamedElement> newValue = new ArrayList<NamedElement>();
+ List<NamedElement> newValue = new ArrayList<>();
if (branchSource.resolveSemanticElement() instanceof Dependency) {
// target is the supplier of the dependency
dependency = (Dependency) branchSource.resolveSemanticElement();
@@ -101,8 +101,8 @@ public class DependencyBranchDeletion implements IObjectActionDelegate {
// 5. Graphical creation of the binary dependency
// 5.1 calculus of the furture source and taget of the binary
// dependency
- List<EditPart> sourceList = new ArrayList<EditPart>();
- List<EditPart> targetList = new ArrayList<EditPart>();
+ List<EditPart> sourceList = new ArrayList<>();
+ List<EditPart> targetList = new ArrayList<>();
for (Object editPart : dependencyNodeEditPart.getSourceConnections()) {
sourceList.add((EditPart) editPart);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyDiamonViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyDiamonViewCreateCommand.java
index 97dfa69c08f..9dd721bf608 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyDiamonViewCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DependencyDiamonViewCreateCommand.java
@@ -29,8 +29,8 @@ import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
/**
* Custom class to create the associationClass node
@@ -93,8 +93,7 @@ public class DependencyDiamonViewCreateCommand extends AbstractCustomCommand {
Location notationLocation = NotationFactory.eINSTANCE.createLocation();
notationLocation.setX(location.x);
notationLocation.setY(location.y);
- if (getNode() instanceof Node)
- {
+ if (getNode() instanceof Node) {
((Node) getNode()).setLayoutConstraint(notationLocation);
semanticApdater.setView(getNode());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
index 7302552bc56..9ec8c563852 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
@@ -50,6 +50,7 @@ public class PropertyCommandForAssociation extends CreateElementCommand {
/**
* {@inheritDoc}
*/
+ @Override
protected EObject doDefaultElementCreation() {
Property newElement = UMLFactory.eINSTANCE.createProperty();
Association owner = (Association) getElementToEdit();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/InitializeDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/InitializeDiagramCommand.java
index 32256989518..54371f886a1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/InitializeDiagramCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/InitializeDiagramCommand.java
@@ -77,7 +77,7 @@ public class InitializeDiagramCommand extends AbstractTransactionalCommand {
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
// To load visualIDRegistry
host().refresh();
- List<Object> createdViews = new LinkedList<Object>();
+ List<Object> createdViews = new LinkedList<>();
createdViews.addAll(populateSemanticNodes());
if (createdViews.size() > 0) {
RestoreRelatedLinksCommand restoreRelatedLinksCommand = new RestoreRelatedLinksCommand(((DiagramEditPart) getHost()), createdViews);
@@ -217,7 +217,7 @@ public class InitializeDiagramCommand extends AbstractTransactionalCommand {
}
protected List<ViewDescriptor> populateSemanticNodes() {
- List<ViewDescriptor> descriptors = new ArrayList<ViewDescriptor>();
+ List<ViewDescriptor> descriptors = new ArrayList<>();
View viewObject = (View) getHost().getModel();
EObject container = getDiagram().getElement();
if (container instanceof Package) {
@@ -253,7 +253,7 @@ public class InitializeDiagramCommand extends AbstractTransactionalCommand {
}
private List<Object> prepareAdapterList(List<Object> createdViews) {
- List<Object> viewAdapters = new ArrayList<Object>();
+ List<Object> viewAdapters = new ArrayList<>();
viewAdapters.add(host());
ListIterator<Object> li = createdViews.listIterator();
while (li.hasNext()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/RestoreRelatedLinksCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/RestoreRelatedLinksCommand.java
index b918f0337c5..17ca4491a2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/RestoreRelatedLinksCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/commands/RestoreRelatedLinksCommand.java
@@ -115,7 +115,7 @@ public class RestoreRelatedLinksCommand extends AbstractTransactionalCommand {
* @return linkdescriptors
*/
protected Collection<? extends UMLLinkDescriptor> collectPartRelatedLinks(View view, Map<EObject, View> domain2NotationMap) {
- Collection<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<UMLLinkDescriptor> result = new LinkedList<>();
if (!domain2NotationMap.containsKey(view.getElement())) {
// We must prevent duplicate descriptors
List<?> outgoingDescriptors = CustomUMLDiagramUpdater.INSTANCE.getOutgoingLinks(view);
@@ -171,7 +171,7 @@ public class RestoreRelatedLinksCommand extends AbstractTransactionalCommand {
for (Object object : adapters) {
if (object instanceof IAdaptable) {
IAdaptable ad = (IAdaptable) object;
- View view = (View) ad.getAdapter(View.class);
+ View view = ad.getAdapter(View.class);
if (view != null) {
refreshRelatedLinks(view);
}
@@ -208,7 +208,7 @@ public class RestoreRelatedLinksCommand extends AbstractTransactionalCommand {
// Collect all related link from semantic model
Collection<? extends UMLLinkDescriptor> linkDescriptors = collectPartRelatedLinks(notationView, domain2NotationMap);
// Collect all related link from graphical model
- Collection<Edge> existingLinks = new LinkedList<Edge>();
+ Collection<Edge> existingLinks = new LinkedList<>();
for (Object edge : notationView.getTargetEdges()) {
if (edge instanceof Edge && false == existingLinks.contains(edge)) {
existingLinks.add((Edge) edge);
@@ -225,7 +225,7 @@ public class RestoreRelatedLinksCommand extends AbstractTransactionalCommand {
for (Iterator<Edge> linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
Edge nextDiagramLink = linksIterator.next();
String diagramLinkVisualID = UMLVisualIDRegistry.getVisualID(nextDiagramLink);
- if (diagramLinkVisualID == null || diagramLinkVisualID.isEmpty() ) {
+ if (diagramLinkVisualID == null || diagramLinkVisualID.isEmpty()) {
if (nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
linksIterator.remove();
}
@@ -298,7 +298,7 @@ public class RestoreRelatedLinksCommand extends AbstractTransactionalCommand {
* @param graphicalEditPart
*/
protected void refreshRelatedLinks(View notationView) {
- Map<EObject, View> domain2NotationMap = new HashMap<EObject, View>();
+ Map<EObject, View> domain2NotationMap = new HashMap<>();
// Create related links
Collection<? extends UMLLinkDescriptor> linkDescriptors = getLinkDescriptorToProcess(notationView, domain2NotationMap);
createRelatedLinks(linkDescriptors, domain2NotationMap);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractAssociationBranchEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractAssociationBranchEditPart.java
index 8c09ed513d1..6f7093245b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractAssociationBranchEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractAssociationBranchEditPart.java
@@ -31,7 +31,7 @@ import org.eclipse.uml2.uml.Property;
public abstract class AbstractAssociationBranchEditPart extends ConnectionEditPart {
/**
- *
+ *
*/
private static final String ASSOCIATION_END_LISTENERS_TARGET = "AssociationEndListenersTarget"; //$NON-NLS-1$
@@ -56,7 +56,7 @@ public abstract class AbstractAssociationBranchEditPart extends ConnectionEditPa
if (resolveSemanticElement() instanceof Association) {
Property targetEnd = MultiAssociationHelper.getPropertyToListen(((Edge) getModel()), (Association) resolveSemanticElement());
if (targetEnd != null) {
- addListenerFilter(ASSOCIATION_END_LISTENERS_TARGET, this, targetEnd);
+ addListenerFilter(ASSOCIATION_END_LISTENERS_TARGET, this, targetEnd);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CSourceISLinkLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CSourceISLinkLabelEditPart.java
index 691aae0d357..dce6a9d4c3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CSourceISLinkLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CSourceISLinkLabelEditPart.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SourceISLinkLabelEditPar
/**
* Custom Edit Part for {@link SourceISLinkLabelEditPart}.
- *
+ *
* @author Gabriel Pascual
*
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CTargetISLinkLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CTargetISLinkLabelEditPart.java
index 0ed4c52b512..d7d5c695d20 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CTargetISLinkLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CTargetISLinkLabelEditPart.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TargetISLinkLabelEditPar
/**
* Custom Edit Part for {@link TargetISLinkLabelEditPart}.
- *
+ *
* @author Gabriel Pascual
*
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java
index bea222a3276..abc705965d6 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2017 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
@@ -22,6 +22,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
/**
* Custom variant. Provides elementType for @see AbstractConstraintEditPart
+ *
* @since 3.0
*/
public class CustomConstraintEditPartCN extends ConstraintEditPartCN {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationStereotypeLabelEditPart.java
index 1c8a5866718..06d47c2d4aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationStereotypeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationStereotypeLabelEditPart.java
@@ -40,7 +40,7 @@ public class CustomDurationObservationStereotypeLabelEditPart extends DurationOb
/**
* Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
- *
+ *
* @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java
index a12709b7e06..4a9bf14d999 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2017 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* Yupanqui MUNOZ JULHO (CEA LIST) yupanqui.munozjulho@cea.fr - Bug 514518
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
@@ -22,7 +22,8 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPart;
/**
* The custom edit policy for the interface edit part.
- * @since 3.0
+ *
+ * @since 3.0
*/
public class CustomInterfaceEditPart extends InterfaceEditPart {
@@ -34,7 +35,7 @@ public class CustomInterfaceEditPart extends InterfaceEditPart {
public CustomInterfaceEditPart(View view) {
super(view);
}
-
+
/**
* @see org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPart#createDefaultEditPolicies()
*
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationStereotypeLabelEditPart.java
index 80069f94b0f..25b770844bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationStereotypeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationStereotypeLabelEditPart.java
@@ -40,7 +40,7 @@ public class CustomTimeObservationStereotypeLabelEditPart extends TimeObservatio
/**
* Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
- *
+ *
* @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomUMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomUMLDiagramUpdater.java
index 9a5862a3349..821d041c070 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomUMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomUMLDiagramUpdater.java
@@ -46,7 +46,7 @@ public class CustomUMLDiagramUpdater extends UMLDiagramUpdater {
@Override
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Association_Edge(Package container) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
for (Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
EObject linkObject = (EObject) links.next();
if (false == linkObject instanceof Association) {
@@ -115,7 +115,7 @@ public class CustomUMLDiagramUpdater extends UMLDiagramUpdater {
if (container == null) {
return Collections.emptyList();
}
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
for (Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
EObject linkObject = (EObject) links.next();
if (false == linkObject instanceof Association) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentDecoration.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentDecoration.java
index 5ab1006bd04..770c256ba78 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentDecoration.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentDecoration.java
@@ -46,8 +46,7 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* Constructor
*/
- public ContainmentDecoration()
- {
+ public ContainmentDecoration() {
location = new Point();
transform = new Transform();
}
@@ -55,10 +54,9 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* @see org.eclipse.draw2d.Figure#getBounds()
*/
- public Rectangle getBounds()
- {
- if (bounds == null)
- {
+ @Override
+ public Rectangle getBounds() {
+ if (bounds == null) {
updatePoints();
bounds = new Rectangle(location, new Dimension(0, 0));
@@ -80,14 +78,13 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* Set the sacle of the Oval. By default, the oval has a size of 10 per 10 :
* that is a circle !
- *
+ *
* @param x
* the x-scale value
* @param y
* the y-scale value
*/
- public void setScale(double x, double y)
- {
+ public void setScale(double x, double y) {
ovalCenter = null;
ovalSize = null;
bounds = null;
@@ -99,8 +96,8 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* @see org.eclipse.draw2d.Figure#setLocation(org.eclipse.draw2d.geometry.Point)
*/
- public void setLocation(Point p)
- {
+ @Override
+ public void setLocation(Point p) {
ovalCenter = null;
ovalSize = null;
bounds = null;
@@ -112,8 +109,8 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* @see org.eclipse.draw2d.RotatableDecoration#setReferencePoint(org.eclipse.draw2d.geometry.Point)
*/
- public void setReferencePoint(Point p)
- {
+ @Override
+ public void setReferencePoint(Point p) {
ovalCenter = null;
ovalSize = null;
bounds = null;
@@ -125,12 +122,11 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* Set the rotation parameter
- *
+ *
* @param angle
* set the angle of the oval
*/
- public void setRotation(double angle)
- {
+ public void setRotation(double angle) {
ovalCenter = null;
ovalSize = null;
bounds = null;
@@ -140,14 +136,11 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* Update the points of the Circle
*/
- protected void updatePoints()
- {
- if (ovalSize == null)
- {
+ protected void updatePoints() {
+ if (ovalSize == null) {
ovalSize = new Dimension((int) xScale * radius * 2, (int) yScale * radius * 2);
}
- if (ovalCenter == null)
- {
+ if (ovalCenter == null) {
ovalCenter = new Point(transform.getTransformed(new Point((int) -xScale * radius, 0)));
}
@@ -156,8 +149,8 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* @see org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)
*/
- public void paintFigure(Graphics graphics)
- {
+ @Override
+ public void paintFigure(Graphics graphics) {
updatePoints();
graphics.pushState();
@@ -172,8 +165,8 @@ public class ContainmentDecoration extends Ellipse implements RotatableDecoratio
/**
* @see org.eclipse.draw2d.Figure#paintBorder(org.eclipse.draw2d.Graphics)
*/
- protected void paintBorder(Graphics graphics)
- {
+ @Override
+ protected void paintBorder(Graphics graphics) {
updatePoints();
graphics.pushState();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentFigure.java
index 8886df53fa1..0de290f39ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ContainmentFigure.java
@@ -26,8 +26,8 @@ public class ContainmentFigure extends RoundedCompartmentFigure {
super.paint(graphics);
graphics.pushState();
// Draw the cross.
- int x = (int) (bounds.width / 2);
- int y = (int) (bounds.height / (2));
+ int x = bounds.width / 2;
+ int y = bounds.height / (2);
graphics.drawLine(bounds.getCenter().translate(x, 0), bounds.getCenter().translate(-x, 0));
graphics.drawLine(bounds.getCenter().translate(0, -y), bounds.getCenter().translate(0, y));
graphics.popState();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java
index 7f0cb5b33e2..e5634afbf4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2016, 2018 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.figure;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ReceptionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ReceptionFigure.java
index b40f7a2ddd1..6dd292d6f51 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ReceptionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/ReceptionFigure.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2016 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.figure;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TemplateParameterFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TemplateParameterFigure.java
index 55a151fe4e2..40f1c2470de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TemplateParameterFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TemplateParameterFigure.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2016 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.figure;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java
index 9657d03a90b..9fe1416f05f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java
@@ -22,6 +22,7 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigu
/**
* Figure for Composite representation of InformationItem.
+ *
* @since 3.0
*/
public class InformationItemFigure extends RoundedCompartmentFigure {
@@ -30,7 +31,7 @@ public class InformationItemFigure extends RoundedCompartmentFigure {
private static String TAG_LABEL = "Information"; //$NON-NLS-1$
/** The List of Compartment */
- private final static List<String> NO_COMPARTMENT = new ArrayList<String>();
+ private final static List<String> NO_COMPARTMENT = new ArrayList<>();
/**
* Creates a new InformationItemFigure.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AbstractAssociationEndEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AbstractAssociationEndEditPart.java
index 491facb553b..c102715fca9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AbstractAssociationEndEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AbstractAssociationEndEditPart.java
@@ -32,11 +32,11 @@ import org.eclipse.uml2.uml.Property;
public abstract class AbstractAssociationEndEditPart extends LabelEditPart {
/**
- *
+ *
*/
private static final String ASSOCIATION_END_LISTENERS_TARGET = "AssociationEndListenersTarget"; //$NON-NLS-1$
/**
- *
+ *
*/
private static final String ASSOCIATION_END_LISTENERS_SOURCE = "AssociationEndListenersSource";//$NON-NLS-1$
@@ -60,8 +60,8 @@ public abstract class AbstractAssociationEndEditPart extends LabelEditPart {
protected void addAssociationEndListeners() {
EObject sourceEnd = ((Association) resolveSemanticElement()).getMemberEnds().get(0);
EObject targetEnd = ((Association) resolveSemanticElement()).getMemberEnds().get(1);
- addListenerFilter(ASSOCIATION_END_LISTENERS_SOURCE, this, sourceEnd);
- addListenerFilter(ASSOCIATION_END_LISTENERS_TARGET, this, targetEnd);
+ addListenerFilter(ASSOCIATION_END_LISTENERS_SOURCE, this, sourceEnd);
+ addListenerFilter(ASSOCIATION_END_LISTENERS_TARGET, this, targetEnd);
addListenerFilter("AssociationEndListenersSourceMultUpper", this, ((Property) sourceEnd).getUpperValue()); //$NON-NLS-1$
addListenerFilter("AssociationEndListenersTargetMultUpper", this, ((Property) targetEnd).getUpperValue()); //$NON-NLS-1$
addListenerFilter("AssociationEndListenersSourceMultLower", this, ((Property) sourceEnd).getLowerValue()); //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java
index 776e939aeee..209ac037fe2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java
@@ -162,8 +162,10 @@ public class AssociationClassHelper extends ElementHelper {
cc.compose(associationcClassLinkCommand);
// creation of the dashedLine
ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.AssociationClass_TetherEdge, ((IHintedType) UMLElementTypes.AssociationClass_TetherEdge).getSemanticHint(), diagramPreferencesHint);
- CustomDeferredCreateConnectionViewCommand dashedLineCmd = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.AssociationClass_TetherEdge).getSemanticHint(), ((IAdaptable) associationcClassLinkCommand.getCommandResult()
- .getReturnValue()), ((IAdaptable) associationClassNodeCreationCommand.getCommandResult().getReturnValue()), viewer, diagramPreferencesHint, dashedLineViewDescriptor, null);
+ CustomDeferredCreateConnectionViewCommand dashedLineCmd = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.AssociationClass_TetherEdge).getSemanticHint(),
+ ((IAdaptable) associationcClassLinkCommand.getCommandResult()
+ .getReturnValue()),
+ ((IAdaptable) associationClassNodeCreationCommand.getCommandResult().getReturnValue()), viewer, diagramPreferencesHint, dashedLineViewDescriptor, null);
dashedLineCmd.setElement(associationClass);
cc.compose(dashedLineCmd);
return new ICommandProxy(cc);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClassLinkMappingHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClassLinkMappingHelper.java
index 436ca01a9b1..2b26d13a92c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClassLinkMappingHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClassLinkMappingHelper.java
@@ -76,7 +76,7 @@ public class ClassLinkMappingHelper implements ILinkMappingHelper {
@Override
public java.util.Collection<?> caseElementImport(org.eclipse.uml2.uml.ElementImport object) {
- List<Namespace> result = new ArrayList<Namespace>();
+ List<Namespace> result = new ArrayList<>();
result.add(object.getImportingNamespace());
return result;
};
@@ -88,21 +88,21 @@ public class ClassLinkMappingHelper implements ILinkMappingHelper {
@Override
public java.util.Collection<?> caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
- List<BehavioredClassifier> result = new ArrayList<BehavioredClassifier>();
+ List<BehavioredClassifier> result = new ArrayList<>();
result.add(object.getImplementingClassifier());
return result;
};
@Override
public java.util.Collection<?> caseProfileApplication(org.eclipse.uml2.uml.ProfileApplication object) {
- List<org.eclipse.uml2.uml.Package> result = new ArrayList<org.eclipse.uml2.uml.Package>();
+ List<org.eclipse.uml2.uml.Package> result = new ArrayList<>();
result.add(object.getApplyingPackage());
return result;
};
@Override
public java.util.Collection<?> caseTemplateBinding(org.eclipse.uml2.uml.TemplateBinding object) {
- List<org.eclipse.uml2.uml.TemplateableElement> result = new ArrayList<org.eclipse.uml2.uml.TemplateableElement>();
+ List<org.eclipse.uml2.uml.TemplateableElement> result = new ArrayList<>();
result.add(object.getBoundElement());
return result;
};
@@ -123,7 +123,7 @@ public class ClassLinkMappingHelper implements ILinkMappingHelper {
@Override
public java.util.Collection<PackageableElement> caseElementImport(org.eclipse.uml2.uml.ElementImport object) {
- List<org.eclipse.uml2.uml.PackageableElement> result = new ArrayList<org.eclipse.uml2.uml.PackageableElement>();
+ List<org.eclipse.uml2.uml.PackageableElement> result = new ArrayList<>();
result.add(object.getImportedElement());
return result;
};
@@ -135,21 +135,21 @@ public class ClassLinkMappingHelper implements ILinkMappingHelper {
@Override
public java.util.Collection<Interface> caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
- List<org.eclipse.uml2.uml.Interface> result = new ArrayList<org.eclipse.uml2.uml.Interface>();
+ List<org.eclipse.uml2.uml.Interface> result = new ArrayList<>();
result.add(object.getContract());
return result;
};
@Override
public java.util.Collection<Profile> caseProfileApplication(org.eclipse.uml2.uml.ProfileApplication object) {
- List<org.eclipse.uml2.uml.Profile> result = new ArrayList<org.eclipse.uml2.uml.Profile>();
+ List<org.eclipse.uml2.uml.Profile> result = new ArrayList<>();
result.add(object.getAppliedProfile());
return result;
};
@Override
public java.util.Collection<Element> caseTemplateBinding(org.eclipse.uml2.uml.TemplateBinding object) {
- List<org.eclipse.uml2.uml.Element> result = new ArrayList<org.eclipse.uml2.uml.Element>();
+ List<org.eclipse.uml2.uml.Element> result = new ArrayList<>();
result.add(object.getSignature().getOwner());
return result;
};
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/InstanceSpecificationLinkHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/InstanceSpecificationLinkHelper.java
index fb3466d37f9..361d098cd1b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/InstanceSpecificationLinkHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/InstanceSpecificationLinkHelper.java
@@ -33,7 +33,7 @@ public class InstanceSpecificationLinkHelper {
* if this is not an instance link : the size of the array list is 0
*/
public static List<InstanceSpecification> getEnds(InstanceSpecification instance) {
- List<InstanceSpecification> array = new ArrayList<InstanceSpecification>();
+ List<InstanceSpecification> array = new ArrayList<>();
EAnnotation endtypes = instance.getEAnnotation(INSTANCE_END);
if (endtypes != null) {
assert (endtypes.getReferences().size() == 2);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java
index 7eb9e173c83..9f4816b50f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java
@@ -53,6 +53,7 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.AssociationDiamonViewCreateCommand;
@@ -63,7 +64,6 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchEditPar
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNodeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.common.commands.DeleteLinkDuringCreationCommand;
-import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.helper.AssociationEndSourceLabelHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.AssociationEndTargetLabelHelper;
import org.eclipse.uml2.uml.Association;
@@ -110,7 +110,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
@SuppressWarnings("unchecked")
public static void createSemanticBranchStyles(View view) {
org.eclipse.gmf.runtime.notation.EObjectValueStyle semanticbranchStyle = NotationFactory.eINSTANCE.createEObjectValueStyle();
- semanticbranchStyle.setName(MultiAssociationHelper.SEMANTIC_BRANCH);
+ semanticbranchStyle.setName(org.eclipse.papyrus.uml.diagram.common.helper.MultiAssociationHelper.SEMANTIC_BRANCH);
view.getStyles().add(semanticbranchStyle);
}
@@ -137,7 +137,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
Command command = new CompoundCommand();
// 0. Obtain list of property to display
Association association = (Association) associationNodeEditPart.resolveSemanticElement();
- List<Property> endToDisplay = new ArrayList<Property>(association.getMemberEnds());
+ List<Property> endToDisplay = new ArrayList<>(association.getMemberEnds());
// 1. remove in the list all displayedElement.
Iterator<?> iter = associationNodeEditPart.getSourceConnections().iterator();
while (iter.hasNext()) {
@@ -158,10 +158,9 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
Property currentEnd = iteratorProp.next();
// look for if an editpart exist for this element
Collection<?> values = associationNodeEditPart.getViewer().getEditPartRegistry().values();
- Collection<EditPart> editPartSet = new ArrayList<EditPart>();
+ Collection<EditPart> editPartSet = new ArrayList<>();
for (Object object : values) {
- if (object instanceof EditPart)
- {
+ if (object instanceof EditPart) {
editPartSet.add((EditPart) object);
}
}
@@ -206,7 +205,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
public Command dropMutliAssociation(Association association, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView) {
Command command = new CompoundCommand();
// 0. Obtain list of property to display
- List<Property> endToDisplay = new ArrayList<Property>(association.getMemberEnds());
+ List<Property> endToDisplay = new ArrayList<>(association.getMemberEnds());
// 1. creatiuon of the diamon of association
AssociationDiamonViewCreateCommand nodeCreation = new AssociationDiamonViewCreateCommand(getEditingDomain(), containerView, viewer, diagramPreferencesHint, location, new SemanticAdapter(association, null));
((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
@@ -222,7 +221,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
Property currentEnd = iteratorProp.next();
// look for if an editpart exist for this element
Collection<?> values = viewer.getEditPartRegistry().values();
- Collection<EditPart> editPartSet = new ArrayList<EditPart>();
+ Collection<EditPart> editPartSet = new ArrayList<>();
for (Object object : values) {
editPartSet.add((EditPart) object);
}
@@ -350,7 +349,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
// System.err.println("+-> parentView:" + parentView);
// ---------------------------------------------------------
// 8 Ensure that all member ends belong to the association
- List<Property> ownedProperty = new ArrayList<Property>();
+ List<Property> ownedProperty = new ArrayList<>();
ownedProperty.addAll(association.getMemberEnds());
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(association);
if (provider != null) {
@@ -386,7 +385,8 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
// 4. reconstruction of the old link by taking in account the old
// connection
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_BranchEdge, ((IHintedType) UMLElementTypes.Association_BranchEdge).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_BranchEdge, ((IHintedType) UMLElementTypes.Association_BranchEdge).getSemanticHint(),
+ ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
// 5. reconstruction of the first branch between old source to node
ICommand firstBranchCommand = new GraphicalAssociationBranchViewCommand(getEditingDomain(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, associationViewSource), sourceEditPart.getViewer(),
((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, sourceEnd);
@@ -407,7 +407,8 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
// third branch node and target
thirdBranchCommand = new GraphicalAssociationBranchViewCommand(getEditingDomain(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(),
((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, request);
- // thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_BrachEdge).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null,
+ // thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_BrachEdge).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new
+ // SemanticAdapter(null,
// targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
} else {
// third branch source and node
@@ -461,10 +462,12 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
((CompoundCommand) command).add(new ICommandProxy(propertyCreateCommand));
// System.err.println("0. add semantic, can execute?" + command.canExecute());
// 1. add the branch graphically
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_BranchEdge, ((IHintedType) UMLElementTypes.Association_BranchEdge).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_BranchEdge, ((IHintedType) UMLElementTypes.Association_BranchEdge).getSemanticHint(),
+ ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
GraphicalAssociationBranchViewCommand aBranchCommand = new GraphicalAssociationBranchViewCommand(getEditingDomain(), new SemanticAdapter(null, sourceEditPart.getModel()), new SemanticAdapter(null, targetEditPart.getModel()),
sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, request);
- // CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_BrachEdge).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()),
+ // CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_BrachEdge).getSemanticHint(), new SemanticAdapter(null,
+ // sourceEditPart.getModel()),
// new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
aBranchCommand.setElement(association);
((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiDependencyHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiDependencyHelper.java
index 77477847741..5f24f2de5ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiDependencyHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiDependencyHelper.java
@@ -51,13 +51,13 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CustomDeferredCreateConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.DependencyDiamonViewCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNodeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.common.commands.DeleteLinkDuringCreationCommand;
-import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.helper.Element2IAdaptableRegistryHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
import org.eclipse.uml2.uml.Dependency;
@@ -103,7 +103,7 @@ public class MultiDependencyHelper extends ElementHelper {
NamedElement currentEnd = iteratorProp.next();
// look for if an editpart exist for this element
Collection<?> values = viewer.getEditPartRegistry().values();
- Collection<EditPart> editPartSet = new ArrayList<EditPart>();
+ Collection<EditPart> editPartSet = new ArrayList<>();
for (Object object : values) {
editPartSet.add((EditPart) object);
}
@@ -170,8 +170,8 @@ public class MultiDependencyHelper extends ElementHelper {
public Command dropMutliDependency(Dependency dependency, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView) {
CompoundCommand command = new CompoundCommand();
// 0. Obtain list of property to display
- List<NamedElement> endToDisplaySource = new ArrayList<NamedElement>(dependency.getClients());
- List<NamedElement> endToDisplayTarget = new ArrayList<NamedElement>(dependency.getSuppliers());
+ List<NamedElement> endToDisplaySource = new ArrayList<>(dependency.getClients());
+ List<NamedElement> endToDisplayTarget = new ArrayList<>(dependency.getSuppliers());
// 1. creation of the diamond of the Dependency
DependencyDiamonViewCreateCommand nodeCreation = new DependencyDiamonViewCreateCommand(getEditingDomain(), containerView, viewer, diagramPreferencesHint, location, new SemanticAdapter(dependency, null));
command.add(new ICommandProxy(nodeCreation));
@@ -360,23 +360,28 @@ public class MultiDependencyHelper extends ElementHelper {
// ---------------------------------------------------------
// 4. reconstruction of the old link by taking in account the old
// connection
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_BranchEdge, ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_BranchEdge, ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(),
+ ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
// 5. reconstruction of the first branch between old source to node
ICommand firstBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), new SemanticAdapter(null, dependencyViewSource), (IAdaptable) nodeCreation
.getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
((CustomDeferredCreateConnectionViewCommand) firstBranchCommand).setElement(dependency);
((CompoundCommand) command).add(new ICommandProxy(firstBranchCommand));
// 6. reconstruction of the second branch between node to old target
- ICommand secondBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(
- null, dependencyViewTarget), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ ICommand secondBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(),
+ new SemanticAdapter(
+ null, dependencyViewTarget),
+ sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
((CustomDeferredCreateConnectionViewCommand) secondBranchCommand).setElement(dependency);
((CompoundCommand) command).add(new ICommandProxy(secondBranchCommand));
// 7. Create of the third branch between node and target our source.
ICommand thirdBranchCommand = null;
if (dependencyView.equals((sourceEditPart.getModel()))) {
// third branch node and target
- thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null,
- targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(),
+ new SemanticAdapter(null,
+ targetEditPart.getModel()),
+ sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
} else {
// // third branch source and node
thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_BranchEdge).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable) nodeCreation
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
index c0b5cd12c09..a0e57675161 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2016 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
* Contributors:
* CEA LIST - Initial API and implementation
* Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.helper;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/EnumerationHelperAdvice.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/EnumerationHelperAdvice.java
index 7ea79b8d394..199bf67d397 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/EnumerationHelperAdvice.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/EnumerationHelperAdvice.java
@@ -70,7 +70,7 @@ public class EnumerationHelperAdvice extends AbstractEditHelperAdvice {
if (null != elementsToMove) {
// After compare
- Set<View> viewsToDestroy = new HashSet<View>();
+ Set<View> viewsToDestroy = new HashSet<>();
Iterator<EObject> it = elementsToMove.iterator();
@@ -103,7 +103,7 @@ public class EnumerationHelperAdvice extends AbstractEditHelperAdvice {
protected ICommand getAfterMoveCommand(final MoveRequest request) {
ICommand moveCommand = super.getAfterMoveCommand(request);
- Set<View> viewsToDestroy = new HashSet<View>();
+ Set<View> viewsToDestroy = new HashSet<>();
Object parameter = request.getParameter(RequestParameterConstants.TYPE_MOVING);
@@ -135,7 +135,7 @@ public class EnumerationHelperAdvice extends AbstractEditHelperAdvice {
* @return the list of {@link View} to delete
*/
protected Set<View> getMemberViewsToDestroy(final EObject object) {
- Set<View> viewsToDestroy = new HashSet<View>();
+ Set<View> viewsToDestroy = new HashSet<>();
// Find Views in Class Diagram that are referencing current member
Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(object, ModelEditPart.MODEL_ID).iterator();
while (viewIt.hasNext()) {
@@ -156,14 +156,14 @@ public class EnumerationHelperAdvice extends AbstractEditHelperAdvice {
}
/**
- *
+ *
* @param listOne
* @param listTwo
* @return
*/
protected List<EObject> substractLists(final List<EObject> listOne, final List<EObject> listTwo) {
- List<EObject> sourceList = new ArrayList<EObject>(listOne);
- List<EObject> destinationList = new ArrayList<EObject>(listTwo);
+ List<EObject> sourceList = new ArrayList<>(listOne);
+ List<EObject> destinationList = new ArrayList<>(listTwo);
sourceList.removeAll(listTwo);
destinationList.removeAll(listOne);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/GeneralizationHelperAdvice.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/GeneralizationHelperAdvice.java
index c0c9a13d4f7..5759b10469c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/GeneralizationHelperAdvice.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/advice/GeneralizationHelperAdvice.java
@@ -44,7 +44,7 @@ public class GeneralizationHelperAdvice extends AbstractEditHelperAdvice {
@Override
protected ICommand getBeforeReorientRelationshipCommand(ReorientRelationshipRequest request) {
// The list of member views becoming inconsistent after re-orient that should be deleted.
- Set<View> viewsToDestroy = new HashSet<View>();
+ Set<View> viewsToDestroy = new HashSet<>();
if (request.getRelationship() instanceof Generalization) {
viewsToDestroy.addAll(getMemberViewsToDestroy((Generalization) request.getRelationship()));
}
@@ -61,7 +61,7 @@ public class GeneralizationHelperAdvice extends AbstractEditHelperAdvice {
@Override
protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) {
EObject destructee = request.getElementToDestroy();
- Set<View> viewsToDestroy = new HashSet<View>();
+ Set<View> viewsToDestroy = new HashSet<>();
if (destructee instanceof Generalization) {
viewsToDestroy = getMemberViewsToDestroy((Generalization) destructee);
}
@@ -81,7 +81,7 @@ public class GeneralizationHelperAdvice extends AbstractEditHelperAdvice {
* @return the list of {@link View} to delete
*/
protected Set<View> getMemberViewsToDestroy(Generalization generalization) {
- Set<View> viewsToDestroy = new HashSet<View>();
+ Set<View> viewsToDestroy = new HashSet<>();
Classifier general = generalization.getGeneral();
if (general != null) {
// Parse members
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/InnerClassHyperlinkContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/InnerClassHyperlinkContributor.java
index 91b1c7fac63..da9d80a2ed7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/InnerClassHyperlinkContributor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/InnerClassHyperlinkContributor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.hyperlink;
@@ -36,7 +36,7 @@ import org.eclipse.uml2.uml.Element;
/**
* Returns a list of HyperLinkSpecificObjects (view elements) referencing
* inner classes of the class
- *
+ *
* @author Shuai Li
* @since 3.0
*
@@ -49,19 +49,20 @@ public class InnerClassHyperlinkContributor implements HyperlinkContributor {
* @param fromElement
* @return
*/
+ @Override
public List<HyperLinkObject> getHyperlinks(Object fromElement) {
- ArrayList<HyperLinkObject> hyperlinks = new ArrayList<HyperLinkObject>();
-
+ ArrayList<HyperLinkObject> hyperlinks = new ArrayList<>();
+
if (fromElement instanceof org.eclipse.uml2.uml.Class) {
List<Element> elements = ((org.eclipse.uml2.uml.Class) fromElement).getOwnedElements();
- List<org.eclipse.uml2.uml.Class> classes = new LinkedList<org.eclipse.uml2.uml.Class>();
+ List<org.eclipse.uml2.uml.Class> classes = new LinkedList<>();
for (Element element : elements) {
if ("Class".equals(element.eClass().getName())) {
classes.add((org.eclipse.uml2.uml.Class) element);
}
}
- List<Object> objectsInViews = new ArrayList<Object>();
-
+ List<Object> objectsInViews = new ArrayList<>();
+
for (org.eclipse.uml2.uml.Class clazz : classes) {
ViewerSearchService viewerSearchService = null;
try {
@@ -84,15 +85,15 @@ public class InnerClassHyperlinkContributor implements HyperlinkContributor {
}
}
}
-
+
if (viewerSearchService != null) {
List<Object> viewerSearchResults = viewerSearchService.getViewersInCurrentModel(clazz, (org.eclipse.uml2.uml.Class) fromElement, false, false);
objectsInViews.addAll(viewerSearchResults);
}
}
-
+
for (Object object : objectsInViews) {
- if (object instanceof View && ((View) object).getDiagram()!= null) {
+ if (object instanceof View && ((View) object).getDiagram() != null) {
if (((View) object).getDiagram().getType().equals(ModelEditPart.MODEL_ID)) {
HyperLinkSpecificObject hyperlink = new HyperLinkSpecificObject((EObject) object);
hyperlinks.add(hyperlink);
@@ -100,7 +101,7 @@ public class InnerClassHyperlinkContributor implements HyperlinkContributor {
}
}
}
-
+
return hyperlinks;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestedPackageHyperlinkContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestedPackageHyperlinkContributor.java
index 75787854941..a35780d0bad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestedPackageHyperlinkContributor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestedPackageHyperlinkContributor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
* Contributors:
* Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
* Christian W. Damus - bug 485220
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.hyperlink;
@@ -39,7 +39,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
/**
* Returns a list of HyperLinkEditor objects referencing views directly owned by
* the nested packages of the double-clicked package.
- *
+ *
* @author Shuai Li
* @since 3.0
*
@@ -54,11 +54,11 @@ public class NestedPackageHyperlinkContributor implements HyperlinkContributor {
*/
@Override
public List<HyperLinkObject> getHyperlinks(Object fromElement) {
- ArrayList<HyperLinkObject> hyperlinks = new ArrayList<HyperLinkObject>();
+ ArrayList<HyperLinkObject> hyperlinks = new ArrayList<>();
if (fromElement instanceof org.eclipse.uml2.uml.Package) {
List<org.eclipse.uml2.uml.Package> nestedPackages = ((org.eclipse.uml2.uml.Package) fromElement).getNestedPackages();
- List<Object> pages = new ArrayList<Object>();
+ List<Object> pages = new ArrayList<>();
for (org.eclipse.uml2.uml.Package nestedPackage : nestedPackages) {
ViewerSearchService viewerSearchService = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestingPackageHyperlinkContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestingPackageHyperlinkContributor.java
index 7bce6b9458b..a6f47860a08 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestingPackageHyperlinkContributor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/hyperlink/NestingPackageHyperlinkContributor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
* Contributors:
* Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
* Christian W. Damus - bug 485220
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.hyperlink;
@@ -39,7 +39,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
/**
* Returns a list of HyperLinkEditor objects referencing views directly owned by
* the nesting package of the double-clicked package.
- *
+ *
* @author Shuai Li
* @since 3.0
*
@@ -54,11 +54,11 @@ public class NestingPackageHyperlinkContributor implements HyperlinkContributor
*/
@Override
public List<HyperLinkObject> getHyperlinks(Object fromElement) {
- ArrayList<HyperLinkObject> hyperlinks = new ArrayList<HyperLinkObject>();
+ ArrayList<HyperLinkObject> hyperlinks = new ArrayList<>();
if (fromElement instanceof org.eclipse.uml2.uml.Package) {
org.eclipse.uml2.uml.Package nestingPackage = ((org.eclipse.uml2.uml.Package) fromElement).getNestingPackage();
- List<Object> pages = new ArrayList<Object>();
+ List<Object> pages = new ArrayList<>();
if (nestingPackage != null) {
ViewerSearchService viewerSearchService = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/locator/ContainmentCircleOnPackageLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/locator/ContainmentCircleOnPackageLocator.java
index dcc7a35acd1..56b203ac1be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/locator/ContainmentCircleOnPackageLocator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/locator/ContainmentCircleOnPackageLocator.java
@@ -25,9 +25,10 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageNodePlateFigure
/**
* The Class ContainmentCircleOnPackageLocator.
+ *
* @since 3.0
*/
-@Deprecated //Unused: PortPositionLocator used instead
+@Deprecated // Unused: PortPositionLocator used instead
public class ContainmentCircleOnPackageLocator extends BorderItemLocator {
/** The Constant DEFAULT_BORDER_ITEM_OFFSET. */
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java
index dab6f3e5e0b..c85f0f97cfb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java
@@ -21,6 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
+ *
* @since 3.0
*/
public class ClassReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
@@ -66,7 +67,7 @@ public class ClassReconcilerForCompartment_1_2_0 extends ReconcilerForCompartmen
private static final String PackagePackageableElementCompartmentEditPartCN_VISUAL_ID = "7010"; //$NON-NLS-1$
private static final String EnumerationEnumerationLiteralCompartmentEditPartCN_VISUAL_ID = "7031"; //$NON-NLS-1$
private static final String InstanceSpecificationSlotCompartmentEditPartCN_VISUAL_ID = "7035"; //$NON-NLS-1$
-
+
/** The compartments visual id. */
private List<String> compartmentsVisualID = Arrays.asList(
ClassAttributeCompartmentEditPart_VISUAL_ID,
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java
index 8c650888c2a..9043b646f60 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java
@@ -36,6 +36,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
/**
* Class Diagram Reconciler from 1.0.0 to 1.1.0
+ *
* @since 3.0
*/
public class ClassReconciler_1_1_0 extends DiagramReconciler {
@@ -104,7 +105,7 @@ public class ClassReconciler_1_1_0 extends DiagramReconciler {
* @return the floating label map
*/
private Map<String, String> getFloatingLabelMap() {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
map.put(ClassEditPart_VISUAL_ID, ClassFloatingNameEditPart_VISUAL_ID);
map.put(AssociationClassEditPart_VISUAL_ID, AssociationClassFloatingNameEditPart_VISUAL_ID);
map.put(AssociationNodeEditPart_VISUAL_ID, AssociationFloatingNameEditPart_VISUAL_ID);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_2_0.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_2_0.java
index f50335e1bdf..66ee934beb9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_2_0.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_2_0.java
@@ -87,8 +87,8 @@ public class ClassReconciler_1_2_0 extends DiagramReconciler {
public static String getNewVisualID(String oldVisualID) {
switch (oldVisualID) {
- case "1000": //$NON-NLS-1$ //$NON-NLS-1$
- return "Package_ClassDiagram"; //$NON-NLS-1$ //$NON-NLS-1$
+ case "1000": //$NON-NLS-1$
+ return "Package_ClassDiagram"; //$NON-NLS-1$
case "3012": //$NON-NLS-1$
return "Property_ClassAttributeLabel"; //$NON-NLS-1$
case "3002": //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/CustomMessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/CustomMessageFormatParser.java
index a195dc5a931..b6b82caa9b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/CustomMessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/CustomMessageFormatParser.java
@@ -96,7 +96,7 @@ public class CustomMessageFormatParser extends MessageFormatParser {
* @return the associated element
*/
protected IAdaptable obtainObject(IAdaptable adapter) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
+ EObject element = adapter.getAdapter(EObject.class);
Object result = element.eGet(eRefFeature);
// this is a collection
if (result instanceof List<?>) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/EndMemberKind.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/EndMemberKind.java
index 80dad69f53f..d735ff71ec6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/EndMemberKind.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/EndMemberKind.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/GeneralizationSetConstraintParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/GeneralizationSetConstraintParser.java
index 7ac3dd90721..0903f163ce3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/GeneralizationSetConstraintParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/GeneralizationSetConstraintParser.java
@@ -74,7 +74,8 @@ public class GeneralizationSetConstraintParser implements IParser {
out = out + "overlapping}";
}
return out;
- };
+ }
+ ;
return "";
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java
index 67c00f792e2..0c5cf3aa353 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java
@@ -97,7 +97,7 @@ public class OperationParser implements IParser {
protected void doExecute() {
if (InternationalizationPreferencesUtils.getInternationalizationPreference(operation) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(operation)) {
UMLLabelInternationalization.getInstance().setLabel(operation, result, null);
- }else{
+ } else {
operation.setName(result);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java
index b46d9ef49f8..36f03985070 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java
@@ -101,7 +101,7 @@ public class PropertyParser implements IParser {
protected void doExecute() {
if (InternationalizationPreferencesUtils.getInternationalizationPreference(property) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(property)) {
UMLLabelInternationalization.getInstance().setLabel(property, result, null);
- }else{
+ } else {
property.setName(result);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java
index d63d5fa35ca..a71045ad76d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java
@@ -28,7 +28,7 @@ import org.eclipse.uml2.uml.InstanceSpecification;
/**
* The base class of InstanceSpecification link edge parser
- *
+ *
*/
public class RoleInstanceSpecificationLinkParser implements IParser {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java
index 8d229de614f..aaddb2a5cb3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java
@@ -39,7 +39,7 @@ import org.eclipse.uml2.uml.TemplateParameterSubstitution;
public class TemplateBindingParser implements IParser {
private static final String EMPTY_STR = ""; //$NON-NLS-1$
-
+
final ILabelProvider labelProvider = new AdapterFactoryLabelProvider(org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
/**
@@ -85,7 +85,7 @@ public class TemplateBindingParser implements IParser {
final TemplateBinding binding = (TemplateBinding) e;
for (TemplateParameterSubstitution substitution : binding.getParameterSubstitutions()) {
if (!EMPTY_STR.equals(out)) {
- out += ", "; // add separator, if not empty //$NON-NLS-1$
+ out += ", "; // add separator, if not empty //$NON-NLS-1$
}
if (substitution.getFormal() != null && substitution.getFormal().getParameteredElement() instanceof NamedElement) {
out += UMLLabelInternationalization.getInstance().getLabel(((NamedElement) substitution.getFormal().getParameteredElement()));
@@ -98,8 +98,7 @@ public class TemplateBindingParser implements IParser {
}
if (EMPTY_STR.equals(out)) {
out = String.format("«bind»\n<No Binding Substitution>", out); //$NON-NLS-1$
- }
- else {
+ } else {
out = String.format("«bind»\n<%s>", out); //$NON-NLS-1$
}
return out;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java
index 83d01b4af0c..3ca8a23abc6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java
@@ -75,10 +75,10 @@ public class TemplateParameterParser implements IParser {
if (templateParam.getParameteredElement() instanceof NamedElement) {
NamedElement namedElement = (NamedElement) templateParam.getParameteredElement();
String name = newString.substring(0, newString.indexOf(":"));
- if(InternationalizationPreferencesUtils.getInternationalizationPreference(namedElement) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(namedElement)){
- final ModelSet modelSet = (ModelSet)namedElement.eResource().getResourceSet();
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(namedElement) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(namedElement)) {
+ final ModelSet modelSet = (ModelSet) namedElement.eResource().getResourceSet();
command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), namedElement, name.trim(), null));
- }else{
+ } else {
SetRequest request = new SetRequest(namedElement, UMLPackage.eINSTANCE.getNamedElement_Name(), name.trim());
command = new SetValueCommand(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeEnumerationLiteralDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeEnumerationLiteralDisplayEditPolicy.java
index 98d7a181549..b4bdb8cdc7b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeEnumerationLiteralDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeEnumerationLiteralDisplayEditPolicy.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
* Contributors:
* Celine JANSSENS (ALL4TEC) celine.janssens@all4tec.net - Initial API and implementation
* Celine JANSSENS (ALL4TEC) celine.janssens@all4tec.net - Bug 472034
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
@@ -24,7 +24,7 @@ import org.eclipse.uml2.uml.EnumerationLiteral;
/**
* This Policy is to be used for Enumeration Literal Edit Part to manage the stereotype display
- *
+ *
* @author Céline JANSSENS
*
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java
index b3663079b1c..203e17a61ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java
@@ -5,7 +5,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.NestedStereotypeLabel
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
/**
- *
+ *
*
*/
public class AppliedStereotypeNestedLabelDisplayEditPolicy extends AppliedStereotypeLabelDisplayEditPolicy {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomContainmentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomContainmentCreationEditPolicy.java
index 2d7e49cbebd..a17017b3d4e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomContainmentCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomContainmentCreationEditPolicy.java
@@ -59,7 +59,7 @@ public class CustomContainmentCreationEditPolicy extends DefaultCreationEditPoli
@Override
protected Command getReparentCommand(ChangeBoundsRequest request) {
Iterator<?> editParts = request.getEditParts().iterator();
- View container = (View) getHost().getAdapter(View.class);
+ View container = getHost().getAdapter(View.class);
EObject context = container == null ? null : ViewUtil.resolveSemanticElement(container);
CompositeCommand cc = new CompositeCommand(DiagramUIMessages.AddCommand_Label);
while (editParts.hasNext()) {
@@ -70,7 +70,7 @@ public class CustomContainmentCreationEditPolicy extends DefaultCreationEditPoli
if (ep instanceof GroupEditPart) {
cc.compose(getReparentGroupCommand((GroupEditPart) ep));
}
- View view = (View) ep.getAdapter(View.class);
+ View view = ep.getAdapter(View.class);
if (view == null) {
continue;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomGraphicalNodeEditPolicy.java
index 572f71f0e31..99fdc6ae29c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomGraphicalNodeEditPolicy.java
@@ -11,7 +11,7 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Bug 506314
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Bug 506314
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
@@ -53,7 +53,7 @@ public class CustomGraphicalNodeEditPolicy extends DefaultGraphicalNodeEditPolic
CreateRelationshipRequest createElementRequest = (CreateRelationshipRequest) requestAdapter.getAdapter(CreateRelationshipRequest.class);
IElementType elementType = createElementRequest.getElementType();
if (UMLElementTypes.AssociationClass_Edge.equals(elementType)
- || (elementType!= null && Arrays.asList(elementType.getAllSuperTypes()).contains(UMLElementTypes.AssociationClass_Edge))) {
+ || (elementType != null && Arrays.asList(elementType.getAllSuperTypes()).contains(UMLElementTypes.AssociationClass_Edge))) {
AssociationClassHelper associationClassHelper = new AssociationClassHelper(getEditingDomain());
return associationClassHelper.getAssociationClassElementCommand(((CreateConnectionViewAndElementRequest) request), c);
} else if (UMLElementTypes.Dependency_BranchEdge.equals(elementType)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomPackageReparentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomPackageReparentCreationEditPolicy.java
index bc5ba627b92..ae3b258105b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomPackageReparentCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/CustomPackageReparentCreationEditPolicy.java
@@ -54,7 +54,7 @@ public class CustomPackageReparentCreationEditPolicy extends PapyrusCreationEdit
@Override
protected Command getReparentCommand(ChangeBoundsRequest request) {
Iterator<?> editParts = request.getEditParts().iterator();
- View container = (View) getHost().getAdapter(View.class);
+ View container = getHost().getAdapter(View.class);
EObject context = container == null ? null : ViewUtil.resolveSemanticElement(container);
CompositeCommand cc = new CompositeCommand(DiagramUIMessages.AddCommand_Label);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/DeleteLinkedAssociationClassViewEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/DeleteLinkedAssociationClassViewEditPolicy.java
index 16b80c07236..b092df85d3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/DeleteLinkedAssociationClassViewEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/DeleteLinkedAssociationClassViewEditPolicy.java
@@ -84,7 +84,7 @@ public class DeleteLinkedAssociationClassViewEditPolicy extends ViewComponentEdi
private Command getHideCommand(EditPart source, EditPart dashedLink) {
GroupRequest hideRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- List<EditPart> parts = new ArrayList<EditPart>();
+ List<EditPart> parts = new ArrayList<>();
parts.add(dashedLink);
parts.add(source);
hideRequest.setEditParts(parts);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/GeneralizationSetLabelDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/GeneralizationSetLabelDisplayEditPolicy.java
index 3953cc1556a..f004ea55aa5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/GeneralizationSetLabelDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/GeneralizationSetLabelDisplayEditPolicy.java
@@ -87,8 +87,8 @@ public class GeneralizationSetLabelDisplayEditPolicy extends AbstractEditPolicy
public Collection<GeneralizationSetEditPart> getAllSameSemanticGeneralizationSet(GeneralizationEditPart editPart) {
// look for all Generalization set connected to the source location that reference the same
// generalizationSet
- List<GeneralizationSetEditPart> result = new ArrayList<GeneralizationSetEditPart>();
- List<Object> linkList = new ArrayList<Object>();
+ List<GeneralizationSetEditPart> result = new ArrayList<>();
+ List<Object> linkList = new ArrayList<>();
for (Object object : editPart.getSourceConnections()) {
linkList.add(object);
}
@@ -133,7 +133,7 @@ public class GeneralizationSetLabelDisplayEditPolicy extends AbstractEditPolicy
if (getHost().getViewer() instanceof DiagramGraphicalViewer) {
if (getHost() instanceof GeneralizationSetEditPart) {
String elementID = EMFCoreUtil.getProxyID(((GeneralizationSetEditPart) getHost()).resolveSemanticElement());
- List<EditPart> editpartList = new ArrayList<EditPart>();
+ List<EditPart> editpartList = new ArrayList<>();
for (Object object : ((DiagramGraphicalViewer) (getHost().getViewer())).findEditPartsForElement(elementID, GeneralizationSetEditPart.class)) {
editpartList.add((EditPart) object);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java
index 0ec80092682..81cce0f022f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java
@@ -37,7 +37,7 @@ import org.eclipse.uml2.uml.UMLPackage;
*/
public class InstanceSpecificationNameLabelEditPolicy extends AbstractMaskManagedEditPolicy {
- protected final Map<String, String> masks = new HashMap<String, String>();
+ protected final Map<String, String> masks = new HashMap<>();
public InstanceSpecificationNameLabelEditPolicy() {
super();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java
index 29ef615988a..256190f2a48 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java
@@ -46,11 +46,11 @@ import org.eclipse.uml2.uml.Property;
public abstract class InstanceSpecificationRoleDisplayEditPolicy extends GraphicalEditPolicyEx implements NotificationListener, IPapyrusListener {
/** The Constant ACTIVATION_ERROR_MESSAGE. */
- private static final String ACTIVATION_ERROR_MESSAGE = "No semantic element was found during activation of the mask managed label edit policy"; //$NON-NLS-1$
+ private static final String ACTIVATION_ERROR_MESSAGE = "No semantic element was found during activation of the mask managed label edit policy"; //$NON-NLS-1$
// FIXME : See #449476
- // Will be fixed AFTER chaos (new generator) release.
- // An EditPolicy key should not imply its behavior (MASK)
+ // Will be fixed AFTER chaos (new generator) release.
+ // An EditPolicy key should not imply its behavior (MASK)
public static String INSTANCE_SPECIFICATION_ROLE_DISPLAY = IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY;
/**
@@ -157,7 +157,7 @@ public abstract class InstanceSpecificationRoleDisplayEditPolicy extends Graphic
return interestingProperty;
}
if (hostSemanticElement != null) {
- List<Property> array = new ArrayList<Property>();
+ List<Property> array = new ArrayList<>();
InstanceSpecification instanceSpecification = (InstanceSpecification) hostSemanticElement;
if (instanceSpecification.getClassifiers().size() > 0) {
if (instanceSpecification.getClassifiers().get(0) instanceof Association) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java
index e57ec551b38..7e2710a55a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java
@@ -9,7 +9,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.NestedStereotypeLabel
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
/**
- *
+ *
*
*/
public class NestedLabelMaskManagedEditPolicy extends AbstractMaskManagedEditPolicy {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/RemoveOrphanViewPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/RemoveOrphanViewPolicy.java
index d82ee0ab93f..70b6d1e5f1e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/RemoveOrphanViewPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/RemoveOrphanViewPolicy.java
@@ -63,51 +63,53 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.OrphanViewPolicy;
* connection is more complex. It is dependent of the diagram. see remove OrphanConnectionView
* policy in clazzdiagram
*
+ * @deprecated since 3.1
*/
+@Deprecated
public class RemoveOrphanViewPolicy extends OrphanViewPolicy {
- public String[] notOrphanNode = {
- AssociationClassAttributeCompartmentEditPart.VISUAL_ID,
- AssociationClassNestedClassifierCompartmentEditPart.VISUAL_ID,
- AssociationClassOperationCompartmentEditPart.VISUAL_ID,
- ClassAttributeCompartmentEditPart.VISUAL_ID,
- ClassAttributeCompartmentEditPartCN.VISUAL_ID,
- ClassNestedClassifierCompartmentEditPart.VISUAL_ID,
- ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID,
- ClassOperationCompartmentEditPart.VISUAL_ID,
- ClassOperationCompartmentEditPartCN.VISUAL_ID,
- ComponentAttributeCompartmentEditPart.VISUAL_ID,
- ComponentAttributeCompartmentEditPartCN.VISUAL_ID,
- ComponentNestedClassifierCompartmentEditPart.VISUAL_ID,
- ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID,
- ComponentOperationCompartmentEditPart.VISUAL_ID,
- ComponentOperationCompartmentEditPartCN.VISUAL_ID,
- DataTypeAttributeCompartmentEditPart.VISUAL_ID,
- DataTypeAttributeCompartmentEditPartCN.VISUAL_ID,
- DataTypeOperationCompartmentEditPart.VISUAL_ID,
- DataTypeOperationCompartmentEditPartCN.VISUAL_ID,
- EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID,
- EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID,
- InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID,
- InstanceSpecificationSlotCompartmentEditPartCN.VISUAL_ID,
- InterfaceAttributeCompartmentEditPart.VISUAL_ID,
- InterfaceAttributeCompartmentEditPartCN.VISUAL_ID,
- InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID,
- InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID,
- InterfaceOperationCompartmentEditPart.VISUAL_ID,
- InterfaceOperationCompartmentEditPartCN.VISUAL_ID,
- ModelPackageableElementCompartmentEditPartCN.VISUAL_ID,
- ModelPackageableElementCompartmentEditPartTN.VISUAL_ID,
- PackagePackageableElementCompartmentEditPart.VISUAL_ID,
- PackagePackageableElementCompartmentEditPartCN.VISUAL_ID,
- PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID,
- PrimitiveTypeAttributeCompartmentEditPartCN.VISUAL_ID,
- PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID,
- PrimitiveTypeOperationCompartmentEditPartCN.VISUAL_ID,
- RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.VISUAL_ID,
- SignalAttributeCompartmentEditPart.VISUAL_ID,
- SignalAttributeCompartmentEditPartCN.VISUAL_ID,
- TemplateSignatureTemplateParameterCompartmentEditPart.VISUAL_ID,
+ public String[] notOrphanNode = {
+ AssociationClassAttributeCompartmentEditPart.VISUAL_ID,
+ AssociationClassNestedClassifierCompartmentEditPart.VISUAL_ID,
+ AssociationClassOperationCompartmentEditPart.VISUAL_ID,
+ ClassAttributeCompartmentEditPart.VISUAL_ID,
+ ClassAttributeCompartmentEditPartCN.VISUAL_ID,
+ ClassNestedClassifierCompartmentEditPart.VISUAL_ID,
+ ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID,
+ ClassOperationCompartmentEditPart.VISUAL_ID,
+ ClassOperationCompartmentEditPartCN.VISUAL_ID,
+ ComponentAttributeCompartmentEditPart.VISUAL_ID,
+ ComponentAttributeCompartmentEditPartCN.VISUAL_ID,
+ ComponentNestedClassifierCompartmentEditPart.VISUAL_ID,
+ ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID,
+ ComponentOperationCompartmentEditPart.VISUAL_ID,
+ ComponentOperationCompartmentEditPartCN.VISUAL_ID,
+ DataTypeAttributeCompartmentEditPart.VISUAL_ID,
+ DataTypeAttributeCompartmentEditPartCN.VISUAL_ID,
+ DataTypeOperationCompartmentEditPart.VISUAL_ID,
+ DataTypeOperationCompartmentEditPartCN.VISUAL_ID,
+ EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID,
+ EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID,
+ InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID,
+ InstanceSpecificationSlotCompartmentEditPartCN.VISUAL_ID,
+ InterfaceAttributeCompartmentEditPart.VISUAL_ID,
+ InterfaceAttributeCompartmentEditPartCN.VISUAL_ID,
+ InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID,
+ InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID,
+ InterfaceOperationCompartmentEditPart.VISUAL_ID,
+ InterfaceOperationCompartmentEditPartCN.VISUAL_ID,
+ ModelPackageableElementCompartmentEditPartCN.VISUAL_ID,
+ ModelPackageableElementCompartmentEditPartTN.VISUAL_ID,
+ PackagePackageableElementCompartmentEditPart.VISUAL_ID,
+ PackagePackageableElementCompartmentEditPartCN.VISUAL_ID,
+ PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID,
+ PrimitiveTypeAttributeCompartmentEditPartCN.VISUAL_ID,
+ PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID,
+ PrimitiveTypeOperationCompartmentEditPartCN.VISUAL_ID,
+ RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.VISUAL_ID,
+ SignalAttributeCompartmentEditPart.VISUAL_ID,
+ SignalAttributeCompartmentEditPartCN.VISUAL_ID,
+ TemplateSignatureTemplateParameterCompartmentEditPart.VISUAL_ID,
};
public RemoveOrphanViewPolicy() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/TemplateParamaterDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/TemplateParamaterDisplayEditPolicy.java
index d19835d2cbc..b04ef49b1c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/TemplateParamaterDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/TemplateParamaterDisplayEditPolicy.java
@@ -33,7 +33,7 @@ import org.eclipse.uml2.uml.UMLPackage;
*/
public class TemplateParamaterDisplayEditPolicy extends GraphicalEditPolicy implements NotificationListener, IPapyrusListener {
- public static String TEMPLATE_PARAMETER_DISPLAY = "TEMPLATE_PARAMETER_DISPLAY"; //$NON-NLS-1$
+ public static String TEMPLATE_PARAMETER_DISPLAY = "TEMPLATE_PARAMETER_DISPLAY"; //$NON-NLS-1$
/**
* Stores the semantic element related to the edit policy. If resolveSemanticElement is used, there are problems when the edit part is getting
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
index d21acc43385..0a7a28a25cd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
@@ -79,7 +79,7 @@ public class CustomUMLParserProvider extends UMLParserProvider {
protected IParser getAppliedStereotypeParser(String defaultPrintString) {
return new AppliedStereotypeParser(defaultPrintString);
}
-
+
protected IParser getAppliedKeywordParser(String defaultPrintString) {
return new AppliedKeywordParser(defaultPrintString);
}
@@ -181,13 +181,13 @@ public class CustomUMLParserProvider extends UMLParserProvider {
case AppliedStereotypeInterfaceRealizationEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeSubstitutionEditPart.VISUAL_ID:
- return getAppliedKeywordParser(KeywordLabel.SUBSTITUTE);
+ return getAppliedKeywordParser(KeywordLabel.SUBSTITUTE);
case AppliedStereotypeRealizationEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeAbstractionEditPart.VISUAL_ID:
return getAppliedKeywordParser(KeywordLabel.ABSTRACTION);
case AppliedStereotypeUsageEditPart.VISUAL_ID:
- return getAppliedKeywordParser(KeywordLabel.USE);
+ return getAppliedKeywordParser(KeywordLabel.USE);
case AppliedStereotypeDependencyEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeElementImportEditPart.VISUAL_ID:
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/GraphicalAssociationBranchViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/GraphicalAssociationBranchViewCommand.java
index 6a3cf293566..b101d7f31f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/GraphicalAssociationBranchViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/GraphicalAssociationBranchViewCommand.java
@@ -27,9 +27,9 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.C
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.MultiAssociationHelper;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
import org.eclipse.uml2.uml.Property;
public class GraphicalAssociationBranchViewCommand extends CommonDeferredCreateConnectionViewCommand {
@@ -62,7 +62,7 @@ public class GraphicalAssociationBranchViewCommand extends CommonDeferredCreateC
associationEnd = (Property) associationEndWrapper;
}
if (associationEnd != null && associationEnd instanceof Property) {
- MultiAssociationHelper.setSemanticBranchEnd(view, (Property) associationEnd);
+ org.eclipse.papyrus.uml.diagram.common.helper.MultiAssociationHelper.setSemanticBranchEnd(view, (Property) associationEnd);
}
return commandResult;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/utils/GeneralizationUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/utils/GeneralizationUtil.java
index 3aa0dc45120..99bb9668378 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/utils/GeneralizationUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/utils/GeneralizationUtil.java
@@ -36,7 +36,7 @@ public class GeneralizationUtil {
* @param el
* a {@link Classifier} or a {@link Property}
* @return
- * <code>true</code> if the classifier has this generalization in its inheritance links (directly or indirectly) <code>false</code> if not
+ * <code>true</code> if the classifier has this generalization in its inheritance links (directly or indirectly) <code>false</code> if not
*/
public boolean isConcernedByGeneralizationChanges(Generalization generalization, View view) {
boolean isConcerned = false;
@@ -70,10 +70,10 @@ public class GeneralizationUtil {
* @param el
*
* @return
- * <code>true</code> if another way exists to inherit of this element <code>false</code> if not
+ * <code>true</code> if another way exists to inherit of this element <code>false</code> if not
*/
protected boolean existsAnotherInheritanceWay(Element inheritedElement, Generalization forbiddenPath, NamedElement el, Set<Element> ignoredGeneralizations) {
- Set<Generalization> generalizations = new HashSet<Generalization>();
+ Set<Generalization> generalizations = new HashSet<>();
Classifier _classifier = null;
if (el instanceof Property) {
Type type = ((Property) el).getType();
@@ -85,7 +85,7 @@ public class GeneralizationUtil {
}
// List Generalization that have already been tested to avoid loop issues
// in case of Generalization cycles (such cycle creation should be avoided)
- Set<Element> ignoredGeneralizationsTmp = new HashSet<Element>();
+ Set<Element> ignoredGeneralizationsTmp = new HashSet<>();
if (ignoredGeneralizations != null) {
ignoredGeneralizationsTmp.addAll(ignoredGeneralizations);
}
@@ -114,7 +114,7 @@ public class GeneralizationUtil {
* @param view
* a view
* @return
- * the Element owning this view
+ * the Element owning this view
* or <code>null</code> if not found
*/
protected NamedElement getGraphicalOwner(View view) {
@@ -134,17 +134,17 @@ public class GeneralizationUtil {
* @param classifier
* a classifier
* @return
- * all the generalization (direct and indirect) owning by the classifier
+ * all the generalization (direct and indirect) owning by the classifier
*/
protected Set<Generalization> getAllGeneralization(Classifier classifier, Set<Classifier> alreadyParsedClassifiers) {
- Set<Generalization> generalizations = new HashSet<Generalization>();
+ Set<Generalization> generalizations = new HashSet<>();
// Keep track of already parsed Classifiers to avoid loop in case
// of Generalization cycle.
- Set<Classifier> parsedClassifiers = new HashSet<Classifier>();
+ Set<Classifier> parsedClassifiers = new HashSet<>();
if (alreadyParsedClassifiers != null) {
parsedClassifiers.addAll(alreadyParsedClassifiers);
}
- Set<Generalization> generalizationsTmp = new HashSet<Generalization>();
+ Set<Generalization> generalizationsTmp = new HashSet<>();
if (classifier != null) {
generalizations.addAll(classifier.getGeneralizations());
if (!parsedClassifiers.contains(classifier)) {

Back to the top