Author: linus
Date: 2010-04-27 10:56:41-0700
New Revision: 18339

Added:
   
branches/BRANCH_0_30_x/src/argouml-core-model-euml/lib/emf/org.eclipse.emf.ecore.xmi.source_2.5.0.v200906151043.zip
      - copied unchanged from r18338, 
/trunk/src/argouml-core-model-euml/lib/emf/org.eclipse.emf.ecore.xmi.source_2.5.0.v200906151043.zip
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActivityGraphContextComboBoxModel.java
      - copied unchanged from r18338, 
/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActivityGraphContextComboBoxModel.java
Removed:
   
branches/BRANCH_0_30_x/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestActionAddEnumerationLiteral.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInstanceClassifierListModel.java
Modified:
   branches/BRANCH_0_30_x/   (props changed)
   branches/BRANCH_0_30_x/src/argouml-app/   (props changed)
   
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/application/helpers/ResourceLoaderWrapper.java
   
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/ProfileFacade.java
   
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/UserDefinedProfile.java
   
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/DependencyResolver.java
   
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java
   branches/BRANCH_0_30_x/src/argouml-app/tests/org/argouml/profile/   (props 
changed)
   
branches/BRANCH_0_30_x/src/argouml-app/tests/org/argouml/uml/ui/foundation/extension_mechanisms/TestUMLTagDefinitionComboBoxModel.java
   (props changed)
   
branches/BRANCH_0_30_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java
   branches/BRANCH_0_30_x/src/argouml-core-model-euml/.classpath
   
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-model/src/org/argouml/model/Model.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
   branches/BRANCH_0_30_x/www/index.html
   branches/BRANCH_0_30_x/www/psf/index.html

Log:
Merged r18298:18338 from trunk.

