Author: bfitzpat
Date: 2012-05-16 16:31:29 -0400 (Wed, 16 May 2012)
New Revision: 41087
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
Log:
JBIDE-11770 - the parms dialog now understands defaults and populates them in the dialog
value field
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16
20:10:31 UTC (rev 41086)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16
20:31:29 UTC (rev 41087)
@@ -441,6 +441,26 @@
// ignore, move on
}
}
+ // now handle the default value cases
+ // {from:int=1000}
+ for (int i = 0; i < parms.length; i++) {
+ String regEx = parms[i].regEx;
+ String datatype = parms[i].datatype;
+
+ if ((datatype == null || datatype.trim().isEmpty()) &&
+ (regEx != null && !regEx.trim().isEmpty())) {
+ String[] values = parseString(regEx, "=");//$NON-NLS-1$
+ if (values != null && values.length > 1) {
+ String left = values[0];
+ String right = values[1];
+ if (supportedTypes.contains(left)) {
+ parms[i].datatype = left;
+ parms[i].value = right;
+ parms[i].regEx = null;
+ }
+ }
+ }
+ }
return parms;
}
}
Show replies by date