svn commit: r17453 - trunk/modules/dev/src/org/argouml/dev/DevActionFactory.java
Bob Tarling <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2009-11-04 15:18:16-0800
New Revision: 17453
Added:
trunk/modules/dev/src/org/argouml/dev/DevActionFactory.java
Log:
A test action for the context factories - would be nice to find a real usage for this
Added: trunk/modules/dev/src/org/argouml/dev/DevActionFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/modules/dev/src/org/argouml/dev/DevActionFactory.java?view=markup&pathrev=17453
==============================================================================
--- (empty file)
+++ trunk/modules/dev/src/org/argouml/dev/DevActionFactory.java 2009-11-04 15:18:16-0800
@@ -0,0 +1,63 @@
+// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// Copyright (c) 2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.dev;
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+
+import org.argouml.model.Model;
+import org.argouml.ui.ContextActionFactory;
+
+/**
+ * Test factory for dev module context actions
+ *
+ * @author Bob
+ */
+public class DevActionFactory implements ContextActionFactory {
+
+ public List createContextPopupActions(Object element) {
+ // TODO: Auto-generated method stub
+ List list = null;
+ if (Model.getFacade().isAClass(element)) {
+ list = new ArrayList(1);
+ list.add(new TestAction("Test Action"));
+ }
+ return list;
+ }
+
+ class TestAction extends AbstractAction {
+
+ public TestAction(String name) {
+ super(name);
+ }
+
+ public void actionPerformed(ActionEvent arg0) {
+ }
+
+ }
+}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2414548
To unsubscribe from this discussion, e-mail: [[email protected]].