Modified: 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/application/helpers/ResourceLoaderWrapper.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/application/helpers/ResourceLoaderWrapper.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/application/helpers/ResourceLoaderWrapper.java
       (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/application/helpers/ResourceLoaderWrapper.java
       2010-04-27 10:56:41-0700
@@ -402,7 +402,7 @@
         images.put("button.new-dependency", "Dependency");
         images.put("button.new-destroyaction", "DestroyAction");
         images.put("button.new-enumeration", "Enumeration");
-        images.put("button.new-enumeration-literal", "EnumerationLiteral");
+        images.put("button.new-enumerationliteral", "EnumerationLiteral");
         images.put("button.new-extension-point", "New Extension Point");
         images.put("button.new-extend", "Extend");
         images.put("button.new-exception", "Exception");

Modified: 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/ProfileFacade.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/ProfileFacade.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/ProfileFacade.java
   (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/ProfileFacade.java
   2010-04-27 10:56:41-0700
@@ -105,7 +105,7 @@
                 try {
                     manager.removeProfile(p);
                 } catch (InvalidElementException e) {
-                    LOG.debug("Attempted to delete extent twice in 
removeAllProfiles " + p);
+                    LOG.debug("Attempted to delete extent twice in 
removeAllProfiles ");
                 }
             }
         }

Modified: 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/UserDefinedProfile.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/UserDefinedProfile.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/UserDefinedProfile.java
      (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/UserDefinedProfile.java
      2010-04-27 10:56:41-0700
@@ -87,6 +87,7 @@
     private File modelFile;
 
     private Collection profilePackages = null;
+    private Object packageLock = new Object();
 
     private UserDefinedFigNodeStrategy figNodeStrategy 
         = new UserDefinedFigNodeStrategy();
@@ -310,17 +311,22 @@
      *        dependencies
      */
     private void loadModel() {
-        if (profilePackages == null) {
-            try {
-                if (modelFile != null) {
-                    profilePackages = new 
FileModelLoader().loadModel(reference);
-                } else {
-                    profilePackages = new 
URLModelLoader().loadModel(reference);                    
+        synchronized (packageLock) {
+            if (profilePackages == null) {
+                try {
+                    if (modelFile != null) {
+                        profilePackages = new FileModelLoader()
+                                .loadModel(reference);
+                    } else {
+                        profilePackages = new URLModelLoader()
+                                .loadModel(reference);
+                    }
+                } catch (ProfileException e1) {
+                    LOG.error("Exception loading profile "
+                            + reference.getPath(), e1);
+                    profilePackages = Collections.emptySet();
+                    return;
                 }
-            } catch (ProfileException e1) {
-                LOG.error("Exception loading profile " + reference.getPath(), 
-                        e1);
-                return;
             }
 
             Collection packagesInProfile = filterPackages(profilePackages);

Modified: 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/DependencyResolver.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/DependencyResolver.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/DependencyResolver.java
     (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/DependencyResolver.java
     2010-04-27 10:56:41-0700
@@ -7,13 +7,12 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    euluis
+ *    Luis Sergio Oliveira (euluis)
  *****************************************************************************
  */
 
 package org.argouml.profile.internal;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Collection;
@@ -60,12 +59,14 @@
         if (unresolvedItems.isEmpty()) {
             return;
         }
-        final Collection<T> items = Collections.unmodifiableCollection(
-            new ArrayList<T>());
+        final Collection<T> items = Collections.emptyList();
         resolve(items);
     }
 
     /**
+     * Attempt to resolve the dependencies of the items already handed over to
+     * the resolver instance and the additional items handed over now.
+     *
      * @param items additional items to resolve.
      */
     void resolve(Collection<T> items) {

Modified: 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java
     (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java
     2010-04-27 10:56:41-0700
@@ -279,21 +279,28 @@
      * from the configuration.
      */
     private boolean registerProfileInternal(Profile p) {
-        boolean loadDefaultProfilesFromConfiguration = false;
-        if (p != null && !profiles.contains(p)) {
-            if (p instanceof UserDefinedProfile
-                    || getProfileForClass(p.getClass().getName()) == null) {
-                loadDefaultProfilesFromConfiguration = true;
-                profiles.add(p);
-                for (Critic critic : p.getCritics()) {
-                    for (Object meta : critic.getCriticizedDesignMaterials()) {
-                        Agency.register(critic, meta);
+        
+        try {
+            boolean loadDefaultProfilesFromConfiguration = false;
+            if (p != null && !profiles.contains(p)) {
+                if (p instanceof UserDefinedProfile
+                        || getProfileForClass(p.getClass().getName()) == null) 
{
+                    loadDefaultProfilesFromConfiguration = true;
+                    profiles.add(p);
+                    for (Critic critic : p.getCritics()) {
+                        for (Object meta : 
critic.getCriticizedDesignMaterials()) {
+                            Agency.register(critic, meta);
+                        }
+                        critic.setEnabled(false);
                     }
-                    critic.setEnabled(false);
                 }
             }
+            return loadDefaultProfilesFromConfiguration;
+        } catch (RuntimeException e) {
+            // TODO: Better if we wrap in a ProfileException and throw that
+            LOG.error("Error registering profile " + p.getDisplayName());
+            throw e;
         }
-        return loadDefaultProfilesFromConfiguration;
     }
 
     public void removeProfile(Profile p) {

Removed: 
branches/BRANCH_0_30_x/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestActionAddEnumerationLiteral.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestActionAddEnumerationLiteral.java?view=markup&pathrev=18338

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java
        (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java
        2010-04-27 10:56:41-0700
@@ -348,7 +348,7 @@
         super.postLoad();
         
         final Facade facade = Model.getFacade();                   
-        
+        LOG.info("doing postLoad on " + getName());
         // See issue 5811. We have collaborationroles, associationroles
         // and messages and actions saved to the incorrect interaction and
         // and collaboration. If we detect this circumstance at load then
@@ -372,6 +372,7 @@
             for (final Fig f : getLayer().getContents()) {
                 if (f instanceof FigMessage) {
                     final Object message = f.getOwner();
+                    LOG.info("Checking message " + f.getOwner());
                     final Object interaction = facade.getInteraction(message);
                     final Object context = facade.getContext(interaction);
                     final Object action = facade.getAction(message);
@@ -417,12 +418,6 @@
                                         assRole, collaboration);
                             }
                         }
-                        
-                        if (facade.getOwnedElements(namespace).isEmpty()) {
-                            LOG.warn("Deleting empty collaboration "
-                                    + collaboration);
-                            Model.getUmlFactory().delete(collaboration);
-                        }
                     }
                 }
             }

Modified: branches/BRANCH_0_30_x/src/argouml-core-model-euml/.classpath
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-euml/.classpath?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- branches/BRANCH_0_30_x/src/argouml-core-model-euml/.classpath       
(original)
+++ branches/BRANCH_0_30_x/src/argouml-core-model-euml/.classpath       
2010-04-27 10:56:41-0700
@@ -8,7 +8,7 @@
        <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.ecore.change_2.5.0.v200906151043.jar"/>

        <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.ecore.change.edit_2.5.0.v200906151043.jar"/>

        <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.ecore.edit_2.5.0.v200906151043.jar"/>

-       <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar"/>

+       <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar" 
sourcepath="lib/emf/org.eclipse.emf.ecore.xmi.source_2.5.0.v200906151043.zip"/>

        <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.edit_2.5.0.v200906151043.jar" 
sourcepath="lib/emf/org.eclipse.emf.edit.source_2.5.0.v200906151043.zip"/>

        <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.mapping_2.5.0.v200906151043.jar"/>

        <classpathentry exported="true" kind="lib" 
path="lib/emf/org.eclipse.emf.mapping.ecore2xml_2.5.0.v200906151043.jar"/>


Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
       (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
       2010-04-27 10:56:41-0700
@@ -53,6 +53,7 @@
 import org.eclipse.uml2.uml.NamedElement;
 import org.eclipse.uml2.uml.Namespace;
 import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.OpaqueBehavior;
 import org.eclipse.uml2.uml.Operation;
 import org.eclipse.uml2.uml.Parameter;
 import org.eclipse.uml2.uml.ParameterDirectionKind;
@@ -65,6 +66,7 @@
 import org.eclipse.uml2.uml.StructuralFeature;
 import org.eclipse.uml2.uml.Type;
 import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLFactory;
 import org.eclipse.uml2.uml.UMLPackage;
 import org.eclipse.uml2.uml.ValueSpecification;
 import org.eclipse.uml2.uml.VisibilityKind;
@@ -1313,14 +1315,62 @@
     }
 
     public void setBody(Object handle, Object expr) {
-        throw new NotYetImplementedException();
+       throw new NotYetImplementedException();
     }
 
     public void setBody(Object handle, String body) {
-        if (!(handle instanceof Comment)) {
-            throw new IllegalArgumentException();
-        }
-        ((Comment) handle).setBody(body);
+        
+       if( handle instanceof Comment) {
+           ((Comment) handle).setBody(body);
+           return;
+       }
+
+       if( handle instanceof Operation) {
+
+           // We need a method (operation implementation) to store the method 
body.
+           OpaqueBehavior methodImpl = null;
+
+           // Maybe this operation already has a method, that fits our purpose?
+           // In this case, try to reuse it, instead of creating a new 
implementation.
+           for( Behavior impl : ((Operation)handle).getMethods()) {
+               if( impl instanceof OpaqueBehavior) {
+                   methodImpl = (OpaqueBehavior)impl;
+                   break;
+               }
+           }
+
+           // Check, if we have to create a new implementation.
+           if( methodImpl == null) {
+               methodImpl = UMLFactory.eINSTANCE.createOpaqueBehavior();       
// Create a new implementation.
+               methodImpl.setSpecification( (Operation)handle);                
// And set the specification to the current operation.
+               ((Operation)handle).getMethods().add( methodImpl);              
// Add it to the operation's methods.
+           }
+
+           // Look, if there's already a java implementation
+           if( methodImpl.isSetLanguages()) {
+               int bodyIndex = 0;
+
+               // Search for our current target language.
+               for( String language : methodImpl.getLanguages()) {
+                   if( "java".equals( language)) {
+
+                       // Try to get the corresponding body and set it to the 
current body
+                       // This _should_ work, if all the bodies were stored 
with their corresponding languages.
+                       methodImpl.getBodies().set( bodyIndex, body);
+                       return;         // Job done.
+                   }
+                   bodyIndex++;
+               }
+           }
+  
+           // It seems, there was no implementation of our current target 
language, so we just add one.
+           methodImpl.getLanguages().add( "java");
+           methodImpl.getBodies().add( body);
+           return;
+       }
+
+       // We cannot set the body of this model element type.
+       throw new IllegalArgumentException();
     }
 
     @Deprecated
@@ -1464,6 +1514,19 @@
                 } else {
                     upper = Integer.parseInt(pieces[1]);
                 }
+            } else if (s.contains("_")) { //$NON-NLS-1$
+                // also parse 1_* or 0_N etc.
+                String[] pieces = s.trim().split("_"); //$NON-NLS-1$
+                if (pieces.length > 2) {
+                    throw new IllegalArgumentException((String) arg);
+                }
+                lower = Integer.parseInt(pieces[0]);
+                if ("*".equals(pieces[1]) //$NON-NLS-1$
+                     || "N".equals(pieces[1])) { //$NON-NLS-1$
+                    upper = -1;
+                } else {
+                    upper = Integer.parseInt(pieces[1]);
+                }
             } else { 
                 lower = Integer.parseInt(s);
                 upper = lower;

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
   (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
   2010-04-27 10:56:41-0700
@@ -87,6 +87,7 @@
 import org.eclipse.uml2.uml.Node;
 import org.eclipse.uml2.uml.ObjectFlow;
 import org.eclipse.uml2.uml.ObjectNode;
+import org.eclipse.uml2.uml.OpaqueBehavior;
 import org.eclipse.uml2.uml.OpaqueExpression;
 import org.eclipse.uml2.uml.Operation;
 import org.eclipse.uml2.uml.OutputPin;
@@ -344,7 +345,22 @@
         } else if (handle instanceof ValueSpecification) {
             return getValueSpecification((ValueSpecification) handle);
         } else if (handle instanceof Operation) {
-            throw new NotYetImplementedException();
+           
+           // Get the implementations of this operations and look for an 
OpaqueBehavior.
+           for( Behavior impl : ((Operation)handle).getMethods()) {
+               if( impl instanceof OpaqueBehavior) {
+                   if( ((OpaqueBehavior)impl).isSetLanguages()) {
+                       int bodyIndex = 0;
+                       for( String targetLanguage : 
((OpaqueBehavior)impl).getLanguages()) {
+                           if( "java".equals( targetLanguage)) {
+                               return ((OpaqueBehavior)impl).getBodies().get( 
bodyIndex);
+                           }
+                           bodyIndex++;
+                       }
+                   }
+               }
+           }
+           return null;  // No body found.
         }
         throw new IllegalArgumentException(
                 "Unsupported argument type - must be Comment, Constraint," +

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java
  (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java
  2010-04-27 10:56:41-0700
@@ -2936,32 +2936,32 @@
 
         if (arg == null || arg instanceof Multiplicity) {
             Multiplicity mult = (Multiplicity) arg;
-
+            Multiplicity previousMult =
+                (Multiplicity) Model.getFacade().getMultiplicity(handle);
             if (handle instanceof AssociationRole) {
                 ((AssociationRole) handle).setMultiplicity(mult);
-                return;
-            }
-            if (handle instanceof ClassifierRole) {
+            } else if (handle instanceof ClassifierRole) {
                 ((ClassifierRole) handle).setMultiplicity(mult);
-                return;
-            }
-            if (handle instanceof StructuralFeature) {
+            } else if (handle instanceof StructuralFeature) {
                 ((StructuralFeature) handle).setMultiplicity(mult);
-                return;
-            }
-            if (handle instanceof AssociationEnd) {
-                LOG.debug("Setting association end mult to " + mult);
+            } else if (handle instanceof AssociationEnd) {
                 ((AssociationEnd) handle).setMultiplicity(mult);
-                return;
-            }
-            if (handle instanceof TagDefinition) {
+            } else if (handle instanceof TagDefinition) {
                 ((TagDefinition) handle).setMultiplicity(mult);
-                return;
             }
+            if (previousMult != null &&
+                    Model.getFacade().getModelElementContainer(previousMult)
+                    == null) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Previous multiplicity of " + handle + " will be 
deleted." + mult);
+                }
+                Model.getUmlFactory().delete(previousMult);
+            }
+            return;
+        } else {
+            throw new IllegalArgumentException("handle: " + handle + " or arg: 
"
+                    + arg);
         }
-
-        throw new IllegalArgumentException("handle: " + handle + " or arg: "
-                + arg);
     }
 
 

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
      (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
      2010-04-27 10:56:41-0700
@@ -2130,18 +2130,18 @@
             if (handle instanceof StructuralFeature) {
                 StructuralFeature sf = (StructuralFeature) handle;
                 return sf.getMultiplicity();
-            }
-            if (handle instanceof TagDefinition) {
+            } else if (handle instanceof TagDefinition) {
                 TagDefinition td = (TagDefinition) handle;
                 return td.getMultiplicity();
-            }
-            if (handle instanceof ClassifierRole) {
+            } else if (handle instanceof ClassifierRole) {
                 ClassifierRole cr = (ClassifierRole) handle;
                 return cr.getMultiplicity();
-            }
-            if (handle instanceof AssociationEnd) {
+            } else if (handle instanceof AssociationEnd) {
                 AssociationEnd ae = (AssociationEnd) handle;
                 return ae.getMultiplicity();
+            } else if (handle instanceof AssociationRole) {
+                AssociationRole ar = (AssociationRole) handle;
+                return ar.getMultiplicity();
             }
         } catch (InvalidObjectException e) {
             throw new InvalidElementException(e);

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
  (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
  2010-04-27 10:56:41-0700
@@ -1,6 +1,6 @@
 /* $Id$
  *****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
  * 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
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *    Bob Tarling
+ *    Luis Sergio Oliveira (euluis)
  *****************************************************************************
  *
  * Some portions of this file was previously release using the BSD License:
@@ -1624,7 +1625,15 @@
         if (pkg == null) {
             return null;
         }
-        return pkg.getModelManagement().getUmlPackage().refAllOfType();
+        Collection<Object> packages = pkg.getModelManagement().getUmlPackage().
+            refAllOfType();
+        Collection<Object> topLevelPackages = new ArrayList<Object>();
+        for (Object pack : packages) {
+            if (Model.getFacade().getNamespace(pack) == null) {
+                topLevelPackages.add(pack);
+            }
+        }
+        return topLevelPackages;
     }
 
 }

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model/src/org/argouml/model/Model.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model/src/org/argouml/model/Model.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model/src/org/argouml/model/Model.java  
    (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model/src/org/argouml/model/Model.java  
    2010-04-27 10:56:41-0700
@@ -129,15 +129,27 @@
      */
     public static void setImplementation(ModelImplementation newImpl) {
         impl = newImpl;
-        activityGraphsHelper = impl.getActivityGraphsHelper();
-        collaborationsHelper = impl.getCollaborationsHelper();
-        commonBehaviorHelper = impl.getCommonBehaviorHelper();
-        coreHelper = impl.getCoreHelper();
-        dataTypesHelper = impl.getDataTypesHelper();
-        extensionMechanismsHelper = impl.getExtensionMechanismsHelper();
-        stateMachinesHelper = impl.getStateMachinesHelper();
-        umlHelper = impl.getUmlHelper();
-        useCasesHelper = impl.getUseCasesHelper();
+        if (impl == null) {
+            activityGraphsHelper = null;
+            collaborationsHelper = null;
+            commonBehaviorHelper = null;
+            coreHelper = null;
+            dataTypesHelper = null;
+            extensionMechanismsHelper = null;
+            stateMachinesHelper = null;
+            umlHelper = null;
+            useCasesHelper = null;            
+        } else {
+            activityGraphsHelper = impl.getActivityGraphsHelper();
+            collaborationsHelper = impl.getCollaborationsHelper();
+            commonBehaviorHelper = impl.getCommonBehaviorHelper();
+            coreHelper = impl.getCoreHelper();
+            dataTypesHelper = impl.getDataTypesHelper();
+            extensionMechanismsHelper = impl.getExtensionMechanismsHelper();
+            stateMachinesHelper = impl.getStateMachinesHelper();
+            umlHelper = impl.getUmlHelper();
+            useCasesHelper = impl.getUseCasesHelper();
+        }
     }
 
     /**

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
       (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
       2010-04-27 10:56:41-0700
@@ -1196,7 +1196,7 @@
     <list name="specialization" type="GeneralizableElement" />
        <separator />
     <list name="feature" 
type="org.omg.uml.foundation.core.Operation,org.omg.uml.behavioralelements.commonbehavior.Reception"
 label="label.operations" />
-       <list name="literal" type="EnumerationLiteral" label="label.literals" />
+       <list name="literal" 
type="org.omg.uml.foundation.core.EnumerationLiteral" label="label.literals" />
 
        <debug />
     <attribute name="targetFlow" type="Flow" />
@@ -1297,8 +1297,8 @@
     <combo name="multiplicity" type="Multiplicity" />
     <optionbox name="visibility" type="VisibilityKind" />
     <separator />
-    <combo name="tagType" type="Name" />
-       <list name="typedValue" type="TagDefinition" />
+    <combo name="tagType" type="Name" label="label.type"/>
+       <list name="typedValue" type="TagDefinition" 
label="label.tagged-values" />
        
     <attribute name="modifiers">
       <attribute name="isSpecification" type="Boolean" />

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
    (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
    2010-04-27 10:56:41-0700
@@ -17,7 +17,10 @@
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 import java.util.StringTokenizer;
 
 import javax.swing.Icon;
@@ -30,8 +33,11 @@
 import org.argouml.i18n.Translator;
 import org.argouml.kernel.Command;
 import org.argouml.kernel.NonUndoableCommand;
+import org.argouml.kernel.Project;
 import org.argouml.kernel.ProjectManager;
 import org.argouml.model.Model;
+import org.argouml.profile.Profile;
+import org.argouml.profile.ProfileException;
 import org.argouml.ui.targetmanager.TargetManager;
 import org.argouml.uml.ui.UMLAddDialog;
 import org.argouml.util.ArgoFrame;
@@ -78,6 +84,7 @@
         addGetterSetter("parameter", new ParameterGetterSetter());
         addGetterSetter("receiver", new ReceiverGetterSetter());
         addGetterSetter("sender", new SenderGetterSetter());
+        addGetterSetter("literal", new LiteralGetterSetter());
         addGetterSetter("body", new MethodExpressionGetterSetter());
         addGetterSetter("ownedElement", new OwnedElementGetterSetter());
         addGetterSetter("raisedSignal", new RaisedExceptionGetterSetter());
@@ -97,6 +104,8 @@
         addGetterSetter("action", new ActionGetterSetter());
         addGetterSetter("subvertex", new SubvertexGetterSetter());
         addGetterSetter("internalTransition", new 
InternalTransitionGetterSetter());
+        addGetterSetter("classifier", new ClassifierGetterSetter());
+        addGetterSetter("baseClass", new BaseClassGetterSetter());
         
         // UML2 only
         addGetterSetter("ownedOperation", new FeatureGetterSetter());
@@ -1698,6 +1707,31 @@
         }
     }
     
+    private class LiteralGetterSetter extends ListGetterSetter {
+        
+        public Collection getOptions(Object modelElement, String type) {
+            return Model.getFacade().getEnumerationLiterals(modelElement);
+        }
+      
+        public Object get(Object modelElement, String type) {
+            // not needed
+            return null;
+        }
+      
+        public void set(Object element, Object x) {
+            // not needed
+        }
+
+        public boolean isValidElement(Object element, String type) {
+          
+            return getOptions(element, type).contains(element);
+        }
+        
+        public Object getMetaType() {
+            return Model.getMetaTypes().getEnumerationLiteral();
+        }
+    }
+    
     private class ReceiverGetterSetter extends ListGetterSetter {
         
         public Collection getOptions(Object modelElement, String type) {
@@ -1746,4 +1780,251 @@
             return Model.getMetaTypes().getTransition();
         }
     }
+    
+
+    private class ClassifierGetterSetter extends ListGetterSetter implements 
Addable, Removeable {
+        
+        public Collection getOptions(Object modelElement, String type) {
+            return Model.getFacade().getClassifiers(modelElement);
+        }
+      
+        public Object get(Object modelElement, String type) {
+            // not needed
+            return null;
+        }
+      
+        public void set(Object element, Object x) {
+            // not needed
+        }
+
+        public boolean isValidElement(Object element, String type) {
+            return getOptions(element, type).contains(element);
+        }
+        
+        public Object getMetaType() {
+            return Model.getMetaTypes().getClassifier();
+        }
+
+        public Command getAddCommand(Object modelElement) {
+            return new AddCommand(modelElement);
+        }
+    
+        public Command getRemoveCommand(Object modelElement, Object 
objectToRemove) {
+           return new RemoveCommand(modelElement, objectToRemove);
+        }
+    
+        private class AddCommand extends AddModelElementCommand {
+
+            /**
+             * Constructor for ActionAddPackageImport.
+             */
+            public AddCommand(Object target) {
+                super(target);
+            }
+    
+            protected List getChoices() {
+                List list = new ArrayList();
+                
+                // Get all classifiers in our model
+                // TODO: We need the property panels to have some reference to 
the
+                // project they belong to instead of using deprecated 
functionality
+                Project p = ProjectManager.getManager().getCurrentProject();
+                Object model = p.getRoot();
+                list.addAll(Model.getModelManagementHelper()
+                        .getAllModelElementsOfKindWithModel(model, 
Model.getMetaTypes().getClassifier()));
+                
+                // Get all classifiers in all top level packages of all 
profiles
+                for (Profile profile : 
p.getProfileConfiguration().getProfiles()) {
+               try {
+                   for (Object topPackage : profile.getProfilePackages()) {
+                           list.addAll(Model.getModelManagementHelper()
+                                   
.getAllModelElementsOfKindWithModel(topPackage,
+                                           
Model.getMetaTypes().getClassifier()));
+                   }
+               } catch (ProfileException e) {
+                   // TODO: We need to rethrow this as some other exception
+                   // type but that is too much change for the moment.
+                   LOG.error("Exception", e);
+               }
+                }
+                return list;
+            }
+    
+            protected List getSelected() {
+                List list = new ArrayList();
+                list.addAll(Model.getFacade().getClassifiers(getTarget()));
+                return list;
+            }
+    
+    
+            protected String getDialogTitle() {
+                return Translator.localize("dialog.title.add-specifications");
+            }
+    
+    
+            @Override
+            protected void doIt(Collection selected) {
+                   Model.getCommonBehaviorHelper().setClassifiers(getTarget(), 
selected);
+            }
+        }
+    
+        private class RemoveCommand
+           extends NonUndoableCommand {
+       
+            private final Object target;
+            private final Object objectToRemove;
+       
+           /**
+            * Constructor for ActionRemovePackageImport.
+            */
+           public RemoveCommand(final Object target, final Object 
objectToRemove) {
+               this.target = target;
+               this.objectToRemove = objectToRemove;
+           }
+           
+           /*
+            * @see 
java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+            */
+           public Object execute() {
+               Model.getCommonBehaviorHelper()
+                   .removeClassifier(target, objectToRemove);
+               return null;
+           }
+       }
+    }
+    
+    private class BaseClassGetterSetter extends ListGetterSetter implements 
Addable, Removeable {
+        
+        public Collection getOptions(Object modelElement, String type) {
+            LinkedList<String> list = new LinkedList<String>(
+                    Model.getFacade().getBaseClasses(modelElement));
+            Collections.sort(list);
+            return list;
+        }
+      
+        public Object get(Object modelElement, String type) {
+            // not needed
+            return null;
+        }
+      
+        public void set(Object element, Object x) {
+            // not needed
+        }
+
+        public boolean isValidElement(Object element, String type) {
+            return getOptions(element, type).contains(element);
+        }
+        
+        public Object getMetaType() {
+            return Class.class;
+        }
+
+        public Command getAddCommand(Object modelElement) {
+            return new AddCommand(modelElement);
+        }
+    
+        public Command getRemoveCommand(Object modelElement, Object 
objectToRemove) {
+           return new RemoveCommand(modelElement, objectToRemove);
+        }
+    
+        private class AddCommand extends AddModelElementCommand {
+
+            final private List<String> metaClasses;
+            
+            /**
+             * Constructor for ActionAddPackageImport.
+             */
+            public AddCommand(Object target) {
+                super(target);
+                metaClasses = initMetaClasses();
+            }
+            
+            /**
+             * Initialize the meta-classes list. <p>
+             * 
+             * All this code is necessary to be independent of 
+             * model repository implementation, 
+             * i.e. to ensure that we have a 
+             * sorted list of strings.
+             */
+            private List<String> initMetaClasses() {
+                Collection<String> tmpMetaClasses = 
+                    Model.getCoreHelper().getAllMetatypeNames();
+                List<String> metaClasses;
+                if (tmpMetaClasses instanceof List) {
+                    metaClasses = (List<String>) tmpMetaClasses;
+                } else {
+                    metaClasses = new LinkedList<String>(tmpMetaClasses);
+                }
+                try {
+                    Collections.sort(metaClasses);
+                } catch (UnsupportedOperationException e) {
+                    // We got passed an unmodifiable List.  Copy it and sort 
the result
+                    metaClasses = new LinkedList<String>(tmpMetaClasses);
+                    Collections.sort(metaClasses);
+                }
+                
+                return metaClasses;
+            }
+            
+            protected List getChoices() {
+               return Collections.unmodifiableList(metaClasses);
+            }
+    
+            protected List getSelected() {
+                LinkedList<String> list = new LinkedList<String>(
+                        Model.getFacade().getBaseClasses(getTarget()));
+                Collections.sort(list);
+                return list;
+            }
+    
+    
+            protected String getDialogTitle() {
+                return Translator.localize("dialog.title.add-baseclasses");
+            }
+    
+    
+            @Override
+            protected void doIt(Collection selected) {
+                Object stereo = getTarget();
+                Set<Object> oldSet = new HashSet<Object>(getSelected());
+                Set toBeRemoved = new HashSet<Object>(oldSet);
+
+                for (Object o : selected) {
+                    if (oldSet.contains(o)) {
+                        toBeRemoved.remove(o);
+                    } else {
+                        Model.getExtensionMechanismsHelper()
+                                .addBaseClass(stereo, o);
+                    }
+                }
+                for (Object o : toBeRemoved) {
+                    
Model.getExtensionMechanismsHelper().removeBaseClass(stereo, o);
+                }
+            }
+        }
+    
+        private class RemoveCommand
+           extends NonUndoableCommand {
+       
+            private final Object target;
+            private final Object objectToRemove;
+       
+           /**
+            * Constructor for RemoveCommand.
+            */
+           public RemoveCommand(final Object target, final Object 
objectToRemove) {
+               this.target = target;
+               this.objectToRemove = objectToRemove;
+           }
+           
+           /*
+            * @see 
java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+            */
+           public Object execute() {
+                Model.getExtensionMechanismsHelper().removeBaseClass(target, 
objectToRemove);
+               return null;
+           }
+       }
+    }
 }

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
   (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
   2010-04-27 10:56:41-0700
@@ -71,10 +71,6 @@
             model = new 
UMLClassifierRoleAvailableFeaturesListModel(modelElement);
         } else if ("base".equals(propName)) {
             model = new UMLClassifierRoleBaseListModel(modelElement);
-        } else if ("baseClass".equals(propName)) {
-            model = new UMLStereotypeBaseClassListModel(modelElement);
-        } else if ("classifier".equals(propName)) {
-            model = new UMLInstanceClassifierListModel(modelElement);
         } else if ("classifierInState".equals(propName)) {
             model = new UMLOFSStateListModel(modelElement);
         } else if ("client".equals(propName)) {
@@ -107,8 +103,6 @@
             model = new UMLCreateActionClassifierListModel(modelElement);
         } else if ("link".equals(propName)) {
             model = new UMLAssociationLinkListModel(modelElement);
-        } else if ("literal".equals(propName)) {
-            model = new UMLEnumerationLiteralsListModel(modelElement);
         } else if ("outgoing".equals(propName)) {
             model = new UMLStateVertexOutgoingListModel(modelElement);
         } else if ("partition".equals(propName)) {

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java
       (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java
       2010-04-27 10:56:41-0700
@@ -27,6 +27,7 @@
 import org.argouml.core.propertypanels.model.GetterSetterManager;
 import org.argouml.kernel.Command;
 import org.argouml.model.AddAssociationEvent;
+import org.argouml.model.AttributeChangeEvent;
 import org.argouml.model.InvalidElementException;
 import org.argouml.model.Model;
 import org.argouml.model.RemoveAssociationEvent;
@@ -130,44 +131,55 @@
                Runnable doWorkRunnable = new Runnable() {
                    public void run() {
                        try {
-                               if 
(getterSetterManager.isFullBuildOnly(propertyName)) {
-                                       removeAllElements();
-                                       build();
-                               } else {
-                                   if (e instanceof RemoveAssociationEvent) {
-                                       final Object objectToRemove =
+                           if 
(getterSetterManager.isFullBuildOnly(propertyName)) {
+                               removeAllElements();
+                               build();
+                           } else {
+                               if (e instanceof RemoveAssociationEvent) {
+                                   final Object objectToRemove =
                                                ((RemoveAssociationEvent) 
e).getChangedValue();
-                                       removeElement(objectToRemove);
-                                   } else if (e instanceof 
AddAssociationEvent) {
-                                       Object newElement = 
((AddAssociationEvent) e).getChangedValue();
+                                   removeElement(objectToRemove);
+                               } else if (e instanceof AddAssociationEvent) {
+                                   Object newElement = ((AddAssociationEvent) 
e).getChangedValue();
                                        
-                                       if 
(Model.getUmlHelper().isMovable(getMetaType())) {
-                                           final Collection c =
-                                               (Collection) 
getterSetterManager.getOptions( 
-                                                   umlElement, 
-                                                   propertyName, 
-                                                   type);
-                                           final int index =
-                                               CollectionUtil.indexOf(c, 
newElement);
-                                           if (index < 0 || index > getSize() 
- 1) {
-                                               LOG.warn(
-                                                       "Unable to add element 
at correct position "
-                                                       + index + " added to 
end instead");
-                                               addElement(newElement);
-                                           } else {
-                                               add(index, newElement);
-                                           }
-                                       } else {
-                                           addElement(newElement);
-                                       }
+                                   if 
(!SimpleListModel.this.contains(newElement)) {
+                                       if 
(Model.getUmlHelper().isMovable(getMetaType())) {
+                                           final Collection c =
+                                               (Collection) 
getterSetterManager.getOptions( 
+                                                   umlElement, 
+                                                   propertyName, 
+                                                   type);
+                                           final int index =
+                                               CollectionUtil.indexOf(c, 
newElement);
+                                           if (index < 0 || index > getSize() 
- 1) {
+                                               LOG.warn(
+                                                       "Unable to add element 
at correct position "
+                                                       + index + " added to 
end instead");
+                                               addElement(newElement);
+                                           } else {
+                                               add(index, newElement);
+                                           }
+                                       } else {
+                                           addElement(newElement);
+                                       }
                                    }
-                               }
+                               }
+                           }
                        } catch (InvalidElementException e) {
                            LOG.debug("propertyChange accessed a deleted 
element ", e);
                        }
                    }  
                };
                SwingUtilities.invokeLater(doWorkRunnable);
+        } else if (e.getPropertyName().equals("baseClass")
+               && e.getPropertyName().equals(propertyName)
+               && e instanceof AttributeChangeEvent) {
+            // TODO: We have some quirk that the a baseClass addition or
+            // removal from a steroetype comes back as an AttributeChangeEvent
+            // rather than an AssociationChangeEvent. This needs further
+            // investigation to see if this can be made consistent.
+                   removeAllElements();
+            build();
         } else {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("We are listening for too much here. An event we 
don't need " + e);

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
        (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
        2010-04-27 10:56:41-0700
@@ -444,8 +444,14 @@
                             "label.represented-operation.navigate.tooltip"),
                     combo);
         } else if ("context".equals(prop.getName())) {
-            final UMLComboBoxModel model = 
-                new UMLStateMachineContextComboBoxModel(propertyName, target);
+            final UMLComboBoxModel model;
+            if (Model.getFacade().isAActivityGraph(target)) {
+                model = 
+                    new UMLActivityGraphContextComboBoxModel(propertyName, 
target);
+            } else {
+                model = 
+                    new UMLStateMachineContextComboBoxModel(propertyName, 
target);
+            }
             UMLComboBox combo = new UMLComboBox(model);
             comp = new UMLComboBoxNavigator(Translator.localize(
                             "label.context.navigate.tooltip"),

Removed: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java?view=markup&pathrev=18338

Removed: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInstanceClassifierListModel.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInstanceClassifierListModel.java?view=markup&pathrev=18338

Modified: branches/BRANCH_0_30_x/www/index.html
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/www/index.html?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- branches/BRANCH_0_30_x/www/index.html       (original)
+++ branches/BRANCH_0_30_x/www/index.html       2010-04-27 10:56:41-0700
@@ -141,13 +141,13 @@
 <script type="text/javascript">
 document.write("<div style='display:none;'>");
 </script>
-<a href="http://argouml-downloads.tigris.org/argouml-0.30.1.BETA_1/"; >Download 
and test ArgoUML 0.30.1 BETA 1</a>
+<a href="http://argouml-downloads.tigris.org/argouml-0.30.1.BETA_3/"; >Download 
and test ArgoUML 0.30.1.beta3</a>
 <script type="text/javascript">
 document.write("</div>");
 </script>
 
 <script type="text/javascript">
-    var LAST_BETA_VERSION = "0.30.1.BETA_1";
+    var LAST_BETA_VERSION = "0.30.1.BETA_3";
     if (navigator.appVersion.indexOf("Win")!=-1) {
         document.write("<a 
href='http://argouml-downloads.tigris.org/nonav/argouml-"+LAST_BETA_VERSION+"/ArgoUML-";
 + LAST_BETA_VERSION +"-setup.exe' 
onClick=\"javascript:urchinTracker('DOWNLOAD/ArgoUML-"+LAST_BETA_VERSION+"-setup.exe')\">Download
 and test ArgoUML "+LAST_BETA_VERSION + " (Windows)</a>");
     }

Modified: branches/BRANCH_0_30_x/www/psf/index.html
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/www/psf/index.html?view=diff&pathrev=18339&r1=18338&r2=18339
==============================================================================
--- branches/BRANCH_0_30_x/www/psf/index.html   (original)
+++ branches/BRANCH_0_30_x/www/psf/index.html   2010-04-27 10:56:41-0700
@@ -7,7 +7,7 @@
       <h2>Team Project Set Files for ArgoUML</h2>
       <p>
 The information previously on this page can now be found here:
-<a 
href="http://argouml.tigris.org/wiki/Team_Project_Set_Files_For_ArgoUML>http://argouml.tigris.org/wiki/Team_Project_Set_Files_For_ArgoUML</a>
+<a 
href="http://argouml.tigris.org/wiki/Team_Project_Set_Files_For_ArgoUML";>http://argouml.tigris.org/wiki/Team_Project_Set_Files_For_ArgoUML</a>
 </p>
     </div>
   </body>


------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2597185

To unsubscribe from this discussion, e-mail: 
[[email protected]].

Reply via email to