});
label4 = new Label(group_1, SWT.SEPARATOR | SWT.HORIZONTAL);
label4.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 5, 1));
label4.setText("Label");
final Table tableIncludeParameter = new Table(group_1, SWT.BORDER | SWT.FULL_SELECTION);
final GridData gridData_1 = new GridData(GridData.FILL, GridData.FILL, true, true, 4, 3);
gridData_1.heightHint = 85;
tableIncludeParameter.setLayoutData(gridData_1);
tableIncludeParameter.setHeaderVisible(true);
tableIncludeParameter.setLinesVisible(true);
TableColumn tcName = new TableColumn(tableIncludeParameter, SWT.NONE);
tcName.setWidth(132);
tcName.setText("Name");
TableColumn tcValue = new TableColumn(tableIncludeParameter, SWT.NONE);
tcValue.setWidth(450);
tcValue.setText("Value");
for(int i= 0; i < listOfElement.size(); i++) {
Element param = (Element)listOfElement.get(i);
TableItem item = new TableItem( tableIncludeParameter, SWT.NONE);
item.setText(0, Utils.getAttributeValue("name", param));
item.setText(1, Utils.getAttributeValue("value", param));
item.setData("param", param);
}
final Button newButton = new Button(group_1, SWT.NONE);
newButton.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
newButton.setText("New");
//fill Include Params From External File
/*for(int j = 0; j < listOfElement.size(); j++) {
Element params_ = (Element)listOfElement.get(j);
java.util.List paramList = params_.getChildren("param");
for(int i = 0; i < paramList.size(); i++) {
Element param = (Element)paramList.get(i);
TableItem item = new TableItem( tableIncludeParameter, SWT.NONE);
item.setText(0, Utils.getAttributeValue("name", param));
item.setText(1, Utils.getAttributeValue("value", param));
item.setData("param", param);
}
}*/
final Button butIncludeRemove = new Button(group_1, SWT.NONE);
final GridData gridData_8 = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
butIncludeRemove.setLayoutData(gridData_8);
butIncludeRemove.setText("Remove");
butIncludeRemove.setEnabled(false);
butIncludeRemove.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
updateIncludeParam(includeParameterTabItem,
false,
tableIncludeParameter,
txtIncludeParameter,
txtIncludeParameterValue,
butIncludeRemove);
}
});
if(type == Editor.JOB) {
butImport = new Button(group_1, SWT.NONE);
butImport.setVisible(false);
butImport.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
//butImport.setText("import");
butImport.setText(WIZZARD);
butImport.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
JobAssistentImportJobsForm importParameterForms = new JobAssistentImportJobsForm(new JobListener(dom, listener.getParent(), listener.get_main()), tableIncludeParameter, Editor.JOB);
importParameterForms.showAllImportJobs();
}
});
//butImport.setText("Import");
butImport.setText(WIZZARD);
}
txtIncludeParameterValue.addKeyListener(new org.eclipse.swt.events.KeyAdapter() {
public void keyPressed(org.eclipse.swt.events.KeyEvent e) {
if (e.keyCode == SWT.CR && !txtIncludeParameter.getText().trim().equals("")){
updateIncludeParam(includeParameterTabItem,
true,
tableIncludeParameter,
txtIncludeParameter,
txtIncludeParameterValue,
butIncludeRemove);
}
}
});
txtIncludeParameter.addKeyListener(new org.eclipse.swt.events.KeyAdapter() {
public void keyPressed(org.eclipse.swt.events.KeyEvent e) {
if (e.keyCode == SWT.CR && !txtIncludeParameter.equals("")) {
updateIncludeParam(includeParameterTabItem,
true,
tableIncludeParameter,
txtIncludeParameter,
txtIncludeParameterValue,
butIncludeRemove);
}
}
});
butoIncludeSave.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
updateIncludeParam(includeParameterTabItem,
true,
tableIncludeParameter,
txtIncludeParameter,
txtIncludeParameterValue,
butIncludeRemove);
}
});
tableIncludeParameter.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
TableItem item = (TableItem) e.item;
if (item == null)
return;
txtIncludeParameter.setText(item.getText(0));
txtIncludeParameterValue.setText(item.getText(1));
butIncludeRemove.setEnabled(tableIncludeParameter.getSelectionCount() > 0);
butoIncludeSave.setEnabled(false);
}
});
newButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
txtIncludeParameter.setText("");
txtIncludeParameterValue.setText("");
butIncludeRemove.setEnabled(false);
tableIncludeParameter.deselectAll();
txtIncludeParameter.setFocus();
}
});
//Speichern und l�schen ist nicht im Xpath Ausdruck erlaubt. Grund: Parameter k�nne aus verschiedenen Paths geholt werden.