From a84fb5a6dc3f9fa5b8d1d064b71e2a65de7440e9 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 16 May 2011 13:28:56 +0000 Subject: Update shell to show contributions imports git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103728 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/shell/Shell.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sca-java-2.x/trunk/modules/shell/src/main') 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 ims = new ArrayList(); + 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 es = new ArrayList(); for (Export e : c.getExports()) { if (e instanceof JavaExport) { -- cgit v1.2.3