svn commit: r17052 - trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java
Thomas Neustupny <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: thn
Date: 2009-04-06 10:25:35-0700
New Revision: 17052
Modified:
trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java
Log:
UML2: also handle the loading of the UML 2.2 profile
Modified: trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java?view=diff&pathrev=17052&r1=17051&r2=17052
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java (original)
+++ trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java 2009-04-06 10:25:35-0700
@@ -83,9 +83,11 @@
*/
public class ProfileUML extends Profile {
- private static final String PROFILE_FILE = "default-uml14.xmi";
+ private static final String PROFILE_UML14_FILE = "default-uml14.xmi";
+ private static final String PROFILE_UML22_FILE = "default-uml22.xmi";
- static final String NAME = "UML 1.4";
+ static final String NAME_UML14 = "UML 1.4";
+ static final String NAME_UML22 = "UML 2.2";
private FormatingStrategy formatingStrategy;
private ProfileModelLoader profileModelLoader;
@@ -101,7 +103,15 @@
profileModelLoader = new ResourceModelLoader();
ProfileReference profileReference = null;
try {
- profileReference = new CoreProfileReference(PROFILE_FILE);
+ if (Model.getFacade().getUmlVersion().charAt(0) == '1') {
+ profileReference =
+ new CoreProfileReference(PROFILE_UML14_FILE);
+ } else {
+ //TODO: reference should be handled better
+ CoreProfileReference.setProfileDirectory("uml22");
+ profileReference =
+ new CoreProfileReference(PROFILE_UML22_FILE);
+ }
} catch (MalformedURLException e) {
throw new ProfileException(
"Exception while creating profile reference.", e);
@@ -286,7 +296,10 @@
@Override
public String getDisplayName() {
- return NAME;
+ if (Model.getFacade().getUmlVersion().charAt(0) == '1') {
+ return NAME_UML14;
+ }
+ return NAME_UML22;
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1563388
To unsubscribe from this discussion, e-mail: [[email protected]].