if (_dom.isLifeElement())
sos.scheduler.editor.app.Utils.setResetElement(_dom.getRoot());
else
sos.scheduler.editor.app.Utils.setResetElement(_dom.getRoot().getChild("config"));
Element config = _dom.getRoot().getChild("config");
TreeItem item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.CONFIG, config, Options.getHelpURL("config")));
item.setData("key", "config");
item.setData("copy_element", config);
item.setText("Config");
if (type == SchedulerDom.DIRECTORY)
item.dispose();
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.BASE, config, Options.getHelpURL("base")));
item.setData("key", "base");
item.setData("copy_element", config);
item.setText("Base Files");
if (type == SchedulerDom.DIRECTORY)
item.dispose();
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.PARAMETER, config, Options.getHelpURL("parameter")));
// item.setData("key", "params.param");
item.setData("key", "params_@_param");
item.setData("copy_element", config);
item.setText("Parameter");
if (type == SchedulerDom.DIRECTORY)
item.dispose();
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.SECURITY, config, Options.getHelpURL("security"), "security"));
item.setData("key", "security");
item.setData("max_occur", "1");
item.setData("copy_element", config);
item.setText("Security");
if (type == SchedulerDom.DIRECTORY)
item.dispose();
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.CLUSTER, config, Options.getHelpURL("cluster"), "cluster"));
item.setData("key", "cluster");
item.setData("max_occur", "1");
item.setData("copy_element", config);
item.setText("Cluster");
if (type == SchedulerDom.DIRECTORY)
item.dispose();
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.PROCESS_CLASSES, config, Options.getHelpURL("process_classes"), "process_classes"));
item.setData("key", "process_classes");
item.setData("max_occur", "1");
item.setData("copy_element", config);
item.setText("Process Classes");
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.SCHEDULES, config, Options.getHelpURL("schedules"), "schedules"));
item.setData("key", "schedules_@_schedule");
item.setData("copy_element", config);
item.setText(SCHEDULES);
treeFillSchedules(item);
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.LOCKS, config, Options.getHelpURL("locks"), "locks"));
item.setData("key", "locks");
item.setData("copy_element", config);
item.setText("Locks");
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.SCRIPT, config, Options.getHelpURL("start_script"), "script"));
item.setData("key", "script");
item.setData("copy_element", config);
item.setText("Start Script");
if (type == SchedulerDom.DIRECTORY)
item.dispose();
if (type != SchedulerDom.DIRECTORY) {
TreeItem http_server = new TreeItem(tree, SWT.NONE);
// http_server.setData(new TreeData(Editor.WEBSERVICES, config, Options.getHelpURL("http_server"), "http_server"));
http_server.setData(new TreeData(Editor.HTTP_SERVER, config, Options.getHelpURL("http_server"), "http_server"));
// http_server.setData("key", "http_server");
ArrayList l = new ArrayList();
l.add("http_server_@_web_service");
l.add("http_server_@_http.authentication");
l.add("http_server_@_http_directory");
http_server.setData("key", l);
http_server.setData("copy_element", config);
http_server.setText(HTTP_SERVER);
item = new TreeItem(http_server, SWT.NONE);
item.setData(new TreeData(Editor.WEBSERVICES, config, Options.getHelpURL("http_server"), "http_server"));
item.setData("key", "http_server_@_web_service");
item.setData("copy_element", config);
item.setText(WEB_SERVICES);
treeFillWebServices(item);
item = new TreeItem(http_server, SWT.NONE);
item.setData(new TreeData(Editor.HTTP_AUTHENTICATION, config, Options.getHelpURL("http_authentication"), "http_server"));
item.setData("key", "http_server_@_http.authentication");
item.setData("copy_element", config);
item.setText("Http Authentication");
item = new TreeItem(http_server, SWT.NONE);
item.setData(new TreeData(Editor.HTTPDIRECTORIES, config, Options.getHelpURL("http_directories"), "http_server"));
item.setData("key", "http_server_@_http_directory");
item.setData("copy_element", config);
item.setText("Http Directories");
}
if (type != SchedulerDom.DIRECTORY) {
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.HOLIDAYS, config, Options.getHelpURL("holidays"), "holidays"));
item.setData("key", "holidays");
item.setData("copy_element", config);
item.setText("Holidays");
treeFillHolidays(item, config);
}
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.JOBS, config, Options.getHelpURL("jobs"), "jobs"));
item.setData("key", "jobs_@_job");
item.setData("copy_element", config);
item.setText(JOBS);
treeFillJobs(item);
item.setExpanded(true);
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.JOB_CHAINS, config, Options.getHelpURL("job_chains"), "job_chains"));
item.setData("key", "job_chains_@_job_chain");
item.setData("copy_element", config);
item.setText(JOB_CHAINS);
treeFillJobChains(item);
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.ORDERS, config, Options.getHelpURL("orders"), "orders"));
item.setData("key", "commands_@_order");
item.setData("copy_element", config);
item.setText(ORDERS);
treeFillOrders(item, true);
item = new TreeItem(tree, SWT.NONE);
item.setData(new TreeData(Editor.COMMANDS, config, Options.getHelpURL("commands"), "commands"));
item.setData("key", "commands");
item.setData("copy_element", config);
item.setText("Commands");
if (type == SchedulerDom.DIRECTORY)