Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Pascual2014-07-31 10:08:10 +0000
committerGabriel Pascual2014-07-31 10:08:10 +0000
commitd52b73ed50ac513d6c9098a986cf3c6f088f6953 (patch)
tree40e64494b955bd49028188ec5f42a41130592946 /plugins
parentc1b76bd45899b4ea674b10eea29dae887abfc8da (diff)
downloadorg.eclipse.papyrus-d52b73ed50ac513d6c9098a986cf3c6f088f6953.tar.gz
org.eclipse.papyrus-d52b73ed50ac513d6c9098a986cf3c6f088f6953.tar.xz
org.eclipse.papyrus-d52b73ed50ac513d6c9098a986cf3c6f088f6953.zip
440864: [Profile] Exception is thrown applying Profile with no Papyrus
version https://bugs.eclipse.org/bugs/show_bug.cgi?id=440864 - Manage no Papyrus profile Change-Id: I0b599c9c1e81c8971f02696ea962a6779f957712 Signed-off-by: Gabriel Pascual <gabriel.pascual@all4tec.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java
index b49760e8580..95e5fdd8d3b 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java
@@ -121,8 +121,12 @@ public class ApplyProfileCommand extends RecordingCommand {
// Save version of applied profile if necessary
if(saveProfileApplicationVersion) {
ProfileApplication profileApplication = umlPackage.getProfileApplication(profile);
+
+ // Get version annotation in case it is a Papyrus profile
EAnnotation versionAnnotation = profile.getDefinition().getEAnnotation(IPapyrusVersionConstants.PAPYRUS_EANNOTATION_SOURCE);
- profileApplication.getEAnnotations().add(0, EcoreUtil.copy(versionAnnotation));
+ if(versionAnnotation != null) {
+ profileApplication.getEAnnotations().add(0, EcoreUtil.copy(versionAnnotation));
+ }
}
}
}

Back to the top