tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edward...@apache.org
Subject svn commit: r801178 - /tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
Date Wed, 05 Aug 2009 12:32:13 GMT
Author: edwardsmj
Date: Wed Aug  5 12:32:13 2009
New Revision: 801178

URL: http://svn.apache.org/viewvc?rev=801178&view=rev
Log:
Add Contribution context information to Monitor during Resolve phase

Modified:
    tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java?rev=801178&r1=801177&r2=801178&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
(original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
Wed Aug  5 12:32:13 2009
@@ -215,30 +215,36 @@
 
     public void resolve(Contribution contribution, ModelResolver resolver) throws ContributionResolveException
{
 
-    	if( !preResolved ) preResolve( contribution, resolver);
-    	ModelResolver contributionResolver = contribution.getModelResolver();
-
-        // Resolve all artifact models
-        for (Artifact artifact : contribution.getArtifacts()) {
-            Object model = artifact.getModel();
-            if (model != null) {
-                try {
-                   artifactProcessor.resolve(model, contributionResolver);
-                } catch (Throwable e) {
-                    throw new ContributionResolveException(e);
-                }
-            }
-        }
-
-        // Resolve deployable composites
-        List<Composite> deployables = contribution.getDeployables();
-        for (int i = 0, n = deployables.size(); i < n; i++) {
-            Composite deployable = deployables.get(i);
-            Composite resolved = (Composite)contributionResolver.resolveModel(Composite.class,
deployable);
-            if (resolved != deployable) {
-                deployables.set(i, resolved);
-            }
-        } // end for
+    	try {
+    		monitor.pushContext("Contribution: " + contribution.getURI());
+    		
+	    	if( !preResolved ) preResolve( contribution, resolver);
+	    	ModelResolver contributionResolver = contribution.getModelResolver();
+	
+	        // Resolve all artifact models
+	        for (Artifact artifact : contribution.getArtifacts()) {
+	            Object model = artifact.getModel();
+	            if (model != null) {
+	                try {
+	                   artifactProcessor.resolve(model, contributionResolver);
+	                } catch (Throwable e) {
+	                    throw new ContributionResolveException(e);
+	                }
+	            }
+	        }
+	
+	        // Resolve deployable composites
+	        List<Composite> deployables = contribution.getDeployables();
+	        for (int i = 0, n = deployables.size(); i < n; i++) {
+	            Composite deployable = deployables.get(i);
+	            Composite resolved = (Composite)contributionResolver.resolveModel(Composite.class,
deployable);
+	            if (resolved != deployable) {
+	                deployables.set(i, resolved);
+	            }
+	        } // end for
+    	} finally {
+    		monitor.popContext();
+    	} // end try
     } // end method resolve
 
     /**



Mime
View raw message