Révision 2178
| tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java (revision 2178) | ||
|---|---|---|
| 226 | 226 |
public Object runMacro(Class clazz, Map args) throws ResourceException, ScriptException {
|
| 227 | 227 |
HashMap<String, Object> arrangedMap = new HashMap<String, Object>(); |
| 228 | 228 |
arrangedMap.put("args", args);
|
| 229 |
|
|
| 230 |
|
|
| 231 |
// Find the Groovy Script |
|
| 232 |
/* |
|
| 233 |
Binding binding = null; |
|
| 234 |
if (bean instanceof groovy.lang.Script) {
|
|
| 235 |
groovy.lang.Script script = (groovy.lang.Script) bean; |
|
| 236 |
|
|
| 237 |
// if the "args" variable exists then use its values. Can be used to set a default value by another Macro |
|
| 238 |
if (script.getBinding().hasVariable("args")) {
|
|
| 239 |
oArgs = script.getBinding().getVariable("args"); //$NON-NLS-1$
|
|
| 240 |
} |
|
| 241 |
} |
|
| 242 |
*/ |
|
| 243 |
|
|
| 229 | 244 |
return run(clazz.getCanonicalName().replace(".", "/")+".groovy", new Binding(arrangedMap));
|
| 230 | 245 |
} |
| 231 | 246 |
|
Formats disponibles : Unified diff