Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-05 08:32:16 +0000
committerEike Stepper2012-06-05 08:32:16 +0000
commit5969d91e7d3f37d8985b9f949d1ea1635083f5aa (patch)
tree55578be69f276de8587a2084e35a2746c307446b /plugins/org.eclipse.emf.cdo.releng.gitbash
parent70df22df4bcedc4cc36ffaf34a68aa9e2b7c9bdc (diff)
downloadcdo-5969d91e7d3f37d8985b9f949d1ea1635083f5aa.tar.gz
cdo-5969d91e7d3f37d8985b9f949d1ea1635083f5aa.tar.xz
cdo-5969d91e7d3f37d8985b9f949d1ea1635083f5aa.zip
Add result dialog to GitBash actions
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.gitbash')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitBash.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitBash.java b/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitBash.java
index 536e7489da..3dffbdefeb 100644
--- a/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitBash.java
+++ b/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitBash.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.releng.gitbash;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
import java.io.BufferedReader;
@@ -86,9 +87,18 @@ public class GitBash
}
int exitValue = process.waitFor();
- String message = exitValue == 0 ? "executed successfully" : "failed: " + exitValue;
- int severity = exitValue == 0 ? IStatus.INFO : IStatus.ERROR;
- Activator.log("Command '" + command + "' " + message + "\n" + output, severity);
+ if (exitValue == 0)
+ {
+ String message = "Command '" + command + "' executed successfully";
+ Activator.log(message + "\n" + output, IStatus.INFO);
+ MessageDialog.openInformation(shell, "Git Bash", message);
+ }
+ else
+ {
+ String message = "Command '" + command + "' failed: " + exitValue;
+ Activator.log(message + "\n" + output, IStatus.ERROR);
+ MessageDialog.openError(shell, "Git Bash", message);
+ }
}
catch (RuntimeException ex)
{

Back to the top