You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/09/11 22:07:37 UTC

svn commit: r442318 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/SynchronizedDeploymentOp.java

Author: sppatel
Date: Mon Sep 11 13:07:36 2006
New Revision: 442318

URL: http://svn.apache.org/viewvc?view=rev&rev=442318
Log:
GERONIMODEVTOOLS-90 updated fix, completions showing error dialog, pass in severity

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/SynchronizedDeploymentOp.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/SynchronizedDeploymentOp.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/SynchronizedDeploymentOp.java?view=diff&rev=442318&r1=442317&r2=442318
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/SynchronizedDeploymentOp.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/SynchronizedDeploymentOp.java Mon Sep 11 13:07:36 2006
@@ -47,7 +47,7 @@
 
 	private IDeploymentCommand command;
 
-	private IStatus status = null;
+	private MultiStatus status = null;
 
 	private IProgressMonitor _monitor = null;
 
@@ -121,12 +121,10 @@
 			_monitor.subTask(dsm.toString());
 			if (command.getCommandType() == deploymentStatus.getCommand()) {
 				if (deploymentStatus.isCompleted()) {
-					status = new MultiStatus(Activator.PLUGIN_ID, 0, "", null);
-					messageToStatus((MultiStatus)status, dsm.getMessage());
+					messageToStatus(IStatus.OK, dsm.getMessage(), false);
 					sendNotification();
 				} else if (deploymentStatus.isFailed()) {
-					status = new MultiStatus(Activator.PLUGIN_ID, 0, "", null);
-					messageToStatus((MultiStatus) status, dsm.getMessage());
+					messageToStatus(IStatus.ERROR, dsm.getMessage(), true);
 					sendNotification();
 				}
 			}
@@ -151,12 +149,13 @@
 		return command.getModule();
 	}
 	
-    public static void messageToStatus(MultiStatus status, String source) {
+    public void messageToStatus(int severity, String source, boolean error) {
+    	status = new MultiStatus(Activator.PLUGIN_ID, 0, "", null);
 		try {
 			BufferedReader in = new BufferedReader(new StringReader(source));
 			String line;
 			while ((line = in.readLine()) != null) {
-				status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,line, null));
+				status.add(new Status(severity, Activator.PLUGIN_ID, 0,line, null));
 			}
 		} catch (IOException e) {