tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1103728 - /tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
Date Mon, 16 May 2011 13:28:56 GMT
Author: antelder
Date: Mon May 16 13:28:56 2011
New Revision: 1103728

URL: http://svn.apache.org/viewvc?rev=1103728&view=rev
Log:
Update shell to show contributions imports

Modified:
    tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java

Modified: tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java?rev=1103728&r1=1103727&r2=1103728&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
Mon May 16 13:28:56 2011
@@ -45,8 +45,11 @@ import org.apache.tuscany.sca.common.jav
 import org.apache.tuscany.sca.contribution.Artifact;
 import org.apache.tuscany.sca.contribution.Contribution;
 import org.apache.tuscany.sca.contribution.Export;
+import org.apache.tuscany.sca.contribution.Import;
 import org.apache.tuscany.sca.contribution.java.JavaExport;
+import org.apache.tuscany.sca.contribution.java.JavaImport;
 import org.apache.tuscany.sca.contribution.namespace.NamespaceExport;
+import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
 import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
 import org.apache.tuscany.sca.impl.NodeImpl;
 import org.apache.tuscany.sca.monitor.ValidationException;
@@ -222,6 +225,16 @@ public class Shell {
                 out.println(curi);
                 out.println("   URL: " + c.getLocation());
 
+                List<String> ims = new ArrayList<String>();
+                for (Import im : c.getImports()) {
+                    if (im instanceof JavaImport) {
+                        ims.add(((JavaImport)im).getPackage());
+                    } else if (im instanceof NamespaceImport) {
+                        ims.add(((NamespaceImport)im).getNamespace());
+                    }
+                }
+                out.println("   Imports: " + ims);
+
                 List<String> es = new ArrayList<String>();
                 for (Export e : c.getExports()) {
                     if (e instanceof JavaExport) {



Mime
View raw message