Login | Register
My pages Projects Community openCollabNet

Discussions > Commit Messages > svn commit: r19959 - trunk/src/argouml-app/src/org/argouml/ui/cmd/RelationshipActionFactory.java

argouml
Discussion topic

Back to topic list

svn commit: r19959 - trunk/src/argouml-app/src/org/argouml/ui/cmd/RelationshipActionFactory.java

Author bobtarling
Full name Bob Tarling
Date 2014-12-22 15:01:48 PST
Message Author: bobtarling
Date: 2014-12-22 15:01:47-0800
New Revision: 19959

Modified:
   trunk/src/argouml-ap​p/src/org/argouml/ui​/cmd/RelationshipAct​ionFactory.java

Log:
Allow dependencies to be added to diagram on any element

Modified: trunk/src/argouml-ap​p/src/org/argouml/ui​/cmd/RelationshipAct​ionFactory.java
Url: http://argouml.tigri​s.org/source/browse/​argouml/trunk/src/ar​gouml-app/src/org/ar​gouml/ui/cmd/Relatio​nshipActionFactory.j​ava?view=diff&pa​threv=19959&r1=1​9958&r2=19959
====================​====================​====================​==================
--- trunk/src/argouml-ap​p/src/org/argouml/ui​/cmd/RelationshipAct​ionFactory.java (original)
+++ trunk/src/argouml-ap​p/src/org/argouml/ui​/cmd/RelationshipAct​ionFactory.java 2014-12-22 15:01:47-0800
@@ -170,19 +170,17 @@
     
     private ActionList getDependancyToActions(final Object element, ArgoDiagram diagram) {
         ActionList al= new ActionList("Add Dependencies to ");
- if (Model.getFacade().i​sAClass(element)) {
             
- Collection dependenciesTo = Model.getFacade().ge​tClientDependencies(​element);
- for (Object dependency : dependenciesTo) {
-
- // Only show actions for associations not already on diagram
- if (diagram.presentatio​nFor(dependency) == null) {
- Collection suppliers = Model.getFacade().ge​tSuppliers(dependenc​y);
- for (Object supplier : suppliers) {
- al.add(new AddUsageAction(
- "Add dependency to "+ Model.getFacade().ge​tName(supplier),
- diagram, element, dependency, supplier));
- }
+ Collection dependenciesTo = Model.getFacade().ge​tClientDependencies(​element);
+ for (Object dependency : dependenciesTo) {
+
+ // Only show actions for associations not already on diagram
+ if (diagram.presentatio​nFor(dependency) == null) {
+ Collection suppliers = Model.getFacade().ge​tSuppliers(dependenc​y);
+ for (Object supplier : suppliers) {
+ al.add(new AddUsageAction(
+ "Add dependency to "+ Model.getFacade().ge​tName(supplier),
+ diagram, element, dependency, supplier));
                 }
             }
         }
@@ -191,19 +189,17 @@
     
     private ActionList getDependancyFromActions(final Object element, ArgoDiagram diagram) {
         ActionList al= new ActionList("Add Dependencies from ");
- if (Model.getFacade().i​sAClass(element)) {
             
- Collection dependenciesFrom = Model.getFacade().ge​tSupplierDependencie​s(element);
- for (Object dependency : dependenciesFrom) {
-
- // Only show actions for associations not already on diagram
- if (diagram.presentatio​nFor(dependency) == null) {
- Collection clients = Model.getFacade().ge​tClients(dependency)​;
- for (Object client : clients) {
- al.add(new AddUsageAction(
- "Add dependency from "+ Model.getFacade().ge​tName(client),
- diagram, element, dependency, client));
- }
+ Collection dependenciesFrom = Model.getFacade().ge​tSupplierDependencie​s(element);
+ for (Object dependency : dependenciesFrom) {
+
+ // Only show actions for associations not already on diagram
+ if (diagram.presentatio​nFor(dependency) == null) {
+ Collection clients = Model.getFacade().ge​tClients(dependency)​;
+ for (Object client : clients) {
+ al.add(new AddUsageAction(
+ "Add dependency from "+ Model.getFacade().ge​tName(client),
+ diagram, element, dependency, client));
                 }
             }
         }

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

Messages

Show all messages in topic

svn commit: r19959 - trunk/src/argouml-app/src/org/argouml/ui/cmd/RelationshipActionFactory.java bobtarling Bob Tarling 2014-12-22 15:01:48 PST
Messages per page: