svn commit: r18221 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2010-04-08 16:13:50-0700
New Revision: 18221

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java

Log:
Merge ArgoEclipse fork.  Make createAssociation undoable.  Fix copyright years.

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java?view=diff&pathrev=18221&r1=18220&r2=18221
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java	2010-04-08 16:13:50-0700
@@ -1,12 +1,14 @@
-/* $Id$
- *****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+// $Id$
+/*******************************************************************************
+ * Copyright (c) 2007,2010 Tom Morris and other contributors
  * 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:
+ *    Tom Morris - initial implementation
+ *    Bogdan Pistol - undo support & large piece of initial implementation
  *    bobtarling
  *****************************************************************************
  *
@@ -882,6 +884,7 @@
                 if (name != null) {
                     operation.setName(name);
                 } else {
+                    // TODO: Remove?  Can't be localized
                     operation.setName("newOperation");
                 }
                 getParams().add(operation);
@@ -912,6 +915,7 @@
             public void run() {
                 Parameter param = createParameter();
                 param.setType((Type) type);
+                // TODO: Remove?  Can't be localized
                 param.setName("arg" +
                     ((BehavioralFeature) o).getOwnedParameters().size());
                 ((BehavioralFeature) o).getOwnedParameters().add(param);
@@ -1064,7 +1068,17 @@
     }
 
     public Association createAssociation(Object extent) {
-        return UMLFactory.eINSTANCE.createAssociation();
+        RunnableClass run = new RunnableClass() {
+            public void run() {
+                getParams().add(UMLFactory.eINSTANCE.createAssociation());
+            }
+        };
+        ChangeCommand cmd = new ChangeCommand(
+                modelImpl, run,
+                "Create an association");
+        editingDomain.getCommandStack().execute(cmd);
+//        cmd.setObjects(run.getParams().get(0));
+        return (Association) run.getParams().get(0);
     }
     
     public AssociationClass createAssociationClass() {

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

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.