Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bugfix: Make sure we are dealing with a parameter, no matter what
  • Loading branch information
samuell committed Aug 28, 2013
1 parent 80ac0ba commit fdacfda
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -361,8 +361,17 @@ public void handleEvent(Event event) {
}

Object data = widget.getData();
if (data instanceof Option) {
Parameter parameter = ((Option) data).getParameter();
if (data instanceof Parameter || data instanceof Option) {

// Make sure we're dealing with a parameter here
Parameter parameter = null;
if (data instanceof Parameter) {
parameter = (Parameter) data;
} else if (data instanceof Option) {
parameter = ((Option) data).getParameter();
}

// From here on, we assume that we're dealing with a parameter
if (parameter.getParamType().equals("output")) {
String outputFolderAndFileName = newValue + "/" + (String) ((Text) getWidgetWithData("Output filename")).getText();
tempCommand = tempCommand.replace("$" + parameter.getName(), outputFolderAndFileName);
Expand Down

0 comments on commit fdacfda

Please sign in to comment.