summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java')
-rw-r--r--plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java
new file mode 100644
index 0000000..5fbab76
--- /dev/null
+++ b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java
@@ -0,0 +1,26 @@
1package org.yocto.remote.utils;
2
3import org.eclipse.jface.dialogs.MessageDialog;
4
5public class DialogRunnable implements Runnable{
6 int type = 0;
7 boolean result;
8 public static final int QUESTION = 1;
9 public static final int ERROR = 2;
10 String title;
11 String message;
12
13 DialogRunnable(String title, String message, int type){
14 this.title = title;
15 this.message = message;
16 this.type = type;
17 }
18 @Override
19 public void run() {
20 if (type == QUESTION) {
21 result = MessageDialog.openQuestion(null, title, message);
22 } else if (type == ERROR) {
23 MessageDialog.openError(null, title, message);
24 }
25 }
26} \ No newline at end of file