Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Noyrit2015-02-07 10:01:58 +0000
committerFlorian Noyrit2015-02-07 10:01:58 +0000
commitf88c47d042015e59bfef4f923d9cb142574d3c54 (patch)
tree44e04306afa38f023191c2000c15f56ad857a6cd
parent2ceb2e4bf48866ea987a64ebf0d8e1ebb734eb40 (diff)
parent57390978ec7cef8bd26bdaaca940c8c143276c15 (diff)
downloadorg.eclipse.papyrus-f88c47d042015e59bfef4f923d9cb142574d3c54.tar.gz
org.eclipse.papyrus-f88c47d042015e59bfef4f923d9cb142574d3c54.tar.xz
org.eclipse.papyrus-f88c47d042015e59bfef4f923d9cb142574d3c54.zip
Merge branch 'master' into committers/fnoyrit/elementtypesconfigurations
Conflicts: plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CInstanceSpecificationLinkCreateCommand.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ClassDiagramDragDropEditPolicy.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/ui/AssociationSelectionDialog.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForClassEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForComponentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForInterfaceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForClassEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForComponentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForInterfaceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForClassEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForComponentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForInterfaceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForClassEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForComponentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForInterfaceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForClassEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForComponentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForInterfaceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForClassEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForComponentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForInterfaceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java19
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/Messages.java2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/messages.properties2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java46
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization/src/org/eclipse/papyrus/customization/plugin/PluginEditor.java10
-rw-r--r--plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/file/ManifestEditor.java12
-rw-r--r--plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IManifestEditor.java10
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java16
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ClassDiagramDragDropEditPolicy.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen144
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForClassEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForComponentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForInterfaceEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForClassEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForComponentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForInterfaceEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForClassEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForComponentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForInterfaceEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForClassEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForComponentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForInterfaceEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForClassEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForComponentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForInterfaceEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForClassEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForComponentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForInterfaceEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.ecore11
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.genmodel16
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.ecore13
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.genmodel46
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.uml62
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/plugin.xml7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/Documentation.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationFactory.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationPackage.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationFactoryImpl.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationImpl.java77
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationPackageImpl.java53
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationAdapterFactory.java34
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceFactoryImpl.java12
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceImpl.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationSwitch.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationXMLProcessor.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/AttributeMatchLabelProvider.java249
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/results/PapyrusSearchResult.java581
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/InstanceSpecificationLinkCreateCommand.java175
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/ui/AssociationSelectionDialog.java62
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java30
56 files changed, 1167 insertions, 891 deletions
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java
index 7e7c9103f2a..035c06912b5 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java
@@ -12,6 +12,8 @@
*****************************************************************************/
package org.eclipse.papyrus.dsml.validation.generation.ui;
+import java.io.IOException;
+
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
@@ -19,6 +21,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
@@ -126,6 +129,8 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
if (uri.segmentCount() >= 2) {
existingProject = root.getProject(uri.segment(1));
}
+ IProject hostingProject = existingProject;
+
int question = 0;
Shell shell = Display.getDefault().getActiveShell();
if ((existingProject != null) && existingProject.exists()) {
@@ -166,6 +171,7 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
// generate plugin + extension point
try {
ValidationPluginGenerator.instance.generate(existingProject, constraintsManager, definition);
+ addDependencyToHostingProject(shell, hostingProject);
} catch (Exception e) {
Activator.log.error(e);
MessageDialog.openInformation(shell, Messages.CreateJavaValidationPluginHandler_ExceptionDuringPluginGeneration, Messages.CreateJavaValidationPluginHandler_CheckErrorLog);
@@ -174,6 +180,12 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
}
else if (question == 0) {
+ try {
+ addDependencyToHostingProject(shell, hostingProject);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ MessageDialog.openInformation(shell, Messages.CreateJavaValidationPluginHandler_ExceptionDuringPluginGeneration, Messages.CreateJavaValidationPluginHandler_CheckErrorLog);
+ }
CreateEMFValidationProject wizard = new CreateEMFValidationProject(profileSelection, constraintsManager, definition);
wizard.openDialog();
}
@@ -181,6 +193,13 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
return null;
}
+ public void addDependencyToHostingProject(Shell shell, IProject hostingProject) throws CoreException, IOException {
+ if (ValidationPluginGenerator.instance.addDSMLdependency(hostingProject)) {
+ MessageDialog.openInformation(shell, Messages.CreateJavaValidationPluginHandler_DependencyAdded,
+ String.format(Messages.CreateJavaValidationPluginHandler_DependencyAddedMsg, hostingProject.getName()));
+ }
+ }
+
@Override
public boolean isEnabled() {
EObject eObject = getSelectedElement();
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/Messages.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/Messages.java
index 7893bc039e4..eb9fa457e06 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/Messages.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/Messages.java
@@ -24,6 +24,8 @@ public class Messages extends NLS {
public static String CreateJavaValidationPluginHandler_CheckErrorLog;
public static String CreateJavaValidationPluginHandler_ChoosePluginGeneration;
public static String CreateJavaValidationPluginHandler_CreateNewPlugin;
+ public static String CreateJavaValidationPluginHandler_DependencyAdded;
+ public static String CreateJavaValidationPluginHandler_DependencyAddedMsg;
public static String CreateJavaValidationPluginHandler_ExceptionDuringPluginGeneration;
public static String CreateJavaValidationPluginHandler_GenerateIntoExisting;
public static String CreateJavaValidationPluginHandler_SelectExisting;
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/messages.properties b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/messages.properties
index 28c8a85b6e5..e4a290ae752 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/messages.properties
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/messages.properties
@@ -1,6 +1,8 @@
CreateJavaValidationPluginHandler_CheckErrorLog=An exception occured during plugin generation. Please check the error log.
CreateJavaValidationPluginHandler_ChoosePluginGeneration=Choose plugin generation
CreateJavaValidationPluginHandler_CreateNewPlugin=Create a new plugin
+CreateJavaValidationPluginHandler_DependencyAdded=Dependency has been added
+CreateJavaValidationPluginHandler_DependencyAddedMsg=A dependency to the DSML profile plugin has been added to project "%s". This assures that the validation profile will be automatically installed during deployment.
CreateJavaValidationPluginHandler_ExceptionDuringPluginGeneration=Exception occured during plugin generation
CreateJavaValidationPluginHandler_GenerateIntoExisting=Generate DSML code into existing plugin\nCAVEAT: this operation will modify the plugin.xml
CreateJavaValidationPluginHandler_HostCurrent=Host in current plugin
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java
index 925168e65dd..780ec9f136a 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java
@@ -32,6 +32,7 @@ import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraint
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager;
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IValidationRule;
import org.eclipse.papyrus.dsml.validation.model.profilenames.Utils;
+import org.eclipse.papyrus.eclipse.project.editors.file.ManifestEditor;
import org.eclipse.papyrus.eclipse.project.editors.interfaces.IPluginProjectEditor;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Stereotype;
@@ -88,9 +89,13 @@ public class ValidationPluginGenerator {
private static final String UML_PLUGIN = "org.eclipse.uml2.uml"; //$NON-NLS-1$
private static final String EMF_VALIDATION_PLUGIN = "org.eclipse.emf.validation"; //$NON-NLS-1$
-
+
private static final String UML_VALIDATION_PLUGIN = "org.eclipse.papyrus.uml.service.validation"; //$NON-NLS-1$
+ // A generated plugin will depend on the validation profile, since it typically contains the profile as well.
+ // [well, that's not always the case]
+ private static final String UML_VALIDATION_PROFILE_PLUGIN = "org.eclipse.papyrus.dsml.validation"; //$NON-NLS-1$
+
private static final String UML_URL = "http://www.eclipse.org/uml2/5.0.0/UML"; //$NON-NLS-1$
@@ -104,21 +109,45 @@ public class ValidationPluginGenerator {
private IConstraintsManager constraintsManager;
/**
- * generate the java code form constraints contained in the profile
+ * Add a dependency to the plugin hosting the DSML profile.
+ *
+ * @param project
+ * The Eclipse project
+ * @return true, if dependency has been added
+ * @throws CoreException
+ * @throws IOException
+ */
+ public boolean addDSMLdependency(IProject project) throws
+ CoreException, IOException {
+
+ if ((project != null) && project.exists()) {
+ ManifestEditor manifest = new ManifestEditor(project);
+ manifest.init();
+ if (manifest.initOk() && !manifest.hasDependency(UML_VALIDATION_PROFILE_PLUGIN)) {
+ manifest.addDependency(UML_VALIDATION_PROFILE_PLUGIN);
+ manifest.save();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Generate the java code form constraints contained in the profile
*
* @param project
- * the project eclipse
- * @param wizard
- * the ref to to wizard
+ * the Eclipse project
* @param constraintsManager
* the class in charge to collect all information from the model
+ * @param definition
+ * The definition of the profile for which a plugin is generated
* @throws CoreException
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
- public void generate(IProject project, IConstraintsManager constraintsManager, EPackage definition) throws CoreException,
- IOException, SAXException, ParserConfigurationException {
+ public void generate(IProject project, IConstraintsManager constraintsManager, EPackage definition) throws
+ CoreException, IOException, SAXException, ParserConfigurationException {
PluginEditor editor;
this.constraintsManager = constraintsManager;
@@ -141,7 +170,7 @@ public class ValidationPluginGenerator {
editor.getManifestEditor().addDependency(EMF_VALIDATION_PLUGIN);
editor.getManifestEditor().addDependency(UML_VALIDATION_PLUGIN);
editor.getManifestEditor().addDependency(UML_PLUGIN);
-
+
Element constraintProviderExtension =
createOrCleanExtension(editor, EMF_VALIDATION_CONSTRAINT_PROVIDERS_EXTENSIONPOINT);
@@ -309,6 +338,7 @@ public class ValidationPluginGenerator {
* @param constraintProvider
* @param parentElement
* @param editor
+ * @param definition
* @return the extension point
*/
@SuppressWarnings("nls")
diff --git a/plugins/customization/org.eclipse.papyrus.customization/src/org/eclipse/papyrus/customization/plugin/PluginEditor.java b/plugins/customization/org.eclipse.papyrus.customization/src/org/eclipse/papyrus/customization/plugin/PluginEditor.java
index 028a0e3073b..d35c703017c 100644
--- a/plugins/customization/org.eclipse.papyrus.customization/src/org/eclipse/papyrus/customization/plugin/PluginEditor.java
+++ b/plugins/customization/org.eclipse.papyrus.customization/src/org/eclipse/papyrus/customization/plugin/PluginEditor.java
@@ -76,6 +76,16 @@ public class PluginEditor extends PluginProjectEditor implements IPluginProjectE
manifest.addDependency(dependency, version);
}
+ /**
+ * @see org.eclipse.papyrus.eclipse.project.editors.interfaces.IManifestEditor#hasDependency(java.lang.String)
+ *
+ * @param dependency
+ * @return
+ */
+ public boolean hasDependency(String dependency) {
+ return manifest.hasDependency(dependency);
+ }
+
public void setValue(String key, String value) {
manifest.setValue(key, value);
}
diff --git a/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/file/ManifestEditor.java b/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/file/ManifestEditor.java
index 0f921bbf5e9..1c67da07c9f 100644
--- a/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/file/ManifestEditor.java
+++ b/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/file/ManifestEditor.java
@@ -147,6 +147,18 @@ public class ManifestEditor extends ProjectEditor implements IManifestEditor {
this.manifest.getMainAttributes().put(rqBundle, requireBundle);
}
+ /**
+ *
+ * @see org.eclipse.papyrus.eclipse.project.editors.interfaces.IManifestEditor#hasDependency(java.lang.String)
+ *
+ * {@inheritDoc}
+ */
+ public boolean hasDependency(final String dependency) {
+ final Name rqBundle = new Name(REQUIRED_BUNDLE);
+ String requireBundle = this.manifest.getMainAttributes().getValue(rqBundle);
+ return (requireBundle != null) && requireBundle.contains(dependency);
+ }
+
public void setDependenciesVersion(final String dependencyPattern, final String newVersion) {
final Name rqBundle = new Name(REQUIRED_BUNDLE);
final String requireBundles = this.manifest.getMainAttributes().getValue(rqBundle);
diff --git a/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IManifestEditor.java b/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IManifestEditor.java
index 0d05b57b7c0..a471b67f5c6 100644
--- a/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IManifestEditor.java
+++ b/plugins/infra/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IManifestEditor.java
@@ -51,13 +51,14 @@ public interface IManifestEditor extends IProjectEditor, IFileEditor {
public static final String BUNDLE_LOCALIZATION = "Bundle-Localization"; //$NON-NLS-1$
/**
- *
+ * Add a dependency to the MANIFEST
* @param dependency
* the dependency to add
*/
public void addDependency(final String dependency);
/**
+ * Add a specific version of a dependency to the MANIFEST
*
* @param dependency
* the dependency to add
@@ -66,6 +67,13 @@ public interface IManifestEditor extends IProjectEditor, IFileEditor {
*/
public void addDependency(final String dependency, final String version);
+ /**
+ * Check whether a dependency is already present in the MANIFEST
+ *
+ * @param dependency
+ * the dependency to check
+ */
+ public boolean hasDependency(final String dependency);
/**
*
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java
index 2aea40789da..75d7529ab3a 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java
@@ -103,16 +103,12 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (false == droppedEObject instanceof InstanceSpecification) {
return UnexecutableCommand.INSTANCE;
}
- if (((InstanceSpecification) droppedEObject).getClassifiers().size() > 0) {
- if (((InstanceSpecification) droppedEObject).getClassifiers().get(0) instanceof Association) {
- // DROP AS LINK
- List<InstanceSpecification> endTypes = InstanceSpecificationLinkHelper.getEnds(((InstanceSpecification) droppedEObject));
- if (endTypes.size() > 0) {
- Element source = endTypes.get(0);
- Element target = endTypes.get(1);
- return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop InstanceSpecification link"), source, target, ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint(), dropRequest.getLocation(), (Element) droppedEObject));
- }
- }
+ // DROP AS LINK
+ List<InstanceSpecification> endTypes = InstanceSpecificationLinkHelper.getEnds(((InstanceSpecification) droppedEObject));
+ if (endTypes.size() > 0) {
+ Element source = endTypes.get(0);
+ Element target = endTypes.get(1);
+ return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop InstanceSpecification link"), source, target, ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint(), dropRequest.getLocation(), (Element) droppedEObject));
}
// DROP AS A NODE
// drop into diagram
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java
index 057c24a3846..646518aa82c 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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 v1.0
@@ -30,6 +30,9 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndex;
import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndex.IndexHandler;
import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndexAdapter;
@@ -38,7 +41,9 @@ import org.eclipse.papyrus.uml.decoratormodel.Activator;
import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
import org.eclipse.papyrus.uml.decoratormodel.internal.resource.index.ProfileIndexHandler;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage;
import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.uml.UMLPackage;
import com.google.common.base.Function;
import com.google.common.collect.HashMultimap;
@@ -72,6 +77,14 @@ public class DecoratorModelIndex {
private final CopyOnWriteArrayList<IDecoratorModelIndexListener> listeners = Lists.newCopyOnWriteArrayList();
+ static {
+ // Ensure that packages required by the UML content describers won't be initialized in parallel by project index jobs
+ EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+ EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+ EPackage.Registry.INSTANCE.getEPackage(ProfileExternalizationPackage.eNS_URI);
+ }
+
/**
* Not instantiable by clients.
*/
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
new file mode 100644
index 00000000000..843ce8286cb
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
@@ -0,0 +1,51 @@
+package org.eclipse.papyrus.uml.diagram.clazz.custom.helper;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Helper for nested classifier labels displaying
+ */
+public class NestedStereotypeLabelHelper extends StereotypedElementLabelHelper {
+
+ private static NestedStereotypeLabelHelper myHelper;
+
+ /**
+ * {@inheritDoc}
+ */
+ public static NestedStereotypeLabelHelper getInstance() {
+ if (myHelper == null) {
+ myHelper = new NestedStereotypeLabelHelper();
+ }
+ return myHelper;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper#elementLabel(org.eclipse.gef.GraphicalEditPart)
+ *
+ * @param editPart
+ * @return
+ */
+ @Override
+ protected String elementLabel(GraphicalEditPart editPart) {
+ NamedElement namedElement = getUMLElement(editPart);
+ return namedElement == null ? "" : namedElement.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NamedElement getUMLElement(GraphicalEditPart editPart) {
+ if (editPart instanceof UMLCompartmentEditPart && editPart.getModel() instanceof View) {
+ View view = (View) editPart.getModel();
+ if (view.getElement() instanceof NamedElement) {
+ return (NamedElement) view.getElement();
+ }
+ }
+ return null;
+ }
+}
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
new file mode 100644
index 00000000000..9776e6400a2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AppliedStereotypeNestedLabelDisplayEditPolicy.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.NestedStereotypeLabelHelper;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+
+/**
+ *
+ *
+ */
+public class AppliedStereotypeNestedLabelDisplayEditPolicy extends AppliedStereotypeLabelDisplayEditPolicy {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy#refreshStereotypeDisplay()
+ *
+ */
+ @Override
+ protected void refreshStereotypeDisplay() {
+ NestedStereotypeLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart) getHost());
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ClassDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ClassDiagramDragDropEditPolicy.java
index 7670f71e6ce..8947345a8da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ClassDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ClassDiagramDragDropEditPolicy.java
@@ -175,30 +175,27 @@ public class ClassDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPol
* @return the command in charge of the drop
*/
protected Command dropInstanceSpecification(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
- if (semanticLink instanceof InstanceSpecification) {
- if (((InstanceSpecification) semanticLink).getClassifiers().size() > 0) {
- if (((InstanceSpecification) semanticLink).getClassifiers().get(0) instanceof Association) {
- // DROP AS LINK
- List<InstanceSpecification> endTypes = InstanceSpecificationLinkHelper.getEnds(((InstanceSpecification) semanticLink));
- if (endTypes.size() > 0) {
- Element source = endTypes.get(0);
- Element target = endTypes.get(1);
- return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop Instance"), source, target, InstanceSpecificationLinkEditPart.VISUAL_ID, dropRequest.getLocation(), semanticLink));
- }
- }
- }
- // DROP AS A NODE
- EObject graphicalParent = ((GraphicalEditPart) getHost()).resolveSemanticElement();
- // Restrict the default node creation to the following cases:
- // . Take the containment relationship into consideration
- // . Release the constraint when GraphicalParent is a diagram
- // drop into diagram
- if (getHost().getModel() instanceof Diagram) {
- return new ICommandProxy(getDefaultDropNodeCommand(InstanceSpecificationEditPart.VISUAL_ID, dropRequest.getLocation(), semanticLink));
- // drop into another editpart
- } else if ((graphicalParent instanceof Element) && ((Element) graphicalParent).getOwnedElements().contains(semanticLink)) {
- return new ICommandProxy(getDefaultDropNodeCommand(InstanceSpecificationEditPartCN.VISUAL_ID, dropRequest.getLocation(), semanticLink));
- }
+ if (false == (semanticLink instanceof InstanceSpecification)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // DROP AS LINK
+ List<InstanceSpecification> endTypes = InstanceSpecificationLinkHelper.getEnds(((InstanceSpecification) semanticLink));
+ if (endTypes.size() > 0) {
+ Element source = endTypes.get(0);
+ Element target = endTypes.get(1);
+ return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop Instance"), source, target, InstanceSpecificationLinkEditPart.VISUAL_ID, dropRequest.getLocation(), semanticLink));
+ }
+ // DROP AS A NODE
+ EObject graphicalParent = ((GraphicalEditPart) getHost()).resolveSemanticElement();
+ // Restrict the default node creation to the following cases:
+ // . Take the containment relationship into consideration
+ // . Release the constraint when GraphicalParent is a diagram
+ // drop into diagram
+ if (getHost().getModel() instanceof Diagram) {
+ return new ICommandProxy(getDefaultDropNodeCommand(InstanceSpecificationEditPart.VISUAL_ID, dropRequest.getLocation(), semanticLink));
+ // drop into another editpart
+ } else if ((graphicalParent instanceof Element) && ((Element) graphicalParent).getOwnedElements().contains(semanticLink)) {
+ return new ICommandProxy(getDefaultDropNodeCommand(InstanceSpecificationEditPartCN.VISUAL_ID, dropRequest.getLocation(), semanticLink));
}
return UnexecutableCommand.INSTANCE;
}
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
new file mode 100644
index 00000000000..2a8a3c14ba7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/NestedLabelMaskManagedEditPolicy.java
@@ -0,0 +1,46 @@
+package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.NestedStereotypeLabelHelper;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
+
+/**
+ *
+ *
+ */
+public class NestedLabelMaskManagedEditPolicy extends AbstractMaskManagedEditPolicy {
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy#getMasks()
+ *
+ * @return
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ return Collections.emptyMap();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy#refreshDisplay()
+ *
+ */
+ @Override
+ public void refreshDisplay() {
+ NestedStereotypeLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart) getHost());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy#getDefaultDisplayValue()
+ *
+ * @return
+ */
+ @Override
+ protected Collection<String> getDefaultDisplayValue() {
+ return Collections.emptyList();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen
index ca5d19b508f..205403c1a23 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen
@@ -387,6 +387,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
@@ -433,6 +441,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
@@ -479,6 +495,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
@@ -2493,6 +2517,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -2541,6 +2573,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -2589,6 +2629,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -2641,6 +2689,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
@@ -2693,6 +2749,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
@@ -2745,6 +2809,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
@@ -2801,6 +2873,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
@@ -2853,6 +2933,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
@@ -2905,6 +2993,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
@@ -2957,6 +3053,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
@@ -3005,6 +3109,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
@@ -3053,6 +3165,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
@@ -3105,6 +3225,14 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
@@ -3153,6 +3281,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
@@ -3201,6 +3337,14 @@
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForClassEditPart.java
index 4292202f10d..c9f132a8a9f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForClassEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedClassForClassEditPart extends UMLCompartmentEditPart implemen
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForComponentEditPart.java
index e81bf357875..ec04777e51d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForComponentEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedClassForComponentEditPart extends UMLCompartmentEditPart impl
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForInterfaceEditPart.java
index dad4b921e96..0878410fd5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedClassForInterfaceEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedClassForInterfaceEditPart extends UMLCompartmentEditPart impl
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForClassEditPart.java
index e3f2b881dd4..225dc19ca0d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForClassEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedDataTypeForClassEditPart extends UMLCompartmentEditPart imple
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForComponentEditPart.java
index 30490078513..954a857d7b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForComponentEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedDataTypeForComponentEditPart extends UMLCompartmentEditPart i
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForInterfaceEditPart.java
index 0b82b7c28eb..79805390c8e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedDataTypeForInterfaceEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedDataTypeForInterfaceEditPart extends UMLCompartmentEditPart i
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForClassEditPart.java
index fc1f9b49263..534808e8a1b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForClassEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedEnumerationForClassEditPart extends UMLCompartmentEditPart im
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForComponentEditPart.java
index 52e5d076a06..d4b37915447 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForComponentEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedEnumerationForComponentEditPart extends UMLCompartmentEditPar
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForInterfaceEditPart.java
index 7a2b12c8019..04fcc9fde44 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedEnumerationForInterfaceEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedEnumerationForInterfaceEditPart extends UMLCompartmentEditPar
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForClassEditPart.java
index 11abf11c1a9..07578201fe8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForClassEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedInterfaceForClassEditPart extends UMLCompartmentEditPart impl
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForComponentEditPart.java
index dd633cea1f8..cf06589aca5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForComponentEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedInterfaceForComponentEditPart extends UMLCompartmentEditPart
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForInterfaceEditPart.java
index cab60f8b0ab..a9988bdbeb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedInterfaceForInterfaceEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedInterfaceForInterfaceEditPart extends UMLCompartmentEditPart
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForClassEditPart.java
index f6ec920a100..66c1cf64f00 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForClassEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -162,6 +165,8 @@ public class NestedPrimitiveTypeForClassEditPart extends UMLCompartmentEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForComponentEditPart.java
index 334395312d1..1a563d210b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForComponentEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedPrimitiveTypeForComponentEditPart extends UMLCompartmentEditP
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForInterfaceEditPart.java
index 4cd0de339db..69aa59fd611 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedPrimitiveTypeForInterfaceEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedPrimitiveTypeForInterfaceEditPart extends UMLCompartmentEditP
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForClassEditPart.java
index 31eddce159e..e9f77f5086a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForClassEditPart.java
@@ -70,7 +70,9 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -78,6 +80,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -161,6 +164,8 @@ public class NestedSignalForClassEditPart extends UMLCompartmentEditPart impleme
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForComponentEditPart.java
index 87fbfdf5c53..6f4ddf5e28a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForComponentEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedSignalForComponentEditPart extends UMLCompartmentEditPart imp
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForInterfaceEditPart.java
index 8ce5d7d079e..2d504c54843 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/NestedSignalForInterfaceEditPart.java
@@ -70,6 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeNestedLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedLabelMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextNonResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -77,6 +79,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
@@ -159,6 +162,8 @@ public class NestedSignalForInterfaceEditPart extends UMLCompartmentEditPart imp
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new UMLTextNonResizableEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNestedLabelDisplayEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NestedLabelMaskManagedEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java
index 4de475d55e9..e5db3082152 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java
@@ -90,10 +90,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ if (op.getViewKind() == Node.class)
+ return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ if (op.getViewKind() == Edge.class)
+ return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.ecore b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.ecore
new file mode 100644
index 00000000000..cb2721d9570
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.ecore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="Documentation" nsURI="http://www.eclipse.org/papyrus/documentation"
+ nsPrefix="Documentation">
+ <eClassifiers xsi:type="ecore:EClass" name="Documentation">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Comment" ordered="false"
+ lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Comment"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="associatedResource" ordered="false"
+ upperBound="-1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.genmodel b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.genmodel
new file mode 100644
index 00000000000..356c7a392d7
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Documentation.genmodel
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.uml.documentation.profile/src-gen"
+ modelPluginID="org.eclipse.papyrus.uml.documentation.profile" modelName="Documentation"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>Documentation.ecore</foreignModel>
+ <genPackages prefix="Documentation" basePackage="org.eclipse.papyrus.uml.documentation"
+ disposableProviderFactory="true" ecorePackage="Documentation.ecore#/">
+ <genClasses ecoreClass="Documentation.ecore#//Documentation">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Documentation.ecore#//Documentation/base_Comment"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Documentation.ecore#//Documentation/associatedResource"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.ecore b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.ecore
deleted file mode 100644
index 15dab5dc8cf..00000000000
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.ecore
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="Papyrus" nsURI="http:///Papyrus.ecore" nsPrefix="Papyrus">
- <eSubpackages name="Documentation" nsURI="http://www.eclipse.org/papyrus/documentation"
- nsPrefix="documentation">
- <eClassifiers xsi:type="ecore:EClass" name="Documentation">
- <eStructuralFeatures xsi:type="ecore:EReference" name="base_Comment" ordered="false"
- lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Comment"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="associatedResource" ordered="false"
- upperBound="-1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/>
- </eClassifiers>
- </eSubpackages>
-</ecore:EPackage>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.genmodel b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.genmodel
deleted file mode 100644
index 919d680a0bf..00000000000
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.genmodel
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"
- modelDirectory="/org.eclipse.papyrus.uml.documentation.profile/src-gen"
- editDirectory="/org.eclipse.papyrus.uml.documentation.profile.edit/src-gen" editorDirectory="/org.eclipse.papyrus.uml.documentation.profile.editor/src-gen"
- modelPluginID="org.eclipse.papyrus.uml.documentation.profile" modelName="Papyrus"
- rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.uml2.uml.ecore.importer"
- complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml"
- operationReflection="true" importOrganizing="true">
- <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer">
- <details key="ECORE_TAGGED_VALUES" value="PROCESS"/>
- <details key="UNION_PROPERTIES" value="REPORT"/>
- <details key="UNTYPED_PROPERTIES" value="REPORT"/>
- <details key="DUPLICATE_FEATURES" value="DISCARD"/>
- <details key="SUBSETTING_PROPERTIES" value="REPORT"/>
- <details key="VALIDATION_DELEGATES" value="IGNORE"/>
- <details key="OPPOSITE_ROLE_NAMES" value="IGNORE"/>
- <details key="COMMENTS" value="PROCESS"/>
- <details key="DUPLICATE_FEATURE_INHERITANCE" value="DISCARD"/>
- <details key="DUPLICATE_OPERATIONS" value="DISCARD"/>
- <details key="PROPERTY_DEFAULT_EXPRESSIONS" value="IGNORE"/>
- <details key="INVARIANT_CONSTRAINTS" value="PROCESS"/>
- <details key="REDEFINING_PROPERTIES" value="REPORT"/>
- <details key="ANNOTATION_DETAILS" value="PROCESS"/>
- <details key="NON_API_INVARIANTS" value="IGNORE"/>
- <details key="DUPLICATE_OPERATION_INHERITANCE" value="DISCARD"/>
- <details key="REDEFINING_OPERATIONS" value="REPORT"/>
- <details key="INVOCATION_DELEGATES" value="IGNORE"/>
- <details key="DERIVED_FEATURES" value="PROCESS"/>
- <details key="OPERATION_BODIES" value="IGNORE"/>
- <details key="CAMEL_CASE_NAMES" value="IGNORE"/>
- <details key="SUPER_CLASS_ORDER" value="PROCESS"/>
- </genAnnotations>
- <foreignModel>Papyrus.profile.uml</foreignModel>
- <genPackages xsi:type="genmodel:GenPackage" prefix="Papyrus" basePackage="org.eclipse.papyrus.uml.documentation"
- disposableProviderFactory="true" ecorePackage="Papyrus.ecore#/">
- <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Documentation" basePackage="org.eclipse.papyrus.uml.documentation"
- resource="XML" disposableProviderFactory="true" ecorePackage="Papyrus.ecore#//Documentation">
- <genClasses xsi:type="genmodel:GenClass" ecoreClass="Papyrus.ecore#//Documentation/Documentation">
- <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
- propertySortChoices="true" ecoreFeature="ecore:EReference Papyrus.ecore#//Documentation/Documentation/base_Comment"/>
- <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute Papyrus.ecore#//Documentation/Documentation/associatedResource"/>
- </genClasses>
- </nestedGenPackages>
- </genPackages>
-</genmodel:GenModel>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.uml b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.uml
index d55d1363728..36852ff3939 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.uml
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/model/Papyrus.profile.uml
@@ -1,40 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_XkGiwB07Ed-QQ4mYkrb7Gg" name="Papyrus">
- <packageImport xmi:id="_b3qnYCWuEd62NaW46C6lHg">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packageImport xmi:id="_YlKXIB07Ed-QQ4mYkrb7Gg">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Profile" xmi:id="_H9068AEYEeCIz8iAxBJnfA" name="Documentation" URI="http://www.eclipse.org/papyrus/documentation">
- <eAnnotations xmi:id="_vaU6gQEYEeCIz8iAxBJnfA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <contents xmi:type="ecore:EPackage" xmi:id="_vaU6ggEYEeCIz8iAxBJnfA" name="Documentation" nsURI="http://Papyrus/schemas/Documentation/_vaU6gAEYEeCIz8iAxBJnfA/0" nsPrefix="Documentation">
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_vaU6gwEYEeCIz8iAxBJnfA" name="Documentation">
- <eAnnotations xmi:id="_vaU6hAEYEeCIz8iAxBJnfA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_O1Qs0AEYEeCIz8iAxBJnfA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_vaU6hQEYEeCIz8iAxBJnfA" name="base_Comment" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/3.0.0/UML#//Comment"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_vaU6hwEYEeCIz8iAxBJnfA" name="associatedResource" ordered="false" upperBound="-1">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- </eAnnotations>
- <elementImport xmi:id="_QbLhwgEYEeCIz8iAxBJnfA">
- <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
- </elementImport>
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_O1Qs0AEYEeCIz8iAxBJnfA" name="Documentation">
- <ownedAttribute xmi:id="_WuqSAgEYEeCIz8iAxBJnfA" name="base_Comment" association="_WuqSAAEYEeCIz8iAxBJnfA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
- </ownedAttribute>
- <ownedAttribute xmi:id="_XhxJ8AEYEeCIz8iAxBJnfA" name="associatedResource">
- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_gkFfAAEYEeCIz8iAxBJnfA"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_hF6ZsAEYEeCIz8iAxBJnfA" value="*"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_WuqSAAEYEeCIz8iAxBJnfA" name="Comment_Documentation" memberEnd="_WuqSAQEYEeCIz8iAxBJnfA _WuqSAgEYEeCIz8iAxBJnfA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_WuqSAQEYEeCIz8iAxBJnfA" name="extension_Documentation" type="_O1Qs0AEYEeCIz8iAxBJnfA" aggregation="composite" association="_WuqSAAEYEeCIz8iAxBJnfA"/>
- </packagedElement>
- </packagedElement>
-</uml:Profile>
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_H9068AEYEeCIz8iAxBJnfA" name="Documentation" URI="http://www.eclipse.org/papyrus/documentation">
+ <elementImport xmi:id="_QbLhwgEYEeCIz8iAxBJnfA">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
+ </elementImport>
+ <packageImport xmi:id="_b3qnYCWuEd62NaW46C6lHg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_O1Qs0AEYEeCIz8iAxBJnfA" name="Documentation">
+ <ownedAttribute xmi:id="_WuqSAgEYEeCIz8iAxBJnfA" name="base_Comment" association="_WuqSAAEYEeCIz8iAxBJnfA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_XhxJ8AEYEeCIz8iAxBJnfA" name="associatedResource">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_gkFfAAEYEeCIz8iAxBJnfA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_hF6ZsAEYEeCIz8iAxBJnfA" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_WuqSAAEYEeCIz8iAxBJnfA" name="Comment_Documentation" memberEnd="_WuqSAQEYEeCIz8iAxBJnfA _WuqSAgEYEeCIz8iAxBJnfA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_WuqSAQEYEeCIz8iAxBJnfA" name="extension_Documentation" type="_O1Qs0AEYEeCIz8iAxBJnfA" aggregation="composite" association="_WuqSAAEYEeCIz8iAxBJnfA"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/plugin.xml
index ab9d29ede70..8d4edcac658 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/plugin.xml
@@ -2,11 +2,11 @@
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated Papyrus.profile -->
+ <!-- @generated Documentation.profile -->
<package
uri="http://www.eclipse.org/papyrus/documentation"
class="org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage"
- genModel="model/Papyrus.profile.genmodel"/>
+ genModel="model/Documentation.genmodel"/>
</extension>
<extension
point="org.eclipse.uml2.uml.generated_package">
@@ -21,6 +21,5 @@
source="pathmap://PAPYRUS_DOCUMENTATION/"
target="platform:/plugin/org.eclipse.papyrus.uml.documentation.profile/model/">
</mapping>
- </extension>
-
+ </extension>
</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/Documentation.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/Documentation.java
index 3c35e9eb965..28e88506d8d 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/Documentation.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/Documentation.java
@@ -14,8 +14,8 @@ import org.eclipse.uml2.uml.Comment;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getBase_Comment <em>Base Comment</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getAssociatedResource <em>Associated Resource</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getBase_Comment <em>Base Comment</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getAssociatedResource <em>Associated Resource</em>}</li>
* </ul>
* </p>
*
@@ -31,7 +31,6 @@ public interface Documentation extends EObject {
* If the meaning of the '<em>Base Comment</em>' reference isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Base Comment</em>' reference.
* @see #setBase_Comment(Comment)
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage#getDocumentation_Base_Comment()
@@ -44,9 +43,7 @@ public interface Documentation extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getBase_Comment <em>Base Comment</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Base Comment</em>' reference.
+ * @param value the new value of the '<em>Base Comment</em>' reference.
* @see #getBase_Comment()
* @generated
*/
@@ -60,7 +57,6 @@ public interface Documentation extends EObject {
* If the meaning of the '<em>Associated Resource</em>' attribute list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Associated Resource</em>' attribute list.
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage#getDocumentation_AssociatedResource()
* @model dataType="org.eclipse.uml2.types.String" ordered="false"
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationFactory.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationFactory.java
index f062242bada..c8accb4701f 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationFactory.java
@@ -9,7 +9,6 @@ import org.eclipse.emf.ecore.EFactory;
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage
* @generated
*/
@@ -18,7 +17,6 @@ public interface DocumentationFactory extends EFactory {
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
DocumentationFactory eINSTANCE = org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationFactoryImpl.init();
@@ -27,7 +25,6 @@ public interface DocumentationFactory extends EFactory {
* Returns a new object of class '<em>Documentation</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return a new object of class '<em>Documentation</em>'.
* @generated
*/
@@ -37,7 +34,6 @@ public interface DocumentationFactory extends EFactory {
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the package supported by this factory.
* @generated
*/
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationPackage.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationPackage.java
index 5afc0a4ea1b..765470ff4c9 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationPackage.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/DocumentationPackage.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.ecore.EReference;
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationFactory
* @model kind="package"
* @generated
@@ -29,7 +28,6 @@ public interface DocumentationPackage extends EPackage {
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
String eNAME = "Documentation";
@@ -38,7 +36,6 @@ public interface DocumentationPackage extends EPackage {
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/papyrus/documentation";
@@ -47,16 +44,14 @@ public interface DocumentationPackage extends EPackage {
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- String eNS_PREFIX = "documentation";
+ String eNS_PREFIX = "Documentation";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
DocumentationPackage eINSTANCE = org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationPackageImpl.init();
@@ -65,7 +60,6 @@ public interface DocumentationPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl <em>Documentation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl
* @see org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationPackageImpl#getDocumentation()
* @generated
@@ -76,7 +70,6 @@ public interface DocumentationPackage extends EPackage {
* The feature id for the '<em><b>Base Comment</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -86,7 +79,6 @@ public interface DocumentationPackage extends EPackage {
* The feature id for the '<em><b>Associated Resource</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -96,7 +88,6 @@ public interface DocumentationPackage extends EPackage {
* The number of structural features of the '<em>Documentation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -106,7 +97,6 @@ public interface DocumentationPackage extends EPackage {
* The number of operations of the '<em>Documentation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -117,7 +107,6 @@ public interface DocumentationPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation <em>Documentation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Documentation</em>'.
* @see org.eclipse.papyrus.uml.documentation.Documentation.Documentation
* @generated
@@ -128,7 +117,6 @@ public interface DocumentationPackage extends EPackage {
* Returns the meta object for the reference '{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getBase_Comment <em>Base Comment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the reference '<em>Base Comment</em>'.
* @see org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getBase_Comment()
* @see #getDocumentation()
@@ -140,7 +128,6 @@ public interface DocumentationPackage extends EPackage {
* Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getAssociatedResource <em>Associated Resource</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the meta object for the attribute list '<em>Associated Resource</em>'.
* @see org.eclipse.papyrus.uml.documentation.Documentation.Documentation#getAssociatedResource()
* @see #getDocumentation()
@@ -152,7 +139,6 @@ public interface DocumentationPackage extends EPackage {
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -169,7 +155,6 @@ public interface DocumentationPackage extends EPackage {
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
* @generated
*/
interface Literals {
@@ -177,7 +162,6 @@ public interface DocumentationPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl <em>Documentation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl
* @see org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationPackageImpl#getDocumentation()
* @generated
@@ -188,7 +172,6 @@ public interface DocumentationPackage extends EPackage {
* The meta object literal for the '<em><b>Base Comment</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference DOCUMENTATION__BASE_COMMENT = eINSTANCE.getDocumentation_Base_Comment();
@@ -197,7 +180,6 @@ public interface DocumentationPackage extends EPackage {
* The meta object literal for the '<em><b>Associated Resource</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EAttribute DOCUMENTATION__ASSOCIATED_RESOURCE = eINSTANCE.getDocumentation_AssociatedResource();
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationFactoryImpl.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationFactoryImpl.java
index a76d8e84f49..cc748179d69 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationFactoryImpl.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationFactoryImpl.java
@@ -15,7 +15,6 @@ import org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage;
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
- *
* @generated
*/
public class DocumentationFactoryImpl extends EFactoryImpl implements DocumentationFactory {
@@ -23,16 +22,16 @@ public class DocumentationFactoryImpl extends EFactoryImpl implements Documentat
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public static DocumentationFactory init() {
try {
- DocumentationFactory theDocumentationFactory = (DocumentationFactory) EPackage.Registry.INSTANCE.getEFactory(DocumentationPackage.eNS_URI);
+ DocumentationFactory theDocumentationFactory = (DocumentationFactory)EPackage.Registry.INSTANCE.getEFactory(DocumentationPackage.eNS_URI);
if (theDocumentationFactory != null) {
return theDocumentationFactory;
}
- } catch (Exception exception) {
+ }
+ catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new DocumentationFactoryImpl();
@@ -42,7 +41,6 @@ public class DocumentationFactoryImpl extends EFactoryImpl implements Documentat
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DocumentationFactoryImpl() {
@@ -52,23 +50,20 @@ public class DocumentationFactoryImpl extends EFactoryImpl implements Documentat
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
- case DocumentationPackage.DOCUMENTATION:
- return createDocumentation();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case DocumentationPackage.DOCUMENTATION: return createDocumentation();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -80,18 +75,16 @@ public class DocumentationFactoryImpl extends EFactoryImpl implements Documentat
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public DocumentationPackage getDocumentationPackage() {
- return (DocumentationPackage) getEPackage();
+ return (DocumentationPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @deprecated
* @generated
*/
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationImpl.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationImpl.java
index e60cb02321a..77501f17315 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationImpl.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationImpl.java
@@ -22,8 +22,8 @@ import org.eclipse.uml2.uml.Comment;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl#getBase_Comment <em>Base Comment</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl#getAssociatedResource <em>Associated Resource</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl#getBase_Comment <em>Base Comment</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.documentation.Documentation.impl.DocumentationImpl#getAssociatedResource <em>Associated Resource</em>}</li>
* </ul>
* </p>
*
@@ -34,7 +34,6 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
* The cached value of the '{@link #getBase_Comment() <em>Base Comment</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getBase_Comment()
* @generated
* @ordered
@@ -45,7 +44,6 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
* The cached value of the '{@link #getAssociatedResource() <em>Associated Resource</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getAssociatedResource()
* @generated
* @ordered
@@ -55,7 +53,6 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected DocumentationImpl() {
@@ -65,7 +62,6 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -76,18 +72,16 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Comment getBase_Comment() {
if (base_Comment != null && base_Comment.eIsProxy()) {
- InternalEObject oldBase_Comment = (InternalEObject) base_Comment;
- base_Comment = (Comment) eResolveProxy(oldBase_Comment);
+ InternalEObject oldBase_Comment = (InternalEObject)base_Comment;
+ base_Comment = (Comment)eResolveProxy(oldBase_Comment);
if (base_Comment != oldBase_Comment) {
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DocumentationPackage.DOCUMENTATION__BASE_COMMENT, oldBase_Comment, base_Comment));
- }
}
}
return base_Comment;
@@ -96,7 +90,6 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public Comment basicGetBase_Comment() {
@@ -106,22 +99,19 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void setBase_Comment(Comment newBase_Comment) {
Comment oldBase_Comment = base_Comment;
base_Comment = newBase_Comment;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DocumentationPackage.DOCUMENTATION__BASE_COMMENT, oldBase_Comment, base_Comment));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -135,19 +125,16 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
- if (resolve) {
- return getBase_Comment();
- }
- return basicGetBase_Comment();
- case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
- return getAssociatedResource();
+ case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
+ if (resolve) return getBase_Comment();
+ return basicGetBase_Comment();
+ case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
+ return getAssociatedResource();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -155,20 +142,19 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
- setBase_Comment((Comment) newValue);
- return;
- case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
- getAssociatedResource().clear();
- getAssociatedResource().addAll((Collection<? extends String>) newValue);
- return;
+ case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
+ setBase_Comment((Comment)newValue);
+ return;
+ case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
+ getAssociatedResource().clear();
+ getAssociatedResource().addAll((Collection<? extends String>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -176,18 +162,17 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
- setBase_Comment((Comment) null);
- return;
- case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
- getAssociatedResource().clear();
- return;
+ case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
+ setBase_Comment((Comment)null);
+ return;
+ case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
+ getAssociatedResource().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -195,16 +180,15 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
- return base_Comment != null;
- case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
- return associatedResource != null && !associatedResource.isEmpty();
+ case DocumentationPackage.DOCUMENTATION__BASE_COMMENT:
+ return base_Comment != null;
+ case DocumentationPackage.DOCUMENTATION__ASSOCIATED_RESOURCE:
+ return associatedResource != null && !associatedResource.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -212,14 +196,11 @@ public class DocumentationImpl extends MinimalEObjectImpl.Container implements D
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (associatedResource: ");
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationPackageImpl.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationPackageImpl.java
index 74bfa2d79f4..68156c2958d 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationPackageImpl.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/impl/DocumentationPackageImpl.java
@@ -17,24 +17,25 @@ import org.eclipse.uml2.uml.UMLPackage;
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
- *
* @generated
*/
public class DocumentationPackageImpl extends EPackageImpl implements DocumentationPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private EClass documentationEClass = null;
/**
- * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
- * <p>
- * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage#eNS_URI
* @see #init()
@@ -47,7 +48,6 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private static boolean isInited = false;
@@ -65,12 +65,10 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
* @generated
*/
public static DocumentationPackage init() {
- if (isInited) {
- return (DocumentationPackage) EPackage.Registry.INSTANCE.getEPackage(DocumentationPackage.eNS_URI);
- }
+ if (isInited) return (DocumentationPackage)EPackage.Registry.INSTANCE.getEPackage(DocumentationPackage.eNS_URI);
// Obtain or create and register package
- DocumentationPackageImpl theDocumentationPackage = (DocumentationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DocumentationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DocumentationPackageImpl());
+ DocumentationPackageImpl theDocumentationPackage = (DocumentationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DocumentationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DocumentationPackageImpl());
isInited = true;
@@ -95,7 +93,6 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -106,56 +103,49 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public EReference getDocumentation_Base_Comment() {
- return (EReference) documentationEClass.getEStructuralFeatures().get(0);
+ return (EReference)documentationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public EAttribute getDocumentation_AssociatedResource() {
- return (EAttribute) documentationEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)documentationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public DocumentationFactory getDocumentationFactory() {
- return (DocumentationFactory) getEFactoryInstance();
+ return (DocumentationFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is
+ * Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void createPackageContents() {
- if (isCreated) {
- return;
- }
+ if (isCreated) return;
isCreated = true;
// Create classes and their features
@@ -167,23 +157,19 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This
+ * Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void initializePackageContents() {
- if (isInitialized) {
- return;
- }
+ if (isInitialized) return;
isInitialized = true;
// Initialize package
@@ -192,8 +178,8 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
setNsURI(eNS_URI);
// Obtain other dependent packages
- UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
- TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+ UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
// Create type parameters
@@ -203,8 +189,7 @@ public class DocumentationPackageImpl extends EPackageImpl implements Documentat
// Initialize classes, features, and operations; add parameters
initEClass(documentationEClass, Documentation.class, "Documentation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getDocumentation_Base_Comment(), theUMLPackage.getComment(), null, "base_Comment", null, 1, 1, Documentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
- !IS_ORDERED);
+ initEReference(getDocumentation_Base_Comment(), theUMLPackage.getComment(), null, "base_Comment", null, 1, 1, Documentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(getDocumentation_AssociatedResource(), theTypesPackage.getString(), "associatedResource", null, 0, -1, Documentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
// Create resource
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationAdapterFactory.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationAdapterFactory.java
index 340f3542d56..2941d8182c3 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationAdapterFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationAdapterFactory.java
@@ -14,7 +14,6 @@ import org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage;
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage
* @generated
*/
@@ -23,7 +22,6 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected static DocumentationPackage modelPackage;
@@ -32,7 +30,6 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DocumentationAdapterFactory() {
@@ -46,7 +43,6 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
- *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@@ -56,7 +52,7 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
return true;
}
if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
@@ -65,35 +61,31 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected DocumentationSwitch<Adapter> modelSwitch =
new DocumentationSwitch<Adapter>() {
- @Override
- public Adapter caseDocumentation(Documentation object) {
- return createDocumentationAdapter();
- }
-
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ @Override
+ public Adapter caseDocumentation(Documentation object) {
+ return createDocumentationAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param target
- * the object to adapt.
+ * @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject) target);
+ return modelSwitch.doSwitch((EObject)target);
}
@@ -103,7 +95,6 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.papyrus.uml.documentation.Documentation.Documentation
* @generated
@@ -117,7 +108,6 @@ public class DocumentationAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
- *
* @return the new adapter.
* @generated
*/
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceFactoryImpl.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceFactoryImpl.java
index a3150ff0d29..b5e733bfb62 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceFactoryImpl.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceFactoryImpl.java
@@ -11,7 +11,6 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
* <!-- begin-user-doc -->
* The <b>Resource Factory</b> associated with the package.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.util.DocumentationResourceImpl
* @generated
*/
@@ -20,7 +19,6 @@ public class DocumentationResourceFactoryImpl extends ResourceFactoryImpl {
* Creates an instance of the resource factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DocumentationResourceFactoryImpl() {
@@ -31,21 +29,11 @@ public class DocumentationResourceFactoryImpl extends ResourceFactoryImpl {
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Resource createResource(URI uri) {
XMLResource result = new DocumentationResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
return result;
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceImpl.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceImpl.java
index 492a8164d4c..cb1a9521594 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceImpl.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationResourceImpl.java
@@ -9,7 +9,6 @@ import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
* <!-- begin-user-doc -->
* The <b>Resource </b> associated with the package.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.util.DocumentationResourceFactoryImpl
* @generated
*/
@@ -18,9 +17,7 @@ public class DocumentationResourceImpl extends XMLResourceImpl {
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param uri
- * the URI of the new resource.
+ * @param uri the URI of the new resource.
* @generated
*/
public DocumentationResourceImpl(URI uri) {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationSwitch.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationSwitch.java
index dd4f5e50091..e71ca87681a 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationSwitch.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationSwitch.java
@@ -17,7 +17,6 @@ import org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage;
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
- *
* @see org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage
* @generated
*/
@@ -26,7 +25,6 @@ public class DocumentationSwitch<T> extends Switch<T> {
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected static DocumentationPackage modelPackage;
@@ -35,7 +33,6 @@ public class DocumentationSwitch<T> extends Switch<T> {
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DocumentationSwitch() {
@@ -48,7 +45,6 @@ public class DocumentationSwitch<T> extends Switch<T> {
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @parameter ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
@@ -62,23 +58,19 @@ public class DocumentationSwitch<T> extends Switch<T> {
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
- case DocumentationPackage.DOCUMENTATION: {
- Documentation documentation = (Documentation) theEObject;
- T result = caseDocumentation(documentation);
- if (result == null) {
- result = defaultCase(theEObject);
+ case DocumentationPackage.DOCUMENTATION: {
+ Documentation documentation = (Documentation)theEObject;
+ T result = caseDocumentation(documentation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
}
- return result;
- }
- default:
- return defaultCase(theEObject);
+ default: return defaultCase(theEObject);
}
}
@@ -88,9 +80,7 @@ public class DocumentationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Documentation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -105,9 +95,7 @@ public class DocumentationSwitch<T> extends Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
diff --git a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationXMLProcessor.java b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationXMLProcessor.java
index 67d12d74e9b..62e6355b9e3 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationXMLProcessor.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.documentation.profile/src-gen/org/eclipse/papyrus/uml/documentation/Documentation/util/DocumentationXMLProcessor.java
@@ -13,7 +13,6 @@ import org.eclipse.papyrus.uml.documentation.Documentation.DocumentationPackage;
* This class contains helper methods to serialize and deserialize XML documents
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public class DocumentationXMLProcessor extends XMLProcessor {
@@ -22,7 +21,6 @@ public class DocumentationXMLProcessor extends XMLProcessor {
* Public constructor to instantiate the helper.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public DocumentationXMLProcessor() {
@@ -34,7 +32,6 @@ public class DocumentationXMLProcessor extends XMLProcessor {
* Register for "*" and "xml" file extensions the DocumentationResourceFactoryImpl factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/AttributeMatchLabelProvider.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/AttributeMatchLabelProvider.java
index 26ec1030361..c6373497dd8 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/AttributeMatchLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/AttributeMatchLabelProvider.java
@@ -1,125 +1,124 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.search.ui.providers;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
-import org.eclipse.papyrus.uml.search.ui.Activator;
-import org.eclipse.papyrus.uml.search.ui.Messages;
-import org.eclipse.papyrus.views.search.results.AttributeMatch;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Stereotype;
-
-public class AttributeMatchLabelProvider implements IFilteredLabelProvider {
-
- public Image getImage(Object element) {
- if (element instanceof AttributeMatch) {
- LabelProviderService service = new LabelProviderServiceImpl();
- try {
- service.startService();
- return service.getLabelProvider().getImage(((AttributeMatch) element).getMetaAttribute());
- } catch (ServiceException e) {
- Activator.log.warn(Messages.AttributeMatchLabelProvider_0 + ((AttributeMatch) element).getMetaAttribute());
- }
- }
- return null;
- }
-
- private String printResult(String sectionThatMatch, String value, int offset, int lenght, String attributeName) {
- return "\"" + sectionThatMatch + "\"" + Messages.AttributeMatchLabelProvider_3 + "\"" + value + "\" [" + offset + "," + (offset + lenght) + "] (" + attributeName + Messages.AttributeMatchLabelProvider_8 + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- }
-
- public String getText(Object element) {
-
- if (element instanceof AttributeMatch) {
- AttributeMatch attributeMatch = ((AttributeMatch) element);
- if ((attributeMatch).getSource() instanceof EObject) {
- EObject target = (EObject) attributeMatch.getSource();
- if (attributeMatch.getMetaAttribute() instanceof EAttribute) {
- EAttribute source = (EAttribute) attributeMatch.getMetaAttribute();
- if (target.eGet(source) instanceof String) {
- String value = (String) target.eGet(source);
- int end = attributeMatch.getOffset() + attributeMatch.getLength();
- return printResult(value.substring(attributeMatch.getOffset(), end), value, attributeMatch.getOffset(), attributeMatch.getLength(), source.getName());
-
- } else {
- String value = String.valueOf(target.eGet(source));
- int end = attributeMatch.getOffset() + attributeMatch.getLength();
- return printResult(value.substring(attributeMatch.getOffset(), end), value, attributeMatch.getOffset(), attributeMatch.getLength(), source.getName());
- }
- } else if (attributeMatch.getMetaAttribute() instanceof Property) {
-
- Property source = (Property) attributeMatch.getMetaAttribute();
- Class containingClass = source.getClass_();
- if (containingClass instanceof Stereotype) {
- if (target instanceof Element) {
- String value = getStringValueOfProperty(((Element) target), (Stereotype) containingClass, (Property) attributeMatch.getMetaAttribute());
- return printResult(value.substring(attributeMatch.getOffset(), attributeMatch.getLength()), value, attributeMatch.getOffset(), attributeMatch.getLength(), source.getName());
-
- }
- }
- }
- }
- }
-
- return ""; //$NON-NLS-1$
-
- }
-
- public void addListener(ILabelProviderListener listener) {
-
- }
-
- public void dispose() {
-
- }
-
- public boolean isLabelProperty(Object element, String property) {
-
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
-
- }
-
- public boolean accept(Object element) {
- if (element instanceof AttributeMatch) {
- return true;
-
- }
- return false;
- }
-
- private String getStringValueOfProperty(Element element, Stereotype stereotype, Property property) {
- Object value = element.getValue(stereotype, property.getName());
- if (value instanceof String) {
- return (String) value;
- } else if (value instanceof EnumerationLiteral) {
- return ((EnumerationLiteral) value).getName();
- } else {
- return String.valueOf(value);
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.search.ui.providers;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
+import org.eclipse.papyrus.uml.search.ui.Activator;
+import org.eclipse.papyrus.uml.search.ui.Messages;
+import org.eclipse.papyrus.views.search.results.AttributeMatch;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+
+public class AttributeMatchLabelProvider implements IFilteredLabelProvider {
+
+ public Image getImage(Object element) {
+ if (element instanceof AttributeMatch) {
+ LabelProviderService service = new LabelProviderServiceImpl();
+ try {
+ service.startService();
+ return service.getLabelProvider().getImage(((AttributeMatch) element).getMetaAttribute());
+ } catch (ServiceException e) {
+ Activator.log.warn(Messages.AttributeMatchLabelProvider_0 + ((AttributeMatch) element).getMetaAttribute());
+ }
+ }
+ return null;
+ }
+
+ private String printResult(String sectionThatMatch, String value, int offset, int length, String attributeName) {
+ return "\"" + sectionThatMatch + "\"" + Messages.AttributeMatchLabelProvider_3 + "\"" + value + "\" [" + (offset + 1) + "," + length + "] (" + attributeName + Messages.AttributeMatchLabelProvider_8 + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ }
+
+ public String getText(Object element) {
+
+ if (element instanceof AttributeMatch) {
+ AttributeMatch attributeMatch = ((AttributeMatch) element);
+ if ((attributeMatch).getSource() instanceof EObject) {
+ EObject target = (EObject) attributeMatch.getSource();
+ if (attributeMatch.getMetaAttribute() instanceof EAttribute) {
+ EAttribute source = (EAttribute) attributeMatch.getMetaAttribute();
+ if (target.eGet(source) instanceof String) {
+ String value = (String) target.eGet(source);
+ return printResult(value.substring(attributeMatch.getOffset(), attributeMatch.getLength()), value, attributeMatch.getOffset(), attributeMatch.getLength(), source.getName());
+
+ } else {
+ String value = String.valueOf(target.eGet(source));
+ int end = attributeMatch.getOffset() + attributeMatch.getLength();
+ return printResult(value.substring(attributeMatch.getOffset(), end), value, attributeMatch.getOffset(), attributeMatch.getLength(), source.getName());
+ }
+ } else if (attributeMatch.getMetaAttribute() instanceof Property) {
+
+ Property source = (Property) attributeMatch.getMetaAttribute();
+ Class containingClass = source.getClass_();
+ if (containingClass instanceof Stereotype) {
+ if (target instanceof Element) {
+ String value = getStringValueOfProperty(((Element) target), (Stereotype) containingClass, (Property) attributeMatch.getMetaAttribute());
+ return printResult(value.substring(attributeMatch.getOffset(), attributeMatch.getLength()), value, attributeMatch.getOffset(), attributeMatch.getLength(), source.getName());
+
+ }
+ }
+ }
+ }
+ }
+
+ return ""; //$NON-NLS-1$
+
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+
+ }
+
+ public void dispose() {
+
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+
+ }
+
+ public boolean accept(Object element) {
+ if (element instanceof AttributeMatch) {
+ return true;
+
+ }
+ return false;
+ }
+
+ private String getStringValueOfProperty(Element element, Stereotype stereotype, Property property) {
+ Object value = element.getValue(stereotype, property.getName());
+ if (value instanceof String) {
+ return (String) value;
+ } else if (value instanceof EnumerationLiteral) {
+ return ((EnumerationLiteral) value).getName();
+ } else {
+ return String.valueOf(value);
+ }
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/results/PapyrusSearchResult.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/results/PapyrusSearchResult.java
index 51ca09f4050..d6ddc8cc910 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/results/PapyrusSearchResult.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/results/PapyrusSearchResult.java
@@ -1,291 +1,290 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST and others.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- * Christian W. Damus (CEA LIST) - Replace workspace IResource dependency with URI for CDO compatibility
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.search.ui.results;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
-import org.eclipse.papyrus.uml.search.ui.Activator;
-import org.eclipse.papyrus.uml.search.ui.Messages;
-import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
-import org.eclipse.papyrus.views.search.regex.PatternHelper;
-import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
-import org.eclipse.papyrus.views.search.results.AttributeMatch;
-import org.eclipse.papyrus.views.search.results.ModelElementMatch;
-import org.eclipse.papyrus.views.search.results.ModelMatch;
-import org.eclipse.papyrus.views.search.results.ViewerMatch;
-import org.eclipse.papyrus.views.search.scope.ScopeEntry;
-import org.eclipse.papyrus.views.search.utils.MatchUtils;
-import org.eclipse.search.ui.text.AbstractTextSearchResult;
-import org.eclipse.search.ui.text.IEditorMatchAdapter;
-import org.eclipse.search.ui.text.IFileMatchAdapter;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.search.ui.text.MatchFilter;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Stereotype;
-
-import com.google.common.base.Objects;
-import com.swtdesigner.ResourceManager;
-
-public class PapyrusSearchResult extends AbstractTextSearchResult implements IEditorMatchAdapter, IFileMatchAdapter {
-
- MatchFilter[] possibleMatchFilter;
-
- private AbstractPapyrusQuery searchQuery;
-
- public PapyrusSearchResult(AbstractPapyrusQuery query) {
- this.searchQuery = query;
- possibleMatchFilter = new MatchFilter[0];
- }
-
- public AbstractPapyrusQuery getQuery() {
- return searchQuery;
- }
-
-
- public void setPossibleMatchFilter(MatchFilter[] possibleMatchFilter) {
- this.possibleMatchFilter = possibleMatchFilter;
- }
-
- @Override
- public MatchFilter[] getAllMatchFilters() {
- return possibleMatchFilter;
-
- }
-
- public String getLabel() {
-
- return getMatchCount() + Messages.PapyrusSearchResult_0 + searchQuery.getSearchQueryText() + Messages.PapyrusSearchResult_1;
- }
-
- public String getTooltip() {
-
- return Messages.PapyrusSearchResult_2;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return ResourceManager.getPluginImageDescriptor(Activator.PLUGIN_ID, "icons/PapyrusSearch.png"); //$NON-NLS-1$
- }
-
- @Override
- public IEditorMatchAdapter getEditorMatchAdapter() {
- return this;
- }
-
- @Override
- public IFileMatchAdapter getFileMatchAdapter() {
- return this;
- }
-
- public Match[] computeContainedMatches(AbstractTextSearchResult result, IFile file) {
- Set<Match> results = new HashSet<Match>();
-
- Set<AbstractResultEntry> allMatches = MatchUtils.getMatches(result, true);
- for (AbstractResultEntry modelMatch : allMatches) {
- Object element = modelMatch.getElement();
- if (element instanceof ScopeEntry) {
- if (file.equals(getWorkspaceResource((ScopeEntry) element))) {
- results.add(modelMatch);
- }
- }
- }
- Match[] arrayResult = new Match[results.size()];
-
- return results.toArray(arrayResult);
- }
-
- protected IResource getWorkspaceResource(ScopeEntry scopeEntry) {
- IResource result = null;
-
- URI uri = scopeEntry.getResourceURI();
- if ((uri != null) && uri.isPlatformResource()) {
- String path = uri.toPlatformString(true);
- result = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- }
-
- return result;
- }
-
- public IFile getFile(Object element) {
- if (element instanceof ScopeEntry) {
- IResource resource = getWorkspaceResource((ScopeEntry) element);
- if (resource instanceof IFile) {
- return (IFile) resource;
- }
- }
- return null;
- }
-
- public boolean isShownInEditor(Match match, IEditorPart editor) {
- if (match instanceof AbstractResultEntry) {
- Object element = match.getElement();
- if (element instanceof ScopeEntry) {
- if (Objects.equal(EditorUtils.getResourceURI(editor), ((ScopeEntry) element).getResourceURI())) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- @Override
- public Match[] getMatches(Object element) {
-
- Match[] matchList = super.getMatches(element);
- Set<Match> matchToKeep = new HashSet<Match>();
- List<Object> sourceList = new ArrayList<Object>();
- // Get matches which are still true
- for (Match match : matchList) {
- if (match instanceof AbstractResultEntry) {
- if (((AbstractResultEntry) match).getSource() != null) {
- if (match instanceof AttributeMatch) {
- Object attribute = ((AttributeMatch) match).getMetaAttribute();
- String value = null;
- EObject target = (EObject) ((AbstractResultEntry) match).getSource();
- if (attribute instanceof EAttribute) {
-
- value = String.valueOf(target.eGet((EStructuralFeature) attribute));
- } else if (attribute instanceof Property) {
-
- value = getStringValueOfProperty((Element) ((AbstractResultEntry) match).getSource(), ((AttributeMatch) match).getStereotype(), ((Property) attribute));
-
-
- }
- if (value != null && !this.getQuery().isRegularExpression()) {
- if (value.length() >= match.getLength() - match.getOffset()) {
- int end = match.getOffset() + match.getLength();
- value = value.substring(match.getOffset(), end);
- if (this.searchQuery.isCaseSensitive()) {
- if (value.equals(this.searchQuery.getSearchQueryText())) {
- ((AbstractResultEntry) match).recursiveHierarchy((AbstractResultEntry) ((AbstractResultEntry) match).getParent());
- matchToKeep.add(match);
- sourceList.add(((AbstractResultEntry) match).getSource());
- }
- } else {
- if (value.equalsIgnoreCase(this.searchQuery.getSearchQueryText())) {
-
- ((AbstractResultEntry) match).recursiveHierarchy((AbstractResultEntry) ((AbstractResultEntry) match).getParent());
-
- matchToKeep.add(match);
- sourceList.add(((AbstractResultEntry) match).getSource());
- }
- }
- }
- } else if (this.getQuery().isRegularExpression()) {
- if (this.getQuery().getSearchQueryText() != null) {
-
-
- Pattern pattern = PatternHelper.getInstance().createPattern(this.getQuery().getSearchQueryText(), false, true);
- Matcher m = pattern.matcher(value);
- if (m.matches()) {
- int start = m.start();
- int end = m.end();
- if (start == match.getOffset() && end == match.getOffset() + match.getLength()) {
- matchToKeep.add(match);
- sourceList.add(((AbstractResultEntry) match).getSource());
- }
- }
- }
- }
- } else if (match instanceof ModelElementMatch) {
- ((AbstractResultEntry) match).recursiveHierarchy((AbstractResultEntry) match);
-
- matchToKeep.add(match);
- sourceList.add(((AbstractResultEntry) match).getSource());
- }
- }
- }
- }
- // Now get Viewer
- for (Match match : matchList) {
- if (match instanceof ViewerMatch) {
- Object source = ((ViewerMatch) match).getSemanticElement();
- if (sourceList.contains(source)) {
- matchToKeep.add(match);
- }
- }
-
- }
-
- return matchToKeep.toArray(new Match[matchToKeep.size()]);
- // return ((PapyrusQuery)searchQuery).getfResults().toArray(new Match[matchToKeep.size()]);
- //
- }
-
- public Match[] computeContainedMatches(AbstractTextSearchResult result, IEditorPart editor) {
- Set<Object> results = new HashSet<Object>();
- Set<AbstractResultEntry> allMatches = MatchUtils.getMatches(result, true);
- for (AbstractResultEntry modelMatch : allMatches) {
- Object element = modelMatch.getElement();
- if (element instanceof ScopeEntry) {
- if (((ScopeEntry) element).getResourceURI().equals(EditorUtils.getResourceURI(editor))) {
- results.add(modelMatch);
- }
- }
- }
-
- Match[] arrayResult = new Match[results.size()];
-
- return results.toArray(arrayResult);
- }
-
- @Override
- public int getMatchCount() {
-
- List<Object> elementList = Arrays.asList(this.getElements());
- int count = 0;
- for (Object element : elementList) {
-
- for (Match match : this.getMatches(element)) {
- if (match instanceof ModelMatch || match instanceof ViewerMatch) {
- count++;
- }
- }
-
- }
- return count;
- }
-
- private String getStringValueOfProperty(Element element, Stereotype stereotype, Property property) {
- Object value = element.getValue(stereotype, property.getName());
- if (value instanceof String) {
- return (String) value;
- } else if (value instanceof EnumerationLiteral) {
- return ((EnumerationLiteral) value).getName();
- } else {
- return String.valueOf(value);
- }
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA LIST) - Replace workspace IResource dependency with URI for CDO compatibility
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.search.ui.results;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.uml.search.ui.Activator;
+import org.eclipse.papyrus.uml.search.ui.Messages;
+import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
+import org.eclipse.papyrus.views.search.regex.PatternHelper;
+import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
+import org.eclipse.papyrus.views.search.results.AttributeMatch;
+import org.eclipse.papyrus.views.search.results.ModelElementMatch;
+import org.eclipse.papyrus.views.search.results.ModelMatch;
+import org.eclipse.papyrus.views.search.results.ViewerMatch;
+import org.eclipse.papyrus.views.search.scope.ScopeEntry;
+import org.eclipse.papyrus.views.search.utils.MatchUtils;
+import org.eclipse.search.ui.text.AbstractTextSearchResult;
+import org.eclipse.search.ui.text.IEditorMatchAdapter;
+import org.eclipse.search.ui.text.IFileMatchAdapter;
+import org.eclipse.search.ui.text.Match;
+import org.eclipse.search.ui.text.MatchFilter;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+
+import com.google.common.base.Objects;
+import com.swtdesigner.ResourceManager;
+
+public class PapyrusSearchResult extends AbstractTextSearchResult implements IEditorMatchAdapter, IFileMatchAdapter {
+
+ MatchFilter[] possibleMatchFilter;
+
+ private AbstractPapyrusQuery searchQuery;
+
+ public PapyrusSearchResult(AbstractPapyrusQuery query) {
+ this.searchQuery = query;
+ possibleMatchFilter = new MatchFilter[0];
+ }
+
+ public AbstractPapyrusQuery getQuery() {
+ return searchQuery;
+ }
+
+
+ public void setPossibleMatchFilter(MatchFilter[] possibleMatchFilter) {
+ this.possibleMatchFilter = possibleMatchFilter;
+ }
+
+ @Override
+ public MatchFilter[] getAllMatchFilters() {
+ return possibleMatchFilter;
+
+ }
+
+ public String getLabel() {
+
+ return getMatchCount() + Messages.PapyrusSearchResult_0 + searchQuery.getSearchQueryText() + Messages.PapyrusSearchResult_1;
+ }
+
+ public String getTooltip() {
+
+ return Messages.PapyrusSearchResult_2;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return ResourceManager.getPluginImageDescriptor(Activator.PLUGIN_ID, "icons/PapyrusSearch.png"); //$NON-NLS-1$
+ }
+
+ @Override
+ public IEditorMatchAdapter getEditorMatchAdapter() {
+ return this;
+ }
+
+ @Override
+ public IFileMatchAdapter getFileMatchAdapter() {
+ return this;
+ }
+
+ public Match[] computeContainedMatches(AbstractTextSearchResult result, IFile file) {
+ Set<Match> results = new HashSet<Match>();
+
+ Set<AbstractResultEntry> allMatches = MatchUtils.getMatches(result, true);
+ for (AbstractResultEntry modelMatch : allMatches) {
+ Object element = modelMatch.getElement();
+ if (element instanceof ScopeEntry) {
+ if (file.equals(getWorkspaceResource((ScopeEntry) element))) {
+ results.add(modelMatch);
+ }
+ }
+ }
+ Match[] arrayResult = new Match[results.size()];
+
+ return results.toArray(arrayResult);
+ }
+
+ protected IResource getWorkspaceResource(ScopeEntry scopeEntry) {
+ IResource result = null;
+
+ URI uri = scopeEntry.getResourceURI();
+ if ((uri != null) && uri.isPlatformResource()) {
+ String path = uri.toPlatformString(true);
+ result = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+ }
+
+ return result;
+ }
+
+ public IFile getFile(Object element) {
+ if (element instanceof ScopeEntry) {
+ IResource resource = getWorkspaceResource((ScopeEntry) element);
+ if (resource instanceof IFile) {
+ return (IFile) resource;
+ }
+ }
+ return null;
+ }
+
+ public boolean isShownInEditor(Match match, IEditorPart editor) {
+ if (match instanceof AbstractResultEntry) {
+ Object element = match.getElement();
+ if (element instanceof ScopeEntry) {
+ if (Objects.equal(EditorUtils.getResourceURI(editor), ((ScopeEntry) element).getResourceURI())) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public Match[] getMatches(Object element) {
+
+ Match[] matchList = super.getMatches(element);
+ Set<Match> matchToKeep = new HashSet<Match>();
+ List<Object> sourceList = new ArrayList<Object>();
+ // Get matches which are still true
+ for (Match match : matchList) {
+ if (match instanceof AbstractResultEntry) {
+ if (((AbstractResultEntry) match).getSource() != null) {
+ if (match instanceof AttributeMatch) {
+ Object attribute = ((AttributeMatch) match).getMetaAttribute();
+ String value = null;
+ EObject target = (EObject) ((AbstractResultEntry) match).getSource();
+ if (attribute instanceof EAttribute) {
+
+ value = String.valueOf(target.eGet((EStructuralFeature) attribute));
+ } else if (attribute instanceof Property) {
+
+ value = getStringValueOfProperty((Element) ((AbstractResultEntry) match).getSource(), ((AttributeMatch) match).getStereotype(), ((Property) attribute));
+
+
+ }
+ if (value != null && !this.getQuery().isRegularExpression()) {
+ if (value.length() >= match.getLength() - match.getOffset()) {
+ value = value.substring(match.getOffset(), match.getLength());
+ if (this.searchQuery.isCaseSensitive()) {
+ if (value.equals(this.searchQuery.getSearchQueryText())) {
+ ((AbstractResultEntry) match).recursiveHierarchy((AbstractResultEntry) ((AbstractResultEntry) match).getParent());
+ matchToKeep.add(match);
+ sourceList.add(((AbstractResultEntry) match).getSource());
+ }
+ } else {
+ if (value.equalsIgnoreCase(this.searchQuery.getSearchQueryText())) {
+
+ ((AbstractResultEntry) match).recursiveHierarchy((AbstractResultEntry) ((AbstractResultEntry) match).getParent());
+
+ matchToKeep.add(match);
+ sourceList.add(((AbstractResultEntry) match).getSource());
+ }
+ }
+ }
+ } else if (this.getQuery().isRegularExpression()) {
+ if (this.getQuery().getSearchQueryText() != null) {
+
+
+ Pattern pattern = PatternHelper.getInstance().createPattern(this.getQuery().getSearchQueryText(), false, true);
+ Matcher m = pattern.matcher(value);
+ if (m.matches()) {
+ int start = m.start();
+ int end = m.end();
+ if (start == match.getOffset() && end == match.getOffset() + match.getLength()) {
+ matchToKeep.add(match);
+ sourceList.add(((AbstractResultEntry) match).getSource());
+ }
+ }
+ }
+ }
+ } else if (match instanceof ModelElementMatch) {
+ ((AbstractResultEntry) match).recursiveHierarchy((AbstractResultEntry) match);
+
+ matchToKeep.add(match);
+ sourceList.add(((AbstractResultEntry) match).getSource());
+ }
+ }
+ }
+ }
+ // Now get Viewer
+ for (Match match : matchList) {
+ if (match instanceof ViewerMatch) {
+ Object source = ((ViewerMatch) match).getSemanticElement();
+ if (sourceList.contains(source)) {
+ matchToKeep.add(match);
+ }
+ }
+
+ }
+
+ return matchToKeep.toArray(new Match[matchToKeep.size()]);
+ // return ((PapyrusQuery)searchQuery).getfResults().toArray(new Match[matchToKeep.size()]);
+ //
+ }
+
+ public Match[] computeContainedMatches(AbstractTextSearchResult result, IEditorPart editor) {
+ Set<Object> results = new HashSet<Object>();
+ Set<AbstractResultEntry> allMatches = MatchUtils.getMatches(result, true);
+ for (AbstractResultEntry modelMatch : allMatches) {
+ Object element = modelMatch.getElement();
+ if (element instanceof ScopeEntry) {
+ if (((ScopeEntry) element).getResourceURI().equals(EditorUtils.getResourceURI(editor))) {
+ results.add(modelMatch);
+ }
+ }
+ }
+
+ Match[] arrayResult = new Match[results.size()];
+
+ return results.toArray(arrayResult);
+ }
+
+ @Override
+ public int getMatchCount() {
+
+ List<Object> elementList = Arrays.asList(this.getElements());
+ int count = 0;
+ for (Object element : elementList) {
+
+ for (Match match : this.getMatches(element)) {
+ if (match instanceof ModelMatch || match instanceof ViewerMatch) {
+ count++;
+ }
+ }
+
+ }
+ return count;
+ }
+
+ private String getStringValueOfProperty(Element element, Stereotype stereotype, Property property) {
+ Object value = element.getValue(stereotype, property.getName());
+ if (value instanceof String) {
+ return (String) value;
+ } else if (value instanceof EnumerationLiteral) {
+ return ((EnumerationLiteral) value).getName();
+ } else {
+ return String.valueOf(value);
+ }
+ }
+
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/InstanceSpecificationLinkCreateCommand.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/InstanceSpecificationLinkCreateCommand.java
index 67116ad1521..abd0f489e07 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/InstanceSpecificationLinkCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/InstanceSpecificationLinkCreateCommand.java
@@ -12,6 +12,7 @@
package org.eclipse.papyrus.uml.service.types.command;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -111,42 +112,22 @@ public class InstanceSpecificationLinkCreateCommand extends EditElementCommand {
* Case 0: Only the target is null
*/
if (source != null && target == null) {
- // Test if is an instanceSpecification
- if (source instanceof InstanceSpecification) {
- InstanceSpecification instance = (InstanceSpecification) source;
- // Is it associated to a classifier?
- if (instance.getClassifiers().size() > 0) {
- HashSet<Association> assoSource = getInstanceAssociations(instance);
- // How many association it linked?
- return assoSource.size() > 0;
- }
- }
- return false;
+ return source instanceof InstanceSpecification && ((InstanceSpecification) source).getClassifiers().size() > 0;
}
-
/*
* Case 1 : source and target != null
* look for if it exist at least a common association between classifiers referenced between these instances
*/
- if (source != null && target != null) {
- if (!(source instanceof InstanceSpecification)) {
- return false;
- }
- if (!(target instanceof InstanceSpecification)) {
- return false;
- }
- if (((InstanceSpecification) source).getClassifiers().size() == 0 || ((InstanceSpecification) target).getClassifiers().size() == 0) {
- return false;
- }
-
- HashSet<Association> assoSource = getInstanceAssociations((InstanceSpecification) source);
- HashSet<Association> assoTarget = getInstanceAssociations((InstanceSpecification) target);
- assoSource.retainAll(assoTarget);
- commonAssociations = new HashSet<Association>();
- commonAssociations.addAll(assoSource);
- return (commonAssociations.size() > 0);
+ if (source == null || target == null) {
+ return false;
}
- return false;
+ if (false == source instanceof InstanceSpecification) {
+ return false;
+ }
+ if (false == target instanceof InstanceSpecification) {
+ return false;
+ }
+ return ((InstanceSpecification) source).getClassifiers().size() > 0 && ((InstanceSpecification) target).getClassifiers().size() > 0;
}
/**
@@ -159,15 +140,12 @@ public class InstanceSpecificationLinkCreateCommand extends EditElementCommand {
private HashSet<Association> getInstanceAssociations(InstanceSpecification instance) {
// Initialise set of associations
HashSet<Association> instanceAssociationsSet = new HashSet<Association>();
-
// Extract all associations of Instance Specification's classifiers
Iterator<Classifier> iterator = getSpecificationClassifier(instance).iterator();
while (iterator.hasNext()) {
Classifier classifier = iterator.next();
instanceAssociationsSet.addAll(classifier.getAssociations());
}
-
-
return instanceAssociationsSet;
}
@@ -179,10 +157,8 @@ public class InstanceSpecificationLinkCreateCommand extends EditElementCommand {
* @return the specification classifiers
*/
private Set<Classifier> getSpecificationClassifier(InstanceSpecification instance) {
-
// Initialise Set of Classifiers
Set<Classifier> specificationClassicfiersSet = new HashSet<Classifier>();
-
// Explore first rank classifiers
for (Classifier classifier : instance.getClassifiers()) {
@@ -204,6 +180,7 @@ public class InstanceSpecificationLinkCreateCommand extends EditElementCommand {
*/
private Set<Classifier> getInheritedClassifier(Classifier classifier, Set<Classifier> alreadyParsedClassifier) {
+
// Initialise set of Classifier from Generalisation
Set<Classifier> generalizationClassifiers = new HashSet<Classifier>();
@@ -232,71 +209,83 @@ public class InstanceSpecificationLinkCreateCommand extends EditElementCommand {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- AssociationSelectionDialog associationSelectionDialog;
- Association selectedAssociation = null;
-
- if (((InstanceSpecification) source).getClassifiers().size() > 0 && ((InstanceSpecification) target).getClassifiers().size() > 0) {
-
- // Ask to user for the good association
- associationSelectionDialog = new AssociationSelectionDialog(new Shell(), SWT.NATIVE, commonAssociations);
- associationSelectionDialog.open();
- selectedAssociation = associationSelectionDialog.getSelectedAssociation();
- if (selectedAssociation != null) {
-
- /*
- * Creation of the instance specification link
- * with a name a container, and set the source and target
- */
- InstanceSpecification instanceSpecification = UMLFactory.eINSTANCE.createInstanceSpecification();
- ((InstanceSpecification) source).getNearestPackage().getPackagedElements().add(instanceSpecification);
- instanceSpecification.setName(NamedElementUtil.getDefaultNameWithIncrementFromBase(instanceSpecification.eClass().getName(), instanceSpecification.getOwner().eContents()));
- instanceSpecification.getClassifiers().add(selectedAssociation);
-
- Type sourceType = selectedAssociation.getMemberEnds().get(0).getType();
- Set<Classifier> sourceSpecificationClassifiersSet = getSpecificationClassifier((InstanceSpecification) source);
-
- if (sourceSpecificationClassifiersSet.contains(sourceType)) {
- addEnd(instanceSpecification, ((InstanceSpecification) source));
- addEnd(instanceSpecification, ((InstanceSpecification) target));
- } else {
- addEnd(instanceSpecification, ((InstanceSpecification) target));
- addEnd(instanceSpecification, ((InstanceSpecification) source));
- }
-
-
+ if (((InstanceSpecification) source).getClassifiers().isEmpty() || ((InstanceSpecification) target).getClassifiers().isEmpty()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ AssociationSelectionDialog associationSelectionDialog = new AssociationSelectionDialog(new Shell(), SWT.NATIVE, getModelAssociations());
+ associationSelectionDialog.open();
+ Association selectedAssociation = associationSelectionDialog.getSelectedAssociation();
+ if (selectedAssociation == null && associationSelectionDialog.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ /*
+ * Creation of the instance specification link
+ * with a name a container, and set the source and target
+ */
+ InstanceSpecification instanceSpecification = UMLFactory.eINSTANCE.createInstanceSpecification();
+ ((InstanceSpecification) source).getNearestPackage().getPackagedElements().add(instanceSpecification);
+ instanceSpecification.setName(NamedElementUtil.getDefaultNameWithIncrementFromBase(instanceSpecification.eClass().getName(), instanceSpecification.getOwner().eContents()));
+ Set<Classifier> sourceSpecificationClassifiersSet = getSpecificationClassifier((InstanceSpecification) source);
+ Set<Classifier> targetSpecificationClassifiersSet = getSpecificationClassifier((InstanceSpecification) target);
+ boolean revertEnds = false;
+ if (selectedAssociation != null) {
+ instanceSpecification.getClassifiers().add(selectedAssociation);
+ Type sourceType = selectedAssociation.getMemberEnds().get(0).getType();
+ revertEnds = false == sourceSpecificationClassifiersSet.contains(sourceType);
+ }
+ if (revertEnds) {
+ addEnd(instanceSpecification, ((InstanceSpecification) target));
+ addEnd(instanceSpecification, ((InstanceSpecification) source));
+ } else {
+ addEnd(instanceSpecification, ((InstanceSpecification) source));
+ addEnd(instanceSpecification, ((InstanceSpecification) target));
+ }
+ setupSlots(selectedAssociation, instanceSpecification, sourceSpecificationClassifiersSet, targetSpecificationClassifiersSet);
+ return CommandResult.newOKCommandResult(instanceSpecification);
+ }
- // Creation of slots into the good instance by taking in account the association
- Iterator<Property> proIterator = selectedAssociation.getMemberEnds().iterator();
- Set<Classifier> targetSpecificationClassifiersSet = getSpecificationClassifier((InstanceSpecification) target);
- while (proIterator.hasNext()) {
- Property property = proIterator.next();
- Slot slot = UMLFactory.eINSTANCE.createSlot();
- slot.setDefiningFeature(property);
- if (sourceSpecificationClassifiersSet.contains(property.getOwner())) {
- ((InstanceSpecification) source).getSlots().add(slot);
- associateValue(((InstanceSpecification) target), slot, property.getType());
- } else {
-
- if (targetSpecificationClassifiersSet.contains(property.getOwner())) {
- ((InstanceSpecification) target).getSlots().add(slot);
- associateValue(((InstanceSpecification) source), slot, property.getType());
- } else {
- instanceSpecification.getSlots().add(slot);
- if (sourceSpecificationClassifiersSet.contains(property.getType())) {
- associateValue(((InstanceSpecification) source), slot, property.getType());
- } else {
- associateValue(((InstanceSpecification) target), slot, property.getType());
- }
- }
- }
+ private void setupSlots(Association selectedAssociation, InstanceSpecification instanceSpecification, Set<Classifier> sourceSpecificationClassifiersSet, Set<Classifier> targetSpecificationClassifiersSet) {
+ if (selectedAssociation == null) {
+ return;
+ }
+ // Creation of slots into the good instance by taking in account the association
+ Iterator<Property> proIterator = selectedAssociation.getMemberEnds().iterator();
+ while (proIterator.hasNext()) {
+ Property property = proIterator.next();
+ Slot slot = UMLFactory.eINSTANCE.createSlot();
+ slot.setDefiningFeature(property);
+ if (sourceSpecificationClassifiersSet.contains(property.getOwner())) {
+ ((InstanceSpecification) source).getSlots().add(slot);
+ associateValue(((InstanceSpecification) target), slot, property.getType());
+ } else if (targetSpecificationClassifiersSet.contains(property.getOwner())) {
+ ((InstanceSpecification) target).getSlots().add(slot);
+ associateValue(((InstanceSpecification) source), slot, property.getType());
+ } else {
+ instanceSpecification.getSlots().add(slot);
+ if (sourceSpecificationClassifiersSet.contains(property.getType())) {
+ associateValue(((InstanceSpecification) source), slot, property.getType());
+ } else {
+ associateValue(((InstanceSpecification) target), slot, property.getType());
}
- return CommandResult.newOKCommandResult(instanceSpecification);
}
+ }
+ }
+ private Set<Association> getModelAssociations() {
+ if (source == null || target == null) {
+ return Collections.emptySet();
+ }
+ if (false == source instanceof InstanceSpecification || false == target instanceof InstanceSpecification) {
+ return Collections.emptySet();
}
- return CommandResult.newCancelledCommandResult();
+ Set<Association> result = new HashSet<Association>();
+ result.addAll(getInstanceAssociations((InstanceSpecification) source));
+ result.retainAll(getInstanceAssociations((InstanceSpecification) target));
+ return result;
}
+
+
/**
* create an instanceValue for the slot (owner) with the reference to InstanceSpecification and the good type
*
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java
index 4437d5043cc..24e4bd993ec 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java
@@ -23,10 +23,10 @@ import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.uml.service.types.command.UnapplyAllStereotypesCommand;
import org.eclipse.uml2.uml.Element;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper;
/**
* <pre>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/ui/AssociationSelectionDialog.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/ui/AssociationSelectionDialog.java
index fc1221fd3e1..5ea3dccb7ba 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/ui/AssociationSelectionDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/ui/AssociationSelectionDialog.java
@@ -12,7 +12,10 @@
*/
package org.eclipse.papyrus.uml.service.types.ui;
+import java.util.ArrayList;
import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
@@ -27,8 +30,8 @@ import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.uml.service.types.Activator;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.uml2.uml.Association;
@@ -37,11 +40,16 @@ import org.eclipse.uml2.uml.Association;
*/
public class AssociationSelectionDialog extends AbstractAssociationSelectionDialog {
+ private static final String UNTYPED = "<untyped>";
+
/** The selected association. */
protected Association selectedAssociation;
/** The common associations. */
- protected HashSet<Association> commonAssociations;
+ protected Set<Association> commonAssociations;
+
+ private boolean isCanceled = true;
+
/**
* Instantiates a new association selection dialog.
@@ -53,10 +61,10 @@ public class AssociationSelectionDialog extends AbstractAssociationSelectionDial
* @param commonAssociations
* list of assocation in which we would like to llok for
*/
- public AssociationSelectionDialog(Shell parent, int style, HashSet<Association> commonAssociations) {
+ public AssociationSelectionDialog(Shell parent, int style, Set<Association> commonAssociations) {
super(parent, style);
- this.commonAssociations = commonAssociations;
- this.selectedAssociation = (Association) commonAssociations.toArray()[0];
+ this.commonAssociations = commonAssociations == null ? new HashSet<Association>() : commonAssociations;
+ this.selectedAssociation = null;
}
/**
@@ -84,7 +92,10 @@ public class AssociationSelectionDialog extends AbstractAssociationSelectionDial
@Override
public Object[] getElements(Object inputElement) {
- return commonAssociations.toArray();
+ List<Object> result = new ArrayList<Object>();
+ result.add(UNTYPED);
+ result.addAll(commonAssociations);
+ return result.toArray();
}
};
final TableViewer tableViewer = new TableViewer(table);
@@ -101,45 +112,29 @@ public class AssociationSelectionDialog extends AbstractAssociationSelectionDial
});
btnOk.setEnabled(false);
- btnOk.addMouseListener(new MouseListener() {
+ btnOk.addSelectionListener(new SelectionAdapter() {
@Override
- public void mouseUp(MouseEvent e) {
+ public void widgetSelected(SelectionEvent event) {
ISelection selection = tableViewer.getSelection();
if (selection instanceof IStructuredSelection) {
- selectedAssociation = (Association) ((IStructuredSelection) selection).getFirstElement();
+ Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
+ selectedAssociation = selectedItem instanceof Association ? (Association) selectedItem : null;
+ isCanceled = false;
shlAssociationselection.close();
}
}
- @Override
- public void mouseDown(MouseEvent e) {
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- }
});
- btnCancel.addMouseListener(new MouseListener() {
+ btnCancel.addSelectionListener(new SelectionAdapter() {
@Override
- public void mouseUp(MouseEvent e) {
+ public void widgetSelected(SelectionEvent event) {
selectedAssociation = null;
shlAssociationselection.close();
}
- @Override
- public void mouseDown(MouseEvent e) {
-
-
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
-
-
- }
});
} else {
btnCancel.setVisible(true);
@@ -157,4 +152,11 @@ public class AssociationSelectionDialog extends AbstractAssociationSelectionDial
public Association getSelectedAssociation() {
return selectedAssociation;
}
+
+ /**
+ * @return if canceled button was clicked
+ */
+ public boolean isCanceled() {
+ return isCanceled;
+ }
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java
index 66bd872e81d..7faaf3494fb 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java
@@ -166,18 +166,18 @@ public class PropertyUtil {
StringBuffer buffer = new StringBuffer();
// visibility
buffer.append(" ");
- buffer.append(NamedElementUtil.getVisibilityAsSign(property));
+ buffer.append(getNonNullString(NamedElementUtil.getVisibilityAsSign(property)));
// derived property
- buffer.append(getDerived(property));
+ buffer.append(getNonNullString(getDerived(property)));
// name
buffer.append(" ");
- buffer.append(getName(property));
+ buffer.append(getNonNullString(getName(property)));
// type
if (property.getType() != null) {
- buffer.append(" : " + property.getType().getName());
+ buffer.append(" : " + getNonNullString(property.getType().getName()));
} else {
buffer.append(" : " + TypeUtil.UNDEFINED_TYPE_NAME);
}
@@ -185,17 +185,17 @@ public class PropertyUtil {
// multiplicity -> do not display [1]
String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(property);
if (!multiplicity.trim().equals("[1]")) {
- buffer.append(multiplicity);
+ buffer.append(getNonNullString(multiplicity));
}
// default value
if (property.getDefaultValue() != null) {
buffer.append(" = ");
- buffer.append(ValueSpecificationUtil.getSpecificationValue(property.getDefaultValue()));
+ buffer.append(getNonNullString(ValueSpecificationUtil.getSpecificationValue(property.getDefaultValue())));
}
// property modifiers
- buffer.append(PropertyUtil.getModifiersAsString(property, false));
+ buffer.append(getNonNullString(PropertyUtil.getModifiersAsString(property, false)));
return buffer.toString();
}
@@ -208,6 +208,10 @@ public class PropertyUtil {
}
}
+ private static String getNonNullString(String source) {
+ return source == null ? "" : source;
+ }
+
/**
* return the custom label of the property, given UML2 specification and a custom style.
*
@@ -222,7 +226,7 @@ public class PropertyUtil {
buffer.append(" ");
if (style.contains(ICustomAppearance.DISP_VISIBILITY)) {
- buffer.append(NamedElementUtil.getVisibilityAsSign(property));
+ buffer.append(getNonNullString(NamedElementUtil.getVisibilityAsSign(property)));
}
// derived property
@@ -234,13 +238,13 @@ public class PropertyUtil {
// name
if (style.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
- buffer.append(property.getName());
+ buffer.append(getNonNullString(property.getName()));
}
if (style.contains(ICustomAppearance.DISP_TYPE)) {
// type
if (property.getType() != null) {
- buffer.append(": " + property.getType().getName());
+ buffer.append(": " + getNonNullString(property.getType().getName()));
} else {
buffer.append(": " + TypeUtil.UNDEFINED_TYPE_NAME);
}
@@ -248,7 +252,7 @@ public class PropertyUtil {
if (style.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
// multiplicity -> do not display [1]
- String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(property);
+ String multiplicity = getNonNullString(MultiplicityElementUtil.getMultiplicityAsString(property));
buffer.append(multiplicity);
}
@@ -256,14 +260,14 @@ public class PropertyUtil {
// default value
if (property.getDefaultValue() != null) {
buffer.append(" = ");
- buffer.append(ValueSpecificationUtil.getSpecificationValue(property.getDefaultValue()));
+ buffer.append(getNonNullString(ValueSpecificationUtil.getSpecificationValue(property.getDefaultValue())));
}
}
if (style.contains(ICustomAppearance.DISP_MODIFIERS)) {
boolean multiLine = style.contains(ICustomAppearance.DISP_MULTI_LINE);
// property modifiers
- String modifiers = PropertyUtil.getModifiersAsString(property, multiLine);
+ String modifiers = getNonNullString(PropertyUtil.getModifiersAsString(property, multiLine));
if (!modifiers.equals("")) {
if (multiLine) {
buffer.append("\n");

Back to the top