tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1103664 - /tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
Date Mon, 16 May 2011 09:39:08 GMT
Author: antelder
Date: Mon May 16 09:39:08 2011
New Revision: 1103664

URL: http://svn.apache.org/viewvc?rev=1103664&view=rev
Log:
Update to populate the installed contributions imports

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java?rev=1103664&r1=1103663&r2=1103664&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
Mon May 16 09:39:08 2011
@@ -176,6 +176,18 @@ public class NodeImpl2 {
                     } 
                 }
             }
+            
+            // Imports
+            if (contribution.getImports() != null) {
+                for (Import imprt : contribution.getImports()) {
+                    // TODO: Handle these and others in a more extensible way
+                    if (imprt instanceof JavaImport) {
+                        ic.getJavaImports().add(((JavaImport)imprt).getPackage());
+                    } else if (imprt instanceof NamespaceImport) {
+                        ic.getNamespaceImports().add(((NamespaceImport)imprt).getNamespace());
+                    } 
+                }
+            }
         }
     }
     



Mime
View raw message