Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java	(revision 2726)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java	(revision 2727)
@@ -41,26 +41,37 @@
 
 @SuppressWarnings("rawtypes")
 public class ParametersDialog extends Dialog {
+	
 	Object bean;
+	
 	String script;
+	
 	String title;
-
-	List<NamedOptionDef> parameters;	
-	List<String> fieldNames = new ArrayList<String>(); // store all the declared parameters names 
-	LinkedHashMap<String, ParameterField> widgets = new LinkedHashMap<String, ParameterField>();
+	
+	List<NamedOptionDef> parameters;
+	
+	List<String> fieldNames = new ArrayList<>(); // store all the declared parameters names
+	
+	LinkedHashMap<String, ParameterField> widgets = new LinkedHashMap<>();
+	
 	protected boolean error = false;
+	
 	protected Map args; // store values given by another Macro, if contains all the needed values, no dialog is shown
+	
 	protected int numberOfParameters; // number of parameters to show in the dialog box (not set by 'args'), if 0 parameters no dialog is shown
+	
 	protected boolean mustShowDialog; // show dialog if args.size == 0 OR if there is at least one mandatory field to set
-
-	HashMap<String, Object> values = new HashMap<String, Object>(); // store the values of the parameters (may not contains all the values needed
+	
+	HashMap<String, Object> values = new HashMap<>(); // store the values of the parameters (may not contains all the values needed
+	
 	Properties defaultValues; // default values set by the .properties file
+	
 	Properties defaultScriptValues = new Properties(); // default values set by the Groovy script @Field@def annotation attribute
-
+	
 	File propFile;
-	//	private int titleWidth;
-	//	private Composite parent;
-
+	// private int titleWidth;
+	// private Composite parent;
+	
 	/**
 	 * 
 	 * @param parentShell
@@ -72,106 +83,124 @@
 		super(parentShell);
 		if (bean != null)
 			this.script = bean.getClass().getName();
-		this.parameters = new ArrayList<NamedOptionDef>();
+		this.parameters = new ArrayList<>();
 		this.bean = bean;
 		this.args = args;
 		setShellStyle(getShellStyle() | SWT.RESIZE);
-
+		
 		// count the number of fields to show. If "0" then don't show the dialog, see the "open()" function
 		// and select only the NamedOptionDef annotations
 		numberOfParameters = 0; // number of parameters not set by args
 		int numberOfMandatoryFields = 0;
 		for (OptionHandler arg : allParameters) {
 			if (arg.option instanceof NamedOptionDef) {
-				NamedOptionDef option = (NamedOptionDef)arg.option;
+				NamedOptionDef option = (NamedOptionDef) arg.option;
 				this.parameters.add(option);
 				fieldNames.add(option.name());
 				if (args.containsKey(option.name())) {
 					continue; // don't show the field
 				}
 				
-				//count number of mandatory fields set AND add exception for "Separator" widget types
+				// count number of mandatory fields set AND add exception for "Separator" widget types
 				if (option.required() || "Separator".equals(option.widget())) numberOfMandatoryFields++;
 				numberOfParameters++;
 			}
 		}
-
+		
 		mustShowDialog = numberOfMandatoryFields > 0 || (args.size() == 0 && numberOfParameters > 0);
-
+		
 		// initialize the properties file default values store
 		defaultValues = new Properties();
-		String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts"; //$NON-NLS-1$
-		File currentRootDir = new File(scriptRootDir, "macro"); //$NON-NLS-1$
-
-		propFile = new File(currentRootDir, this.script.replace(".", "/")+".properties");
-
+		String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts/groovy/user"; //$NON-NLS-1$
+		
+		propFile = new File(scriptRootDir, this.script.replace(".", "/") + ".properties");
+		
 		loadDefaultValuesFromPropFile();
-
 		
+		
 	}
-
-
+	
+	
 	private void loadDefaultValuesFromPropFile() {
 		if (propFile.exists()) {
 			try {
 				defaultValues.load(new FileReader(propFile));
-				Log.info("Retrieving previous macro parameters from "+propFile+" values="+defaultValues.entrySet() + "...");
-			} catch (Exception e) {
-				Log.severe("Failed to load previous values from "+propFile+": "+e);
+				Log.info("Retrieving previous macro parameters from " + propFile + " values=" + defaultValues.entrySet() + "...");
+			}
+			catch (Exception e) {
+				Log.severe("Failed to load previous values from " + propFile + ": " + e);
 				Log.printStackTrace(e);
 			}
 		}
 		
-		//initialize the script default values
-				for (NamedOptionDef option : this.parameters) {
-					String widgetName = option.widget();
-					String stringValue = option.def();
-					Object value = null;
-					if ("File".equals(widgetName) || "FileOpen".equals(widgetName)) { //$NON-NLS-1$
-						value = new File(stringValue);
-					} else if ("CreateFile".equals(widgetName) || "FileSave".equals(widgetName)) { //$NON-NLS-1$
-						value = new File(stringValue);
-					} else if ("Folder".equals(widgetName)) { //$NON-NLS-1$
-						value = new File(stringValue);
-					} else if ("Query".equals(widgetName)) { //$NON-NLS-1$
-						value = new CQLQuery(stringValue);
-					} else if ("Date".equals(widgetName)) { //$NON-NLS-1$
-						try {
-							value = DateField.formater.parse(stringValue);
-						} catch (ParseException e) {
-							Log.severe("Wrong default date format: "+stringValue+". Waiting for: "+DateField.STRINGFORMAT+". Error = "+e + ".");
-							value = new Date();
-						}
-					} else if ("Time".equals(widgetName)) { //$NON-NLS-1$
-						value = Integer.parseInt(stringValue);
-					} else if ("String".equals(widgetName)) { //$NON-NLS-1$
-						value = stringValue;
-					} else if ("Separator".equals(widgetName)) { //$NON-NLS-1$
-						value = stringValue;
-					} else if ("Password".equals(widgetName)) { //$NON-NLS-1$
-							value = stringValue;
-					} else if ("StringArray".equals(widgetName)) { //$NON-NLS-1$
-						value = stringValue;
-					} else if ("StringArrayMultiple".equals(widgetName)) { //$NON-NLS-1$
-						value = stringValue;
-					} else if ("StructuralUnits".equals(widgetName)) { //$NON-NLS-1$
-						value = stringValue;
-					} else if ("Text".equals(widgetName)) { //$NON-NLS-1$
-						value = stringValue;
-					} else if ("Integer".equals(widgetName)) { //$NON-NLS-1$
-						value = Integer.parseInt(stringValue);
-					} else if ("Float".equals(widgetName)) { //$NON-NLS-1$
-						value = Float.parseFloat(stringValue);
-					} else if ("Boolean".equals(widgetName)) { //$NON-NLS-1$
-						value = Boolean.parseBoolean(stringValue);
-					} else {
-						System.out.println(TXMUIMessages.unknowedWidgetNameColon+widgetName+TXMUIMessages.FileTreeContentProvider_4);
-					}
+		// initialize the script default values
+		for (NamedOptionDef option : this.parameters) {
+			String widgetName = option.widget();
+			String stringValue = option.def();
+			Object value = null;
+			if ("File".equals(widgetName) || "FileOpen".equals(widgetName)) { //$NON-NLS-1$
+				value = new File(stringValue);
+			}
+			else if ("CreateFile".equals(widgetName) || "FileSave".equals(widgetName)) { //$NON-NLS-1$
+				value = new File(stringValue);
+			}
+			else if ("Folder".equals(widgetName)) { //$NON-NLS-1$
+				value = new File(stringValue);
+			}
+			else if ("Query".equals(widgetName)) { //$NON-NLS-1$
+				value = new CQLQuery(stringValue);
+			}
+			else if ("Date".equals(widgetName)) { //$NON-NLS-1$
+				try {
+					value = DateField.formater.parse(stringValue);
 				}
+				catch (ParseException e) {
+					Log.severe("Wrong default date format: " + stringValue + ". Waiting for: " + DateField.STRINGFORMAT + ". Error = " + e + ".");
+					value = new Date();
+				}
+			}
+			else if ("Time".equals(widgetName)) { //$NON-NLS-1$
+				value = Integer.parseInt(stringValue);
+			}
+			else if ("String".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("Separator".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("Password".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("StringArray".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("StringArrayMultiple".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("StructuralUnits".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("Text".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			}
+			else if ("Integer".equals(widgetName)) { //$NON-NLS-1$
+				value = Integer.parseInt(stringValue);
+			}
+			else if ("Float".equals(widgetName)) { //$NON-NLS-1$
+				value = Float.parseFloat(stringValue);
+			}
+			else if ("Boolean".equals(widgetName)) { //$NON-NLS-1$
+				value = Boolean.parseBoolean(stringValue);
+			}
+			else {
+				System.out.println(TXMUIMessages.unknowedWidgetNameColon + widgetName + TXMUIMessages.FileTreeContentProvider_4);
+			}
+		}
 	}
-
-
-	/* (non-Javadoc)
+	
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
 	 */
 	@Override
@@ -179,242 +208,268 @@
 		super.configureShell(newShell);
 		int idx2 = script.lastIndexOf("Macro");
 		if (idx2 < 0) idx2 = script.length();
-		title = TXMUIMessages.bind(TXMUIMessages.p0ParametersInput,script.substring(script.lastIndexOf(".")+1, idx2));
+		title = TXMUIMessages.bind(TXMUIMessages.p0ParametersInput, script.substring(script.lastIndexOf(".") + 1, idx2));
 		newShell.setText(title);
 	}
-
+	
+	@Override
 	protected void createButtonsForButtonBar(Composite parent) {
-		//create the reset button (hack of the Back button)
-//		Button propButton = createButton(parent, IDialogConstants.BACK_ID,
-//				"...", false);
-//		propButton.removeListener(SWT.Selection, propButton.getListeners(SWT.Selection)[0]);
-//
-//		propButton.addSelectionListener(new SelectionAdapter() {
-//			@Override
-//			public void widgetSelected(SelectionEvent e) {
-//				FileDialog dialog = new FileDialog(e.display.getActiveShell());
-//				dialog.setFilterPath(propFile.getParent());
-//				dialog.setFilterExtensions(new String[] {"*.properties"});
-//				dialog.setFileName(propFile.getName());
-//				String path = dialog.open();
-//				if (path != null) {
-//					propFile = new File(path);
-//					loadDefaultValuesFromPropFile();
-//				}
-//			}
-//		});
+		// create the reset button (hack of the Back button)
+		// Button propButton = createButton(parent, IDialogConstants.BACK_ID,
+		// "...", false);
+		// propButton.removeListener(SWT.Selection, propButton.getListeners(SWT.Selection)[0]);
+		//
+		// propButton.addSelectionListener(new SelectionAdapter() {
+		// @Override
+		// public void widgetSelected(SelectionEvent e) {
+		// FileDialog dialog = new FileDialog(e.display.getActiveShell());
+		// dialog.setFilterPath(propFile.getParent());
+		// dialog.setFilterExtensions(new String[] {"*.properties"});
+		// dialog.setFileName(propFile.getName());
+		// String path = dialog.open();
+		// if (path != null) {
+		// propFile = new File(path);
+		// loadDefaultValuesFromPropFile();
+		// }
+		// }
+		// });
 		
 		Button button = createButton(parent, IDialogConstants.BACK_ID,
 				"Reset values", false);
 		button.removeListener(SWT.Selection, button.getListeners(SWT.Selection)[0]);
-
+		
 		button.addSelectionListener(new SelectionAdapter() {
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				//System.out.println("Reseting fields to default values");
+				// System.out.println("Reseting fields to default values");
 				for (String k : widgets.keySet()) {
 					widgets.get(k).resetToDefault();
 				}
 			}
 		});
 		if (numberOfParameters == 0) button.setEnabled(false);
-
+		
 		super.createButtonsForButtonBar(parent);
 		this.getButton(IDialogConstants.OK_ID).setText(TXMUIMessages.run);
 	}
-
+	
+	@Override
 	protected Control createButtonBar(Composite parent) {
 		Control c = super.createButtonBar(parent);
-
-		//		int barWidth = c.getSize().x;
-		//		if (barWidth > titleWidth) {
-		//			GridData cdata = (GridData)(this.parent.getLayoutData());
-		//			cdata.widthHint = barWidth;
-		//		}
-
+		
+		// int barWidth = c.getSize().x;
+		// if (barWidth > titleWidth) {
+		// GridData cdata = (GridData)(this.parent.getLayoutData());
+		// cdata.widthHint = barWidth;
+		// }
+		
 		return c;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
 	protected Control createDialogArea(Composite composite) {
-		//this.parent = composite;
+		// this.parent = composite;
 		super.createDialogArea(composite);
-
+		
 		composite.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, true));
 		
 		GridLayout layout = new GridLayout(1, true);
 		composite.setLayout(layout);
-
-		//TODO: this width initialization does not works : it does not depends on the buttonBar width
-		//		GridData cdata = (GridData)(composite.getLayoutData());
-		//		titleWidth = FitFontSize.calculate(composite, title) + 100;
-		//		cdata.widthHint = titleWidth;
-
+		
+		// TODO: this width initialization does not works : it does not depends on the buttonBar width
+		// GridData cdata = (GridData)(composite.getLayoutData());
+		// titleWidth = FitFontSize.calculate(composite, title) + 100;
+		// cdata.widthHint = titleWidth;
+		
 		// initialize each widget + default value *of the widget*
 		for (NamedOptionDef option : parameters) {
-			//if (arg.option instanceof NamedOptionDef) {
-
-			//NamedOptionDef option = (NamedOptionDef)arg.option;
-
+			// if (arg.option instanceof NamedOptionDef) {
+			
+			// NamedOptionDef option = (NamedOptionDef)arg.option;
+			
 			// if the 'args' contains a value filled by another Macro, don't show the widget
 			if (args.containsKey(option.name())) {
-				//System.out.println("Args contains '"+option.name()+"' with value '"+args.get(option.name())+"'");
+				// System.out.println("Args contains '"+option.name()+"' with value '"+args.get(option.name())+"'");
 				continue; // don't show the field
 			}
-
+			
 			// each widget is initialized with de default value set in @Field@def attribute
 			String widgetName = option.widget();
 			ParameterField widget = null;
 			if ("File".equals(widgetName) || "FileOpen".equals(widgetName)) { //$NON-NLS-1$
 				widget = new FileField(composite, SWT.NONE, option);
-			} else if ("CreateFile".equals(widgetName) || "FileSave".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("CreateFile".equals(widgetName) || "FileSave".equals(widgetName)) { //$NON-NLS-1$
 				widget = new CreateFileField(composite, SWT.NONE, option);
-			} else if ("Folder".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Folder".equals(widgetName)) { //$NON-NLS-1$
 				widget = new FolderField(composite, SWT.NONE, option);
-			} else if ("Query".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Query".equals(widgetName)) { //$NON-NLS-1$
 				widget = new QueryField(composite, SWT.NONE, option);
-			} else if ("Date".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Date".equals(widgetName)) { //$NON-NLS-1$
 				widget = new DateField(composite, SWT.NONE, option);
-			}  else if ("Time".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Time".equals(widgetName)) { //$NON-NLS-1$
 				widget = new TimeField(composite, SWT.NONE, option);
-			} else if ("Separator".equals(widgetName)) { //$NON-NLS-1$
-				widget = new SeparatorField(composite, SWT.NONE, option);	
-			} else if ("String".equals(widgetName)) { //$NON-NLS-1$
-				widget = new StringField(composite, SWT.NONE, option);	
-			} else if ("Password".equals(widgetName)) { //$NON-NLS-1$
-					widget = new PasswordField(composite, SWT.NONE, option);
-			} else if ("StringArray".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Separator".equals(widgetName)) { //$NON-NLS-1$
+				widget = new SeparatorField(composite, SWT.NONE, option);
+			}
+			else if ("String".equals(widgetName)) { //$NON-NLS-1$
+				widget = new StringField(composite, SWT.NONE, option);
+			}
+			else if ("Password".equals(widgetName)) { //$NON-NLS-1$
+				widget = new PasswordField(composite, SWT.NONE, option);
+			}
+			else if ("StringArray".equals(widgetName)) { //$NON-NLS-1$
 				widget = new StringArrayField(composite, SWT.NONE, option);
-			} else if ("StringArrayMultiple".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("StringArrayMultiple".equals(widgetName)) { //$NON-NLS-1$
 				widget = new StringArrayMultipleField(composite, SWT.NONE, option);
-			} else if ("StructuralUnits".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("StructuralUnits".equals(widgetName)) { //$NON-NLS-1$
 				widget = new CospusStructuresField(composite, SWT.NONE, option);
-			} else if ("Text".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Text".equals(widgetName)) { //$NON-NLS-1$
 				widget = new LongStringField(composite, SWT.NONE, option);
-			} else if ("Integer".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Integer".equals(widgetName)) { //$NON-NLS-1$
 				widget = new IntegerField(composite, SWT.NONE, option);
-			} else if ("Float".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Float".equals(widgetName)) { //$NON-NLS-1$
 				widget = new FloatField(composite, SWT.NONE, option);
-			} else if ("Boolean".equals(widgetName)) { //$NON-NLS-1$
+			}
+			else if ("Boolean".equals(widgetName)) { //$NON-NLS-1$
 				widget = new BooleanField(composite, SWT.NONE, option);
-			} else {
-				System.out.println(TXMUIMessages.unknowedWidgetNameColon+widgetName+TXMUIMessages.FileTreeContentProvider_4);
 			}
-
+			else {
+				System.out.println(TXMUIMessages.unknowedWidgetNameColon + widgetName + TXMUIMessages.FileTreeContentProvider_4);
+			}
+			
 			if (widget != null) {
 				widgets.put(option.name(), widget);
-
+				
 				// set default value in the fields, not enough if args contains the value
 				String value = defaultValues.getProperty(option.name());
 				if (value != null) { // set the default value using the properties stored
 					widget.setDefault(value);
 				}
 			}
-			//			}
+			// }
 		}
 		new Label(composite, SWT.NONE).setText(TXMUIMessages.mandatoryFields);
-
+		
 		return composite;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 	 */
 	@Override
 	protected void okPressed() {
 		error = false;
-
+		
 		// get widget values
 		for (String field : widgets.keySet()) {
 			ParameterField w = widgets.get(field);
 			Object value = w.getWidgetValue();
-
+			
 			// is widget set if mandatory EXCEPT "Separator" widgets
 			if (w.isWidgetMandatory() && value == null && !("Separator".equals(w.getWidgetType()))) {
-				System.out.println(TXMUIMessages.errorColonMissingValueColon+field);
+				System.out.println(TXMUIMessages.errorColonMissingValueColon + field);
 				error = true;
-			} else if (value != null) {
+			}
+			else if (value != null) {
 				values.put(field, value);
-				//System.out.println(""+field+"\t"+values.get(field));
+				// System.out.println(""+field+"\t"+values.get(field));
 			} // else value is not filled
 		}
-
-		//initialize variables
+		
+		// initialize variables
 		if (!error) {
 			initializeMacroVariables();
 			saveParameters();
-
+			
 			if (!error) {
 				super.okPressed();
 			}
-		} 
+		}
 	}
-
+	
 	private void saveParameters() {
 		if (!error) {
 			try {
 				propFile.getParentFile().mkdirs();
 				defaultValues.store(new FileWriter(propFile), "");
-			} catch (IOException e) {
-				System.out.println("Warning: failed to store default macro valuesin "+propFile+": "+e);
+			}
+			catch (IOException e) {
+				System.out.println("Warning: failed to store default macro valuesin " + propFile + ": " + e);
 				Log.printStackTrace(e);
 			}
 		}
 	}
-
-
+	
+	
 	/**
 	 * can use the args map to initialize variable not set with the dialog box
 	 */
 	private void initializeMacroVariables() {
-		//		System.out.println("Initialize macro variables of "+fieldNames);
+		// System.out.println("Initialize macro variables of "+fieldNames);
 		if (bean == null) return;
 		
 		Class c = bean.getClass();
-		for (String name :fieldNames) {
+		for (String name : fieldNames) {
 			Object value = values.get(name);
-//			if (value == null) { // no widget or not set by user
-//				value = defaultScriptValues.get(name);
-//			}
-//			if (value == null) { // no default set by script
-//				value = defaultValues.get(name);
-//			}
-			//System.out.println("test if args contains name="+name+" "+args.containsKey(name));
+			// if (value == null) { // no widget or not set by user
+			// value = defaultScriptValues.get(name);
+			// }
+			// if (value == null) { // no default set by script
+			// value = defaultValues.get(name);
+			// }
+			// System.out.println("test if args contains name="+name+" "+args.containsKey(name));
 			if (args.containsKey(name)) { // the 'args' variable may contains values set by another Macro
 				value = args.get(name);
-			} else { // store the default value only if user set it in the dialog box
+			}
+			else { // store the default value only if user set it in the dialog box
 				if (value != null) {
 					defaultValues.setProperty(name, value.toString());
 				}
 			}
-
+			
 			try {
-				//System.out.println("setting "+name+ " with "+values.get(name));
+				// System.out.println("setting "+name+ " with "+values.get(name));
 				Field field = c.getDeclaredField(name);
 				field.setAccessible(true);
 				field.set(bean, value);
-			}  catch (Exception e) {
-				System.out.println(TXMUIMessages.errorInAtOptionNameDeclarationColon+e.getMessage());
+			}
+			catch (Exception e) {
+				System.out.println(TXMUIMessages.errorInAtOptionNameDeclarationColon + e.getMessage());
 				Log.printStackTrace(e);
 				error = true;
 			}
-
+			
 		}
 	}
-
-
+	
+	
 	protected boolean isError() {
 		return error;
 	}
-
+	
 	public HashMap<String, Object> getValues() {
 		return values;
 	}
-
-	static boolean errorOpen,retOpen;
+	
+	static boolean errorOpen, retOpen;
+	
 	/**
 	 * Conveniance method to initialize the parameters dialog.
 	 * Can detect the "args" Groovy binding and use it to set variables
@@ -427,27 +482,28 @@
 		errorOpen = true;
 		retOpen = false;
 		
-//		if (!(bean instanceof groovy.lang.Script)) {
-//			System.out.println(Messages.ParametersDialog_15);
-//			return false;
-//		}
-
+		// if (!(bean instanceof groovy.lang.Script)) {
+		// System.out.println(Messages.ParametersDialog_15);
+		// return false;
+		// }
+		
 		Object oArgs = null;
 		if (bean instanceof groovy.lang.Script) {
 			groovy.lang.Script script = (groovy.lang.Script) bean;
-
+			
 			// if the "args" variable exists then use its values. Can be used to set a default value by another Macro
 			if (script.getBinding().hasVariable("args")) {
 				oArgs = script.getBinding().getVariable("args"); //$NON-NLS-1$
 			}
 		}
-
+		
 		final Map args;
 		if (oArgs == null || !(oArgs instanceof Map)) {
 			args = new HashMap<String, Object>();
-		} else {
-			args = (Map)oArgs;
 		}
+		else {
+			args = (Map) oArgs;
+		}
 		
 		if (bean instanceof groovy.lang.Script) { // create the args binding if not already existing
 			groovy.lang.Script script = (groovy.lang.Script) bean;
@@ -457,23 +513,26 @@
 		}
 		
 		Display.getDefault().syncExec(new Runnable() {
-			public void run() { 
+			
+			@Override
+			public void run() {
 				boolean okNames = true;
 				CmdLineParser parser = new CmdLineParser(bean);
-
+				
 				Display display = Display.getCurrent();
 				Shell shell = display.getActiveShell();
-
+				
 				// check names
 				Class c = bean.getClass();
 				for (OptionHandler opt : parser.getOptions()) {
 					try {
 						if (opt.option instanceof NamedOptionDef) {
-							NamedOptionDef option = (NamedOptionDef)opt.option;
+							NamedOptionDef option = (NamedOptionDef) opt.option;
 							c.getDeclaredField(option.name());
 						}
-					}  catch (NoSuchFieldException e) {
-						System.out.println(TXMUIMessages.errorInAtOptionNameDeclarationColon+e.getMessage());
+					}
+					catch (NoSuchFieldException e) {
+						System.out.println(TXMUIMessages.errorInAtOptionNameDeclarationColon + e.getMessage());
 						okNames = false;
 					}
 				}
@@ -484,7 +543,8 @@
 					if (dialog.getMustShowDialog()) {
 						retOpen = dialog.open() == ParametersDialog.OK;
 						errorOpen = dialog.isError();
-					} else { // fields initialized by 'args'
+					}
+					else { // fields initialized by 'args'
 						dialog.initializeMacroVariables(); // with args
 						if (dialog.getNumberOfFields() > 0) dialog.saveParameters();
 						retOpen = true;
@@ -494,7 +554,7 @@
 					if (bean instanceof groovy.lang.Script) { // reset the timer binding if already existing
 						groovy.lang.Script script = (groovy.lang.Script) bean;
 						if (script.getBinding().hasVariable("timer")) {
-							Timer timer = (Timer)script.getBinding().getVariable("timer");
+							Timer timer = (Timer) script.getBinding().getVariable("timer");
 							timer.reset();
 						}
 					}
@@ -503,22 +563,22 @@
 		});
 		return retOpen && !errorOpen;
 	}
-
+	
 	public boolean getMustShowDialog() {
 		return mustShowDialog;
 	}
-
+	
 	protected int getNumberOfFields() {
 		return numberOfParameters;
 	}
-
-	// TODO: uncomment this to enable "args" detection  
-	//	public int open() {
-	//		System.out.println("Number of parameters: "+numberOfParameters);
-	//		if (numberOfParameters == 0) {
-	//			return ParametersDialog.OK;
-	//		} else {
-	//			return super.open();
-	//		}
-	//	}
-}
\ No newline at end of file
+	
+	// TODO: uncomment this to enable "args" detection
+	// public int open() {
+	// System.out.println("Number of parameters: "+numberOfParameters);
+	// if (numberOfParameters == 0) {
+	// return ParametersDialog.OK;
+	// } else {
+	// return super.open();
+	// }
+	// }
+}
