Login | Register
My pages Projects Community openCollabNet

Discussions > Commit Messages > svn commit: r17450 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml

argouml
Discussion topic

Back to topic list

svn commit: r17450 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml

Author thn
Full name Thomas Neustupny
Date 2009-11-04 11:39:26 PST
Message Author: thn
Date: 2009-11-04 11:39:25-0800
New Revision: 17450

Modified:
   trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/CoreHelperEUMLImpl.​java
   trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/ExtensionMechanisms​HelperEUMLImpl.java
   trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/FacadeEUMLImpl.java​

Log:
fixing: (un)apply profile, (un)apply stereotype --> works now for the first time!

Modified: trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/CoreHelperEUMLImpl.​java
Url: http://argouml.tigri​s.org/source/browse/​argouml/trunk/src/ar​gouml-core-model-eum​l/src/org/argouml/mo​del/euml/CoreHelperE​UMLImpl.java?view=di​ff&pathrev=17450​&r1=17449&r2​=17450
====================​====================​====================​==================
--- trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/CoreHelperEUMLImpl.​java (original)
+++ trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/CoreHelperEUMLImpl.​java 2009-11-04 11:39:25-0800
@@ -1153,7 +1153,15 @@
     }
 
     public void removeStereotype(Object handle, Object stereo) {
- throw new NotYetImplementedException();
+ if (!(handle instanceof Element)) {
+ throw new IllegalArgumentException(
+ "handle must be instance of Element"); //$NON-NLS-1$
+ }
+ if (!(stereo instanceof Stereotype)) {
+ throw new IllegalArgumentException(
+ "stereo must be instance of Stereotype"); //$NON-NLS-1$
+ }
+ ((Element) handle).unapplyStere​otype((Stereotype) stereo);
     }
 
     public void removeSupplierDependency(final Object supplier,

Modified: trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/ExtensionMechanisms​HelperEUMLImpl.java
Url: http://argouml.tigri​s.org/source/browse/​argouml/trunk/src/ar​gouml-core-model-eum​l/src/org/argouml/mo​del/euml/ExtensionMe​chanismsHelperEUMLIm​pl.java?view=diff​&pathrev=17450&​r1=17449&r2=1745​0
====================​====================​====================​==================
--- trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/ExtensionMechanisms​HelperEUMLImpl.java (original)
+++ trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/ExtensionMechanisms​HelperEUMLImpl.java 2009-11-04 11:39:25-0800
@@ -95,7 +95,7 @@
 
     public void applyProfile(Object handle, Object profile) {
         if (profile instanceof Profile) {
- if (handle instanceof Package) {
+ if (handle instanceof Model) {
                 ((Model) handle).applyProfile((Profile) profile);
             } else if (handle instanceof Profile) {
                 ((Profile) handle).applyProfile((Profile) profile);

Modified: trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/FacadeEUMLImpl.java​
Url: http://argouml.tigri​s.org/source/browse/​argouml/trunk/src/ar​gouml-core-model-eum​l/src/org/argouml/mo​del/euml/FacadeEUMLI​mpl.java?view=diff​&pathrev=17450​&r1=17449&r2=174​50
====================​====================​====================​==================
--- trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/FacadeEUMLImpl.java​ (original)
+++ trunk/src/argouml-co​re-model-euml/src/or​g/argouml/model/euml​/FacadeEUMLImpl.java​ 2009-11-04 11:39:25-0800
@@ -1268,8 +1268,10 @@
     }
 
     public Collection getStereotypes(Object handle) {
- // TODO: Changed to Profiles::Class::extension in UML 2.x?
- return Collections.EMPTY_SET;
+ if (!(handle instanceof Element)) {
+ throw new IllegalArgumentException();
+ }
+ return ((Element) handle).getAppliedSt​ereotypes();
     }
 
     public Collection getStimuli(Object handle) {

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r17450 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml thn Thomas Neustupny 2009-11-04 11:39:26 PST
Messages per page: