Login | Register
My pages Projects Community openCollabNet

Discussions > Commit Messages > svn commit: r19961 - trunk/src/argouml-app/src/org/argouml/uml/util/ModelUtil.java

argouml
Discussion topic

Back to topic list

svn commit: r19961 - trunk/src/argouml-app/src/org/argouml/uml/util/ModelUtil.java

Author bobtarling
Full name Bob Tarling
Date 2015-01-11 14:13:54 PST
Message Author: bobtarling
Date: 2015-01-11 14:13:53-0800
New Revision: 19961

Modified:
   trunk/src/argouml-ap​p/src/org/argouml/um​l/util/ModelUtil.jav​a

Log:
Only use navigable associations to generate package dependencies

Modified: trunk/src/argouml-ap​p/src/org/argouml/um​l/util/ModelUtil.jav​a
Url: http://argouml.tigri​s.org/source/browse/​argouml/trunk/src/ar​gouml-app/src/org/ar​gouml/uml/util/Model​Util.java?view=diff​&pathrev=19961​&r1=19960&r2=19​961
====================​====================​====================​==================
--- trunk/src/argouml-ap​p/src/org/argouml/um​l/util/ModelUtil.jav​a (original)
+++ trunk/src/argouml-ap​p/src/org/argouml/um​l/util/ModelUtil.jav​a 2015-01-11 14:13:53-0800
@@ -44,24 +44,37 @@
             for (Object classifier : Model.getModelManage​mentHelper().getAllM​odelElementsOfKindWi​thModel(model, Model.getMetaTypes()​.getClassifier())) {
                 
                 Object namespace = Model.getFacade().ge​tNamespace(classifie​r);
- Set dependentNamespaces = new HashSet();
                 
- for (Object dependency : Model.getFacade().ge​tClientDependencies(​classifier)) {
- for (Object dependentClass : Model.getFacade().ge​tSuppliers(dependenc​y)) {
- dependentNamespaces.​add(Model.getFacade(​).getNamespace(depen​dentClass));
+ if (Model.getFacade().g​etNamespace(namespac​e) != null) {
+ Set dependentNamespaces = new HashSet();
+
+ for (Object dependency : Model.getFacade().ge​tClientDependencies(​classifier)) {
+ for (Object dependentClass : Model.getFacade().ge​tSuppliers(dependenc​y)) {
+ dependentNamespaces.​add(Model.getFacade(​).getNamespace(depen​dentClass));
+ }
                     }
- }
- for (Object generalization : Model.getFacade().ge​tGeneralizations(cla​ssifier)) {
- Object superClass = Model.getFacade().ge​tGeneral(generalizat​ion);
- dependentNamespaces.​add(Model.getFacade(​).getNamespace(super​Class));
- }
- for (Object associatedClassifier : Model.getFacade().ge​tAssociatedClasses(c​lassifier)) {
- dependentNamespaces.​add(Model.getFacade(​).getNamespace(assoc​iatedClassifier));
- }
-
- for (Object dependentNamespace : dependentNamespaces) {
- if (Model.getCoreHelper​().getDependencies(d​ependentNamespace, namespace).isEmpty()) {
- Model.getUmlFactory(​).buildConnection(Mo​del.getMetaTypes().g​etDependency(), namespace, null, dependentNamespace, null, true, namespace);
+ for (Object generalization : Model.getFacade().ge​tGeneralizations(cla​ssifier)) {
+ Object superClass = Model.getFacade().ge​tGeneral(generalizat​ion);
+ dependentNamespaces.​add(Model.getFacade(​).getNamespace(super​Class));
+ }
+
+ for (Object closeEnd : Model.getFacade().ge​tAssociationEnds(cla​ssifier)) {
+ Object assoc = Model.getFacade().ge​tAssociation(closeEn​d);
+ for (Object assEnd : Model.getFacade().ge​tOtherAssociationEnd​s(closeEnd)) {
+ if (Model.getFacade().i​sNavigable(assEnd)) {
+ Object associatedClassifier = Model.getFacade().ge​tClassifier(assEnd);​
+ dependentNamespaces.​add(Model.getFacade(​).getNamespace(assoc​iatedClassifier));
+ }
+ }
+ }
+
+ for (Object dependentNamespace : dependentNamespaces) {
+
+ if (Model.getFacade().g​etNamespace(dependen​tNamespace) != null
+ && namespace != dependentNamespace
+ && Model.getCoreHelper(​).getDependencies(de​pendentNamespace, namespace).isEmpty()) {
+ Model.getUmlFactory(​).buildConnection(Mo​del.getMetaTypes().g​etDependency(), namespace, null, dependentNamespace, null, true, namespace);
+ }
                     }
                 }
             }

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

Messages

Show all messages in topic

svn commit: r19961 - trunk/src/argouml-app/src/org/argouml/uml/util/ModelUtil.java bobtarling Bob Tarling 2015-01-11 14:13:54 PST
Messages per page: