if (!Utils.applyFormChanges(children[i]))
return false;
children[i].dispose();
}
TreeItem item = tree.getSelection()[0];
TreeData data = (TreeData) item.getData();
_dom.setInit(true);
switch (data.getType()) {
case Editor.DOC_JOB:
new JobForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_PROCESS:
new ProcessForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_SCRIPT:
new JobScriptForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_MONITOR:
ScriptForm form = new ScriptForm(c, SWT.NONE);
form.setTitle("Monitor");
form.setParams(_dom, data.getElement(), Editor.DOC_MONITOR);
form.init(true, true);
break;
case Editor.DOC_RELEASES:
new ReleasesForm(c, SWT.NONE, _dom, data.getElement(), _gui);
break;
case Editor.DOC_RELEASE:
new ReleaseForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_RELEASE_AUTHOR:
new AuthorsForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_RESOURCES:
new ResourcesForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_DATABASES:
new DatabasesForm(c, SWT.NONE, _dom, data.getElement(), _gui);
break;
case Editor.DOC_DATABASES_RESOURCE:
new DatabaseResourcesForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_FILES:
new FilesForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_DOCUMENTATION:
NoteForm doc = new NoteForm(c, SWT.NONE, Editor.DOC_DOCUMENTATION);
doc.setTitle("Note");
doc.setParams(_dom, data.getElement(), "documentation", false);
break;
case Editor.DOC_CONFIGURATION:
NoteForm note = new NoteForm(c, SWT.NONE, Editor.DOC_CONFIGURATION);
note.setTitle("Configuration Note");
note.setParams(_dom, data.getElement(), "note", true);
break;
case Editor.DOC_PARAMS:
new ParamsForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_PAYLOAD:
new PayloadForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_SETTINGS:
SettingsListener listener = new SettingsListener(_dom, data.getElement());
listener.setSettings();
NoteForm settings = new NoteForm(c, SWT.NONE, Editor.DOC_SETTINGS);
settings.setSettingsListener(listener);
settings.setTitle("Settings Note");
settings.setParams(_dom, listener.getSettingsElement(), "note", true);
break;
case Editor.DOC_PROFILES:
new ProfilesForm(c, SWT.NONE, _dom, data.getElement(), this);
break;
case Editor.DOC_SECTIONS:
new SectionsForm(c, SWT.NONE, _dom, data.getElement(), this, item);
break;
case Editor.DOC_SECTION_SETTINGS:
new SettingForm(c, SWT.NONE, _dom, data.getElement());
break;
case Editor.DOC_CONNECTIONS:
new ConnectionsForm(c, SWT.NONE, _dom, data.getElement(), this);
break;
case Editor.DOC_APPLICATIONS:
new ApplicationsForm(c, SWT.NONE, _dom, data.getElement(), this, item);
break;
default:
System.out.println("no form found for " + item.getText());
}
c.layout();
}