summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/shell/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-16 13:28:56 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-16 13:28:56 +0000
commita84fb5a6dc3f9fa5b8d1d064b71e2a65de7440e9 (patch)
treef652ad914fafcfec596ed9d60d563f8148c5a859 /sca-java-2.x/trunk/modules/shell/src/main
parentb8f3002eabcd0e6b7a63ce1b883b75c8fbd44009 (diff)
Update shell to show contributions imports
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103728 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
index dc479d2de2..fc34129b8a 100644
--- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
+++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
@@ -45,8 +45,11 @@ import org.apache.tuscany.sca.common.java.io.IOHelper;
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) {