From b8f3002eabcd0e6b7a63ce1b883b75c8fbd44009 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 16 May 2011 09:39:08 +0000 Subject: Update to populate the installed contributions imports git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103664 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sca-java-2.x/trunk/modules/domain-node') diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java index b7fcd8a751..e133a3d671 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java @@ -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()); + } + } + } } } -- cgit v1.2.3