if (!Utils.applyFormChanges(children[i]))
return false;
children[i].dispose();
}
TreeItem objSelectedTreeItem = tree.getSelection()[0];
TreeData objTreeItemUserdata = (TreeData) objSelectedTreeItem.getData();
if (objTreeItemUserdata != null) {
_dom.setInit(true);
switch (objTreeItemUserdata.getType()) {
case Editor.CONFIG:
new ConfigForm(c, SWT.NONE, _dom, _gui);
break;
case Editor.PARAMETER:
int type = getType(objTreeItemUserdata.getElement());
Attribute a = Utils.getJobElement(objTreeItemUserdata.getElement()).getAttribute("name");
if (a == null) {
new sos.scheduler.editor.conf.forms.ParameterForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, type);
}else {
String jobname = a.getValue();
new sos.scheduler.editor.conf.forms.ParameterForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, type,jobname);
}
break;
case Editor.SECURITY:
new SecurityForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.CLUSTER:
new ClusterForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.BASE:
new BaseForm(c, SWT.NONE, _dom);
break;
case Editor.PROCESS_CLASSES:
new ProcessClassesForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.LOCKS:
new LocksForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.MONITORS:
new ScriptsForm(c, SWT.NONE, _dom, _gui, objTreeItemUserdata.getElement());
break;
case Editor.MONITOR:
// new ScriptForm(c, SWT.NONE, "Monitor", _dom, data.getElement(), data.getType(), _gui);
new ScriptForm(c, SWT.NONE, MONITOR, _dom, objTreeItemUserdata.getElement(), objTreeItemUserdata.getType(), _gui);
break;
case Editor.SCRIPT:
new ScriptForm(c, SWT.NONE, "Start Script", _dom, objTreeItemUserdata.getElement(), objTreeItemUserdata.getType(), _gui);
break;
case Editor.JOB:
// new JobForm(c, SWT.NONE, _dom, data.getElement(), _gui);
new JobMainForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.JOB_OPTION:
new JobMainOptionForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.JOB_DOCUMENTATION:
new JobDocumentationForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.EXECUTE:
new ExecuteForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.SETTINGS:
new MailForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.ORDERS:
// new OrdersForm(c, SWT.NONE, _dom, _gui, this);
new OrdersForm(c, SWT.NONE, _dom, _gui);
break;
case Editor.ORDER:
new OrderForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.JOB_COMMAND_EXIT_CODES:
new sos.scheduler.editor.conf.forms.JobCommandExitCodesForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.JOB_COMMAND:
new JobCommandForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.JOB_COMMANDS:
new JobCommandsForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, this);
break;
case Editor.RUNTIME:
new RunTimeForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.WEEKDAYS:
new DaysForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, DaysListener.WEEKDAYS, (objSelectedTreeItem.getData("key") != null && objSelectedTreeItem.getData("key")
.equals("holidays_@_weekdays")));
break;
case Editor.MONTHDAYS:
new DaysForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, DaysListener.MONTHDAYS, false);
break;
case Editor.SPECIFIC_MONTHS:
new DaysForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, DaysListener.SPECIFIC_MONTHS, false);
break;
case Editor.ULTIMOS:
new DaysForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, DaysListener.ULTIMOS, false);
break;
case Editor.EVERYDAY:
case Editor.PERIODS:
new PeriodsForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.JOBS:
new JobsForm(c, SWT.NONE, _dom, _gui);
break;
case Editor.HOLIDAYS:
new DateForm(c, SWT.NONE, DateListener.HOLIDAY, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.DAYS:
new DateForm(c, SWT.NONE, DateListener.DATE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.SPECIFIC_WEEKDAYS:
new SpecificWeekdaysForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui, DaysListener.MONTHDAYS);
break;
case Editor.WEBSERVICES:
new WebservicesForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.WEBSERVICE:
new WebserviceForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.HTTPDIRECTORIES:
new HttpDirectoriesForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.HTTP_AUTHENTICATION:
new HttpAuthenticationForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.OPTIONS:
new JobOptionsForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.LOCKUSE:
new JobLockUseForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
break;
case Editor.JOB_CHAINS:
new JobChainsForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
// JobChainsForm jc= new JobChainsForm(c, SWT.NONE, _dom, data.getElement(), _gui);
// jc.setISchedulerUpdate(_gui);
break;
case Editor.JOB_CHAIN:
JobChainForm jc_ = new JobChainForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
jc_.setISchedulerUpdate(_gui);
break;
case Editor.JOB_CHAIN_NODES:
JobChainNodesForm jcn_ = new JobChainNodesForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
jcn_.setISchedulerUpdate(_gui);
break;
case Editor.JOB_CHAIN_NESTED_NODES:
JobChainNestedNodesForm j = new JobChainNestedNodesForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement());
j.setISchedulerUpdate(_gui);
break;
case Editor.COMMANDS:
new CommandsForm(c, SWT.NONE, _dom, _gui);
break;
case Editor.SCHEDULES:
new sos.scheduler.editor.conf.forms.SchedulesForm(c, SWT.NONE, _dom, _gui);
break;
case Editor.SCHEDULE:
new sos.scheduler.editor.conf.forms.ScheduleForm(c, SWT.NONE, _dom, objTreeItemUserdata.getElement(), _gui);
break;
case Editor.HTTP_SERVER:
break;
default:
System.out.println("no form found for " + objSelectedTreeItem.getText());