Skip to content

Commit

Permalink
FORGE-1607: Added API change
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 26, 2014
1 parent 3413d03 commit 4ed2740
Showing 1 changed file with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,17 @@ public String prompt(final String message) {
@Override
public void run() {
InputDialog dlg = new InputDialog(shell, "", message, "", null);
stringResult = (dlg.open() == Window.OK) ? dlg.getValue() : null;
stringResult = (dlg.open() == Window.OK) ? dlg.getValue()
: null;
}

});
return stringResult;
}

@Override
public boolean promptBoolean(final String message) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
booleanResult = MessageDialog.openQuestion(shell, "Question", message);;
}

});
return booleanResult;
return promptBoolean(message, true);
}

@Override
Expand All @@ -59,11 +53,23 @@ public String promptSecret(final String message) {
public void run() {
// FIXME: Should mask the input
InputDialog dlg = new InputDialog(shell, "", message, "", null);
stringResult = (dlg.open() == Window.OK) ? dlg.getValue() : null;
stringResult = (dlg.open() == Window.OK) ? dlg.getValue()
: null;
}

});
return stringResult;
}

@Override
public boolean promptBoolean(final String message,
final boolean defaultValue) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
booleanResult = MessageDialog.openQuestion(shell, "Question",
message);
}
});
return booleanResult;
}
}

0 comments on commit 4ed2740

Please sign in to comment.