use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.
the class XmlJoinMetaGetFieldsTest method testGetFieldsReturnTargetStepFieldsPlusResultXmlField.
@Test
public void testGetFieldsReturnTargetStepFieldsPlusResultXmlField() throws Exception {
String sourceXmlStep = "source xml step name";
String sourceStepField = "source field test name";
String targetStepField = "target field test name";
String resultXmlFieldName = "result xml field name";
RowMeta rowMetaPreviousSteps = new RowMeta();
rowMetaPreviousSteps.addValueMeta(new ValueMeta(sourceStepField, ValueMetaInterface.TYPE_STRING));
xmlJoinMeta.setSourceXMLstep(sourceXmlStep);
xmlJoinMeta.setValueXMLfield("result xml field name");
StepMeta sourceStepMeta = new StepMeta();
sourceStepMeta.setName(sourceXmlStep);
when(transMeta.findStep(sourceXmlStep)).thenReturn(sourceStepMeta);
when(transMeta.getStepFields(sourceStepMeta, null, null)).thenReturn(rowMetaPreviousSteps);
RowMeta rowMeta = new RowMeta();
ValueMetaString keepValueMeta = new ValueMetaString(targetStepField);
ValueMetaString removeValueMeta = new ValueMetaString(sourceStepField);
rowMeta.addValueMeta(keepValueMeta);
rowMeta.addValueMeta(removeValueMeta);
xmlJoinMeta.getFields(rowMeta, "testStepName", null, null, transMeta, null, null);
Assert.assertEquals(2, rowMeta.size());
String[] strings = rowMeta.getFieldNames();
Assert.assertEquals(targetStepField, strings[0]);
Assert.assertEquals(resultXmlFieldName, strings[1]);
}
use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.
the class XsltTest method createResultRowMetaInterface.
public RowMetaInterface createResultRowMetaInterface() {
RowMetaInterface rm = new RowMeta();
ValueMetaInterface[] valuesMeta = { new ValueMeta("XML", ValueMeta.TYPE_STRING), new ValueMeta("XSL", ValueMeta.TYPE_STRING), new ValueMeta("filename", ValueMeta.TYPE_STRING), new ValueMeta("result", ValueMeta.TYPE_STRING) };
for (int i = 0; i < valuesMeta.length; i++) {
rm.addValueMeta(valuesMeta[i]);
}
return rm;
}
use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.
the class XMLInputStreamDialog method open.
@Override
public String open() {
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
props.setLook(shell);
setShellImage(shell, inputMeta);
ModifyListener lsMod = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
inputMeta.setChanged();
}
};
changed = inputMeta.hasChanged();
FormLayout formLayout = new FormLayout();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Shell.Text"));
int middle = props.getMiddlePct();
int margin = Const.MARGIN;
// Step name line
//
wlStepname = new Label(shell, SWT.RIGHT);
wlStepname.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Stepname.Label"));
props.setLook(wlStepname);
fdlStepname = new FormData();
fdlStepname.left = new FormAttachment(0, 0);
fdlStepname.right = new FormAttachment(middle, -margin);
fdlStepname.top = new FormAttachment(0, margin);
wlStepname.setLayoutData(fdlStepname);
wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wStepname);
wStepname.addModifyListener(lsMod);
fdStepname = new FormData();
fdStepname.left = new FormAttachment(middle, 0);
fdStepname.top = new FormAttachment(0, margin);
fdStepname.right = new FormAttachment(100, 0);
wStepname.setLayoutData(fdStepname);
Control lastControl = wStepname;
// split into tabs for better overview, later on:
// wTabFolder = new CTabFolder(shell, SWT.BORDER);
// props.setLook(wTabFolder, Props.WIDGET_STYLE_TAB);
//
//
// addFilesTab();
// addContentTab();
// addAdditionalFieldsTab();
//
// fdTabFolder = new FormData();
// fdTabFolder.left = new FormAttachment(0, 0);
// fdTabFolder.top = new FormAttachment(wStepname, margin);
// fdTabFolder.right = new FormAttachment(100, 0);
// fdTabFolder.bottom= new FormAttachment(100, -50);
// wTabFolder.setLayoutData(fdTabFolder);
// See if the step receives input. If so, we don't ask for the filename, but
// for the filename field.
//
isReceivingInput = transMeta.findNrPrevSteps(stepMeta) > 0;
if (isReceivingInput) {
RowMetaInterface previousFields;
try {
previousFields = transMeta.getPrevStepFields(stepMeta);
} catch (KettleStepException e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "XMLInputStreamDialog.ErrorDialog.UnableToGetInputFields.Title"), BaseMessages.getString(PKG, "XMLInputStreamDialog.ErrorDialog.UnableToGetInputFields.Message"), e);
previousFields = new RowMeta();
}
// The field itself...
//
Label wlFilename = new Label(shell, SWT.RIGHT);
wlFilename.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Filename.Label"));
props.setLook(wlFilename);
FormData fdlFilename = new FormData();
fdlFilename.top = new FormAttachment(lastControl, margin);
fdlFilename.left = new FormAttachment(0, 0);
fdlFilename.right = new FormAttachment(middle, -margin);
wlFilename.setLayoutData(fdlFilename);
wFilenameCombo = new CCombo(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
wFilenameCombo.setItems(previousFields.getFieldNames());
props.setLook(wFilenameCombo);
wFilenameCombo.addModifyListener(lsMod);
FormData fdFilename = new FormData();
fdFilename.top = new FormAttachment(lastControl, margin);
fdFilename.left = new FormAttachment(middle, 0);
fdFilename.right = new FormAttachment(100, -margin);
wFilenameCombo.setLayoutData(fdFilename);
lastControl = wFilenameCombo;
} else {
// Filename...
//
// The filename browse button
//
wbbFilename = new Button(shell, SWT.PUSH | SWT.CENTER);
props.setLook(wbbFilename);
wbbFilename.setText(BaseMessages.getString(PKG, "System.Button.Browse"));
wbbFilename.setToolTipText(BaseMessages.getString(PKG, "System.Tooltip.BrowseForFileOrDirAndAdd"));
FormData fdbFilename = new FormData();
fdbFilename.top = new FormAttachment(lastControl, margin);
fdbFilename.right = new FormAttachment(100, 0);
wbbFilename.setLayoutData(fdbFilename);
// The field itself...
//
Label wlFilename = new Label(shell, SWT.RIGHT);
wlFilename.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Filename.Label"));
props.setLook(wlFilename);
FormData fdlFilename = new FormData();
fdlFilename.top = new FormAttachment(lastControl, margin);
fdlFilename.left = new FormAttachment(0, 0);
fdlFilename.right = new FormAttachment(middle, -margin);
wlFilename.setLayoutData(fdlFilename);
wFilename = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wFilename);
wFilename.addModifyListener(lsMod);
FormData fdFilename = new FormData();
fdFilename.top = new FormAttachment(lastControl, margin);
fdFilename.left = new FormAttachment(middle, 0);
fdFilename.right = new FormAttachment(wbbFilename, -margin);
wFilename.setLayoutData(fdFilename);
lastControl = wFilename;
}
// data from previous step
Label lblAcceptingFilenames = new Label(shell, SWT.RIGHT);
lblAcceptingFilenames.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.SourceStreamField.Label"));
props.setLook(lblAcceptingFilenames);
FormData fdlAcceptingFilenames = new FormData();
fdlAcceptingFilenames.left = new FormAttachment(0, 0);
fdlAcceptingFilenames.top = new FormAttachment(lastControl, margin);
fdlAcceptingFilenames.right = new FormAttachment(middle, -margin);
lblAcceptingFilenames.setLayoutData(fdlAcceptingFilenames);
cbFromSource = new Button(shell, SWT.CHECK);
props.setLook(cbFromSource);
fdlAcceptingFilenames = new FormData();
fdlAcceptingFilenames.left = new FormAttachment(middle, 0);
fdlAcceptingFilenames.top = new FormAttachment(lastControl, margin);
cbFromSource.setLayoutData(fdlAcceptingFilenames);
lastControl = cbFromSource;
// field name
Label lblAcceptingField = new Label(shell, SWT.RIGHT);
lblAcceptingField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.SourceField.Label"));
props.setLook(lblAcceptingField);
FormData fdlAcceptingField = new FormData();
fdlAcceptingField = new FormData();
fdlAcceptingField.left = new FormAttachment(0, 0);
fdlAcceptingField.top = new FormAttachment(lastControl, margin);
fdlAcceptingField.right = new FormAttachment(middle, -margin);
lblAcceptingField.setLayoutData(fdlAcceptingField);
cbSourceField = new CCombo(shell, SWT.BORDER | SWT.READ_ONLY);
props.setLook(cbSourceField);
cbSourceField.addModifyListener(lsMod);
fdlAcceptingField = new FormData();
fdlAcceptingField = new FormData();
fdlAcceptingField.left = new FormAttachment(middle, 0);
fdlAcceptingField.top = new FormAttachment(lastControl, margin);
fdlAcceptingField.right = new FormAttachment(100, 0);
cbSourceField.setLayoutData(fdlAcceptingField);
lastControl = cbSourceField;
setSourceStreamField();
// add filename to result?
//
Label wlAddResult = new Label(shell, SWT.RIGHT);
wlAddResult.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.AddResult.Label"));
props.setLook(wlAddResult);
FormData fdlAddResult = new FormData();
fdlAddResult.left = new FormAttachment(0, 0);
fdlAddResult.top = new FormAttachment(lastControl, margin);
fdlAddResult.right = new FormAttachment(middle, -margin);
wlAddResult.setLayoutData(fdlAddResult);
wAddResult = new Button(shell, SWT.CHECK);
props.setLook(wAddResult);
wAddResult.setToolTipText(BaseMessages.getString(PKG, "XMLInputStreamDialog.AddResult.Tooltip"));
FormData fdAddResult = new FormData();
fdAddResult.left = new FormAttachment(middle, 0);
fdAddResult.top = new FormAttachment(lastControl, margin);
wAddResult.setLayoutData(fdAddResult);
lastControl = wAddResult;
// RowsToSkip line
//
Label wlRowsToSkip = new Label(shell, SWT.RIGHT);
wlRowsToSkip.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.RowsToSkip.Label"));
props.setLook(wlRowsToSkip);
FormData fdlRowsToSkip = new FormData();
fdlRowsToSkip = new FormData();
fdlRowsToSkip.left = new FormAttachment(0, 0);
fdlRowsToSkip.top = new FormAttachment(lastControl, margin);
fdlRowsToSkip.right = new FormAttachment(middle, -margin);
wlRowsToSkip.setLayoutData(fdlRowsToSkip);
wRowsToSkip = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wRowsToSkip);
wRowsToSkip.addModifyListener(lsMod);
FormData fdRowsToSkip = new FormData();
fdRowsToSkip = new FormData();
fdRowsToSkip.left = new FormAttachment(middle, 0);
fdRowsToSkip.top = new FormAttachment(lastControl, margin);
fdRowsToSkip.right = new FormAttachment(100, 0);
wRowsToSkip.setLayoutData(fdRowsToSkip);
lastControl = wRowsToSkip;
// Limit line
//
Label wlLimit = new Label(shell, SWT.RIGHT);
wlLimit.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Limit.Label"));
props.setLook(wlLimit);
FormData fdlLimit = new FormData();
fdlLimit = new FormData();
fdlLimit.left = new FormAttachment(0, 0);
fdlLimit.top = new FormAttachment(lastControl, margin);
fdlLimit.right = new FormAttachment(middle, -margin);
wlLimit.setLayoutData(fdlLimit);
wLimit = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wLimit);
wLimit.addModifyListener(lsMod);
FormData fdLimit = new FormData();
fdLimit = new FormData();
fdLimit.left = new FormAttachment(middle, 0);
fdLimit.top = new FormAttachment(lastControl, margin);
fdLimit.right = new FormAttachment(100, 0);
wLimit.setLayoutData(fdLimit);
lastControl = wLimit;
// DefaultStringLen line
//
Label wlDefaultStringLen = new Label(shell, SWT.RIGHT);
wlDefaultStringLen.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.DefaultStringLen.Label"));
props.setLook(wlDefaultStringLen);
FormData fdlDefaultStringLen = new FormData();
fdlDefaultStringLen = new FormData();
fdlDefaultStringLen.left = new FormAttachment(0, 0);
fdlDefaultStringLen.top = new FormAttachment(lastControl, margin);
fdlDefaultStringLen.right = new FormAttachment(middle, -margin);
wlDefaultStringLen.setLayoutData(fdlDefaultStringLen);
wDefaultStringLen = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wDefaultStringLen);
wDefaultStringLen.addModifyListener(lsMod);
FormData fdDefaultStringLen = new FormData();
fdDefaultStringLen = new FormData();
fdDefaultStringLen.left = new FormAttachment(middle, 0);
fdDefaultStringLen.top = new FormAttachment(lastControl, margin);
fdDefaultStringLen.right = new FormAttachment(100, 0);
wDefaultStringLen.setLayoutData(fdDefaultStringLen);
lastControl = wDefaultStringLen;
// Encoding line
//
Label wlEncoding = new Label(shell, SWT.RIGHT);
wlEncoding.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Encoding.Label"));
props.setLook(wlEncoding);
FormData fdlEncoding = new FormData();
fdlEncoding = new FormData();
fdlEncoding.left = new FormAttachment(0, 0);
fdlEncoding.top = new FormAttachment(lastControl, margin);
fdlEncoding.right = new FormAttachment(middle, -margin);
wlEncoding.setLayoutData(fdlEncoding);
wEncoding = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wEncoding);
wEncoding.addModifyListener(lsMod);
FormData fdEncoding = new FormData();
fdEncoding = new FormData();
fdEncoding.left = new FormAttachment(middle, 0);
fdEncoding.top = new FormAttachment(lastControl, margin);
fdEncoding.right = new FormAttachment(100, 0);
wEncoding.setLayoutData(fdEncoding);
lastControl = wEncoding;
// EnableNamespaces?
//
Label wlEnableNamespaces = new Label(shell, SWT.RIGHT);
wlEnableNamespaces.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.EnableNamespaces.Label"));
props.setLook(wlEnableNamespaces);
FormData fdlEnableNamespaces = new FormData();
fdlEnableNamespaces.left = new FormAttachment(0, 0);
fdlEnableNamespaces.top = new FormAttachment(lastControl, margin);
fdlEnableNamespaces.right = new FormAttachment(middle, -margin);
wlEnableNamespaces.setLayoutData(fdlEnableNamespaces);
wEnableNamespaces = new Button(shell, SWT.CHECK);
props.setLook(wEnableNamespaces);
wEnableNamespaces.setToolTipText(BaseMessages.getString(PKG, "XMLInputStreamDialog.EnableNamespaces.Tooltip"));
FormData fdEnableNamespaces = new FormData();
fdEnableNamespaces.left = new FormAttachment(middle, 0);
fdEnableNamespaces.top = new FormAttachment(lastControl, margin);
wEnableNamespaces.setLayoutData(fdEnableNamespaces);
lastControl = wEnableNamespaces;
// EnableTrim?
//
Label wlEnableTrim = new Label(shell, SWT.RIGHT);
wlEnableTrim.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.EnableTrim.Label"));
props.setLook(wlEnableTrim);
FormData fdlEnableTrim = new FormData();
fdlEnableTrim.left = new FormAttachment(0, 0);
fdlEnableTrim.top = new FormAttachment(lastControl, margin);
fdlEnableTrim.right = new FormAttachment(middle, -margin);
wlEnableTrim.setLayoutData(fdlEnableTrim);
wEnableTrim = new Button(shell, SWT.CHECK);
props.setLook(wEnableTrim);
wEnableTrim.setToolTipText(BaseMessages.getString(PKG, "XMLInputStreamDialog.EnableTrim.Tooltip"));
FormData fdEnableTrim = new FormData();
fdEnableTrim.left = new FormAttachment(middle, 0);
fdEnableTrim.top = new FormAttachment(lastControl, margin);
wEnableTrim.setLayoutData(fdEnableTrim);
lastControl = wEnableTrim;
// IncludeFilename?
//
Label wlIncludeFilename = new Label(shell, SWT.RIGHT);
wlIncludeFilename.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeFilename.Label"));
props.setLook(wlIncludeFilename);
FormData fdlIncludeFilename = new FormData();
fdlIncludeFilename.top = new FormAttachment(lastControl, margin);
fdlIncludeFilename.left = new FormAttachment(0, 0);
fdlIncludeFilename.right = new FormAttachment(middle, -margin);
wlIncludeFilename.setLayoutData(fdlIncludeFilename);
wIncludeFilename = new Button(shell, SWT.CHECK);
props.setLook(wIncludeFilename);
FormData fdIncludeFilename = new FormData();
fdIncludeFilename.top = new FormAttachment(lastControl, margin);
fdIncludeFilename.left = new FormAttachment(middle, 0);
wIncludeFilename.setLayoutData(fdIncludeFilename);
// FilenameField line
//
Label wlFilenameField = new Label(shell, SWT.RIGHT);
wlFilenameField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlFilenameField);
FormData fdlFilenameField = new FormData();
fdlFilenameField = new FormData();
fdlFilenameField.top = new FormAttachment(lastControl, margin);
fdlFilenameField.left = new FormAttachment(wIncludeFilename, margin);
wlFilenameField.setLayoutData(fdlFilenameField);
wFilenameField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wFilenameField);
wFilenameField.addModifyListener(lsMod);
FormData fdFilenameField = new FormData();
fdFilenameField = new FormData();
fdFilenameField.top = new FormAttachment(lastControl, margin);
fdFilenameField.left = new FormAttachment(wlFilenameField, margin);
fdFilenameField.right = new FormAttachment(100, 0);
wFilenameField.setLayoutData(fdFilenameField);
lastControl = wFilenameField;
// IncludeRowNumber?
//
Label wlIncludeRowNumber = new Label(shell, SWT.RIGHT);
wlIncludeRowNumber.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeRowNumber.Label"));
props.setLook(wlIncludeRowNumber);
FormData fdlIncludeRowNumber = new FormData();
fdlIncludeRowNumber.top = new FormAttachment(lastControl, margin);
fdlIncludeRowNumber.left = new FormAttachment(0, 0);
fdlIncludeRowNumber.right = new FormAttachment(middle, -margin);
wlIncludeRowNumber.setLayoutData(fdlIncludeRowNumber);
wIncludeRowNumber = new Button(shell, SWT.CHECK);
props.setLook(wIncludeRowNumber);
FormData fdIncludeRowNumber = new FormData();
fdIncludeRowNumber.top = new FormAttachment(lastControl, margin);
fdIncludeRowNumber.left = new FormAttachment(middle, 0);
wIncludeRowNumber.setLayoutData(fdIncludeRowNumber);
// RowNumberField line
//
Label wlRowNumberField = new Label(shell, SWT.RIGHT);
wlRowNumberField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlRowNumberField);
FormData fdlRowNumberField = new FormData();
fdlRowNumberField = new FormData();
fdlRowNumberField.top = new FormAttachment(lastControl, margin);
fdlRowNumberField.left = new FormAttachment(wIncludeRowNumber, margin);
wlRowNumberField.setLayoutData(fdlRowNumberField);
wRowNumberField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wRowNumberField);
wRowNumberField.addModifyListener(lsMod);
FormData fdRowNumberField = new FormData();
fdRowNumberField = new FormData();
fdRowNumberField.top = new FormAttachment(lastControl, margin);
fdRowNumberField.left = new FormAttachment(wlRowNumberField, margin);
fdRowNumberField.right = new FormAttachment(100, 0);
wRowNumberField.setLayoutData(fdRowNumberField);
lastControl = wRowNumberField;
// IncludeXmlDataTypeNumeric?
//
Label wlIncludeXmlDataTypeNumeric = new Label(shell, SWT.RIGHT);
wlIncludeXmlDataTypeNumeric.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlDataTypeNumeric.Label"));
props.setLook(wlIncludeXmlDataTypeNumeric);
FormData fdlIncludeXmlDataTypeNumeric = new FormData();
fdlIncludeXmlDataTypeNumeric.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlDataTypeNumeric.left = new FormAttachment(0, 0);
fdlIncludeXmlDataTypeNumeric.right = new FormAttachment(middle, -margin);
wlIncludeXmlDataTypeNumeric.setLayoutData(fdlIncludeXmlDataTypeNumeric);
wIncludeXmlDataTypeNumeric = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlDataTypeNumeric);
FormData fdIncludeXmlDataTypeNumeric = new FormData();
fdIncludeXmlDataTypeNumeric.top = new FormAttachment(lastControl, margin);
fdIncludeXmlDataTypeNumeric.left = new FormAttachment(middle, 0);
wIncludeXmlDataTypeNumeric.setLayoutData(fdIncludeXmlDataTypeNumeric);
// XmlDataTypeNumericField line
//
Label wlXmlDataTypeNumericField = new Label(shell, SWT.RIGHT);
wlXmlDataTypeNumericField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlDataTypeNumericField);
FormData fdlXmlDataTypeNumericField = new FormData();
fdlXmlDataTypeNumericField = new FormData();
fdlXmlDataTypeNumericField.top = new FormAttachment(lastControl, margin);
fdlXmlDataTypeNumericField.left = new FormAttachment(wIncludeXmlDataTypeNumeric, margin);
wlXmlDataTypeNumericField.setLayoutData(fdlXmlDataTypeNumericField);
wXmlDataTypeNumericField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlDataTypeNumericField);
wXmlDataTypeNumericField.addModifyListener(lsMod);
FormData fdXmlDataTypeNumericField = new FormData();
fdXmlDataTypeNumericField = new FormData();
fdXmlDataTypeNumericField.top = new FormAttachment(lastControl, margin);
fdXmlDataTypeNumericField.left = new FormAttachment(wlXmlDataTypeNumericField, margin);
fdXmlDataTypeNumericField.right = new FormAttachment(100, 0);
wXmlDataTypeNumericField.setLayoutData(fdXmlDataTypeNumericField);
lastControl = wXmlDataTypeNumericField;
// IncludeXmlDataTypeDescription?
//
Label wlIncludeXmlDataTypeDescription = new Label(shell, SWT.RIGHT);
wlIncludeXmlDataTypeDescription.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlDataTypeDescription.Label"));
props.setLook(wlIncludeXmlDataTypeDescription);
FormData fdlIncludeXmlDataTypeDescription = new FormData();
fdlIncludeXmlDataTypeDescription.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlDataTypeDescription.left = new FormAttachment(0, 0);
fdlIncludeXmlDataTypeDescription.right = new FormAttachment(middle, -margin);
wlIncludeXmlDataTypeDescription.setLayoutData(fdlIncludeXmlDataTypeDescription);
wIncludeXmlDataTypeDescription = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlDataTypeDescription);
FormData fdIncludeXmlDataTypeDescription = new FormData();
fdIncludeXmlDataTypeDescription.top = new FormAttachment(lastControl, margin);
fdIncludeXmlDataTypeDescription.left = new FormAttachment(middle, 0);
wIncludeXmlDataTypeDescription.setLayoutData(fdIncludeXmlDataTypeDescription);
// XmlDataTypeDescriptionField line
//
Label wlXmlDataTypeDescriptionField = new Label(shell, SWT.RIGHT);
wlXmlDataTypeDescriptionField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlDataTypeDescriptionField);
FormData fdlXmlDataTypeDescriptionField = new FormData();
fdlXmlDataTypeDescriptionField = new FormData();
fdlXmlDataTypeDescriptionField.top = new FormAttachment(lastControl, margin);
fdlXmlDataTypeDescriptionField.left = new FormAttachment(wIncludeXmlDataTypeDescription, margin);
wlXmlDataTypeDescriptionField.setLayoutData(fdlXmlDataTypeDescriptionField);
wXmlDataTypeDescriptionField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlDataTypeDescriptionField);
wXmlDataTypeDescriptionField.addModifyListener(lsMod);
FormData fdXmlDataTypeDescriptionField = new FormData();
fdXmlDataTypeDescriptionField = new FormData();
fdXmlDataTypeDescriptionField.top = new FormAttachment(lastControl, margin);
fdXmlDataTypeDescriptionField.left = new FormAttachment(wlXmlDataTypeDescriptionField, margin);
fdXmlDataTypeDescriptionField.right = new FormAttachment(100, 0);
wXmlDataTypeDescriptionField.setLayoutData(fdXmlDataTypeDescriptionField);
lastControl = wXmlDataTypeDescriptionField;
// IncludeXmlLocationLine?
//
Label wlIncludeXmlLocationLine = new Label(shell, SWT.RIGHT);
wlIncludeXmlLocationLine.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlLocationLine.Label"));
props.setLook(wlIncludeXmlLocationLine);
FormData fdlIncludeXmlLocationLine = new FormData();
fdlIncludeXmlLocationLine.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlLocationLine.left = new FormAttachment(0, 0);
fdlIncludeXmlLocationLine.right = new FormAttachment(middle, -margin);
wlIncludeXmlLocationLine.setLayoutData(fdlIncludeXmlLocationLine);
wIncludeXmlLocationLine = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlLocationLine);
FormData fdIncludeXmlLocationLine = new FormData();
fdIncludeXmlLocationLine.top = new FormAttachment(lastControl, margin);
fdIncludeXmlLocationLine.left = new FormAttachment(middle, 0);
wIncludeXmlLocationLine.setLayoutData(fdIncludeXmlLocationLine);
// XmlLocationLineField line
//
Label wlXmlLocationLineField = new Label(shell, SWT.RIGHT);
wlXmlLocationLineField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlLocationLineField);
FormData fdlXmlLocationLineField = new FormData();
fdlXmlLocationLineField = new FormData();
fdlXmlLocationLineField.top = new FormAttachment(lastControl, margin);
fdlXmlLocationLineField.left = new FormAttachment(wIncludeXmlLocationLine, margin);
wlXmlLocationLineField.setLayoutData(fdlXmlLocationLineField);
wXmlLocationLineField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlLocationLineField);
wXmlLocationLineField.addModifyListener(lsMod);
FormData fdXmlLocationLineField = new FormData();
fdXmlLocationLineField = new FormData();
fdXmlLocationLineField.top = new FormAttachment(lastControl, margin);
fdXmlLocationLineField.left = new FormAttachment(wlXmlLocationLineField, margin);
fdXmlLocationLineField.right = new FormAttachment(100, 0);
wXmlLocationLineField.setLayoutData(fdXmlLocationLineField);
lastControl = wXmlLocationLineField;
// IncludeXmlLocationColumn?
//
Label wlIncludeXmlLocationColumn = new Label(shell, SWT.RIGHT);
wlIncludeXmlLocationColumn.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlLocationColumn.Label"));
props.setLook(wlIncludeXmlLocationColumn);
FormData fdlIncludeXmlLocationColumn = new FormData();
fdlIncludeXmlLocationColumn.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlLocationColumn.left = new FormAttachment(0, 0);
fdlIncludeXmlLocationColumn.right = new FormAttachment(middle, -margin);
wlIncludeXmlLocationColumn.setLayoutData(fdlIncludeXmlLocationColumn);
wIncludeXmlLocationColumn = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlLocationColumn);
FormData fdIncludeXmlLocationColumn = new FormData();
fdIncludeXmlLocationColumn.top = new FormAttachment(lastControl, margin);
fdIncludeXmlLocationColumn.left = new FormAttachment(middle, 0);
wIncludeXmlLocationColumn.setLayoutData(fdIncludeXmlLocationColumn);
// XmlLocationColumnField line
//
Label wlXmlLocationColumnField = new Label(shell, SWT.RIGHT);
wlXmlLocationColumnField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlLocationColumnField);
FormData fdlXmlLocationColumnField = new FormData();
fdlXmlLocationColumnField = new FormData();
fdlXmlLocationColumnField.top = new FormAttachment(lastControl, margin);
fdlXmlLocationColumnField.left = new FormAttachment(wIncludeXmlLocationColumn, margin);
wlXmlLocationColumnField.setLayoutData(fdlXmlLocationColumnField);
wXmlLocationColumnField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlLocationColumnField);
wXmlLocationColumnField.addModifyListener(lsMod);
FormData fdXmlLocationColumnField = new FormData();
fdXmlLocationColumnField = new FormData();
fdXmlLocationColumnField.top = new FormAttachment(lastControl, margin);
fdXmlLocationColumnField.left = new FormAttachment(wlXmlLocationColumnField, margin);
fdXmlLocationColumnField.right = new FormAttachment(100, 0);
wXmlLocationColumnField.setLayoutData(fdXmlLocationColumnField);
lastControl = wXmlLocationColumnField;
// IncludeXmlElementID?
//
Label wlIncludeXmlElementID = new Label(shell, SWT.RIGHT);
wlIncludeXmlElementID.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlElementID.Label"));
props.setLook(wlIncludeXmlElementID);
FormData fdlIncludeXmlElementID = new FormData();
fdlIncludeXmlElementID.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlElementID.left = new FormAttachment(0, 0);
fdlIncludeXmlElementID.right = new FormAttachment(middle, -margin);
wlIncludeXmlElementID.setLayoutData(fdlIncludeXmlElementID);
wIncludeXmlElementID = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlElementID);
FormData fdIncludeXmlElementID = new FormData();
fdIncludeXmlElementID.top = new FormAttachment(lastControl, margin);
fdIncludeXmlElementID.left = new FormAttachment(middle, 0);
wIncludeXmlElementID.setLayoutData(fdIncludeXmlElementID);
// XmlElementIDField line
//
Label wlXmlElementIDField = new Label(shell, SWT.RIGHT);
wlXmlElementIDField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlElementIDField);
FormData fdlXmlElementIDField = new FormData();
fdlXmlElementIDField = new FormData();
fdlXmlElementIDField.top = new FormAttachment(lastControl, margin);
fdlXmlElementIDField.left = new FormAttachment(wIncludeXmlElementID, margin);
wlXmlElementIDField.setLayoutData(fdlXmlElementIDField);
wXmlElementIDField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlElementIDField);
wXmlElementIDField.addModifyListener(lsMod);
FormData fdXmlElementIDField = new FormData();
fdXmlElementIDField = new FormData();
fdXmlElementIDField.top = new FormAttachment(lastControl, margin);
fdXmlElementIDField.left = new FormAttachment(wlXmlElementIDField, margin);
fdXmlElementIDField.right = new FormAttachment(100, 0);
wXmlElementIDField.setLayoutData(fdXmlElementIDField);
lastControl = wXmlElementIDField;
// IncludeXmlParentElementID?
//
Label wlIncludeXmlParentElementID = new Label(shell, SWT.RIGHT);
wlIncludeXmlParentElementID.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlParentElementID.Label"));
props.setLook(wlIncludeXmlParentElementID);
FormData fdlIncludeXmlParentElementID = new FormData();
fdlIncludeXmlParentElementID.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlParentElementID.left = new FormAttachment(0, 0);
fdlIncludeXmlParentElementID.right = new FormAttachment(middle, -margin);
wlIncludeXmlParentElementID.setLayoutData(fdlIncludeXmlParentElementID);
wIncludeXmlParentElementID = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlParentElementID);
FormData fdIncludeXmlParentElementID = new FormData();
fdIncludeXmlParentElementID.top = new FormAttachment(lastControl, margin);
fdIncludeXmlParentElementID.left = new FormAttachment(middle, 0);
wIncludeXmlParentElementID.setLayoutData(fdIncludeXmlParentElementID);
// XmlParentElementIDField line
//
Label wlXmlParentElementIDField = new Label(shell, SWT.RIGHT);
wlXmlParentElementIDField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlParentElementIDField);
FormData fdlXmlParentElementIDField = new FormData();
fdlXmlParentElementIDField = new FormData();
fdlXmlParentElementIDField.top = new FormAttachment(lastControl, margin);
fdlXmlParentElementIDField.left = new FormAttachment(wIncludeXmlParentElementID, margin);
wlXmlParentElementIDField.setLayoutData(fdlXmlParentElementIDField);
wXmlParentElementIDField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlParentElementIDField);
wXmlParentElementIDField.addModifyListener(lsMod);
FormData fdXmlParentElementIDField = new FormData();
fdXmlParentElementIDField = new FormData();
fdXmlParentElementIDField.top = new FormAttachment(lastControl, margin);
fdXmlParentElementIDField.left = new FormAttachment(wlXmlParentElementIDField, margin);
fdXmlParentElementIDField.right = new FormAttachment(100, 0);
wXmlParentElementIDField.setLayoutData(fdXmlParentElementIDField);
lastControl = wXmlParentElementIDField;
// IncludeXmlElementLevel?
//
Label wlIncludeXmlElementLevel = new Label(shell, SWT.RIGHT);
wlIncludeXmlElementLevel.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlElementLevel.Label"));
props.setLook(wlIncludeXmlElementLevel);
FormData fdlIncludeXmlElementLevel = new FormData();
fdlIncludeXmlElementLevel.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlElementLevel.left = new FormAttachment(0, 0);
fdlIncludeXmlElementLevel.right = new FormAttachment(middle, -margin);
wlIncludeXmlElementLevel.setLayoutData(fdlIncludeXmlElementLevel);
wIncludeXmlElementLevel = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlElementLevel);
FormData fdIncludeXmlElementLevel = new FormData();
fdIncludeXmlElementLevel.top = new FormAttachment(lastControl, margin);
fdIncludeXmlElementLevel.left = new FormAttachment(middle, 0);
wIncludeXmlElementLevel.setLayoutData(fdIncludeXmlElementLevel);
// XmlElementLevelField line
//
Label wlXmlElementLevelField = new Label(shell, SWT.RIGHT);
wlXmlElementLevelField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlElementLevelField);
FormData fdlXmlElementLevelField = new FormData();
fdlXmlElementLevelField = new FormData();
fdlXmlElementLevelField.top = new FormAttachment(lastControl, margin);
fdlXmlElementLevelField.left = new FormAttachment(wIncludeXmlElementLevel, margin);
wlXmlElementLevelField.setLayoutData(fdlXmlElementLevelField);
wXmlElementLevelField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlElementLevelField);
wXmlElementLevelField.addModifyListener(lsMod);
FormData fdXmlElementLevelField = new FormData();
fdXmlElementLevelField = new FormData();
fdXmlElementLevelField.top = new FormAttachment(lastControl, margin);
fdXmlElementLevelField.left = new FormAttachment(wlXmlElementLevelField, margin);
fdXmlElementLevelField.right = new FormAttachment(100, 0);
wXmlElementLevelField.setLayoutData(fdXmlElementLevelField);
lastControl = wXmlElementLevelField;
// IncludeXmlPath?
//
Label wlIncludeXmlPath = new Label(shell, SWT.RIGHT);
wlIncludeXmlPath.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlPath.Label"));
props.setLook(wlIncludeXmlPath);
FormData fdlIncludeXmlPath = new FormData();
fdlIncludeXmlPath.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlPath.left = new FormAttachment(0, 0);
fdlIncludeXmlPath.right = new FormAttachment(middle, -margin);
wlIncludeXmlPath.setLayoutData(fdlIncludeXmlPath);
wIncludeXmlPath = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlPath);
FormData fdIncludeXmlPath = new FormData();
fdIncludeXmlPath.top = new FormAttachment(lastControl, margin);
fdIncludeXmlPath.left = new FormAttachment(middle, 0);
wIncludeXmlPath.setLayoutData(fdIncludeXmlPath);
// XmlPathField line
//
Label wlXmlPathField = new Label(shell, SWT.RIGHT);
wlXmlPathField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlPathField);
FormData fdlXmlPathField = new FormData();
fdlXmlPathField = new FormData();
fdlXmlPathField.top = new FormAttachment(lastControl, margin);
fdlXmlPathField.left = new FormAttachment(wIncludeXmlPath, margin);
wlXmlPathField.setLayoutData(fdlXmlPathField);
wXmlPathField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlPathField);
wXmlPathField.addModifyListener(lsMod);
FormData fdXmlPathField = new FormData();
fdXmlPathField = new FormData();
fdXmlPathField.top = new FormAttachment(lastControl, margin);
fdXmlPathField.left = new FormAttachment(wlXmlPathField, margin);
fdXmlPathField.right = new FormAttachment(100, 0);
wXmlPathField.setLayoutData(fdXmlPathField);
lastControl = wXmlPathField;
// IncludeXmlParentPath?
//
Label wlIncludeXmlParentPath = new Label(shell, SWT.RIGHT);
wlIncludeXmlParentPath.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlParentPath.Label"));
props.setLook(wlIncludeXmlParentPath);
FormData fdlIncludeXmlParentPath = new FormData();
fdlIncludeXmlParentPath.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlParentPath.left = new FormAttachment(0, 0);
fdlIncludeXmlParentPath.right = new FormAttachment(middle, -margin);
wlIncludeXmlParentPath.setLayoutData(fdlIncludeXmlParentPath);
wIncludeXmlParentPath = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlParentPath);
FormData fdIncludeXmlParentPath = new FormData();
fdIncludeXmlParentPath.top = new FormAttachment(lastControl, margin);
fdIncludeXmlParentPath.left = new FormAttachment(middle, 0);
wIncludeXmlParentPath.setLayoutData(fdIncludeXmlParentPath);
// XmlParentPathField line
//
Label wlXmlParentPathField = new Label(shell, SWT.RIGHT);
wlXmlParentPathField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlParentPathField);
FormData fdlXmlParentPathField = new FormData();
fdlXmlParentPathField = new FormData();
fdlXmlParentPathField.top = new FormAttachment(lastControl, margin);
fdlXmlParentPathField.left = new FormAttachment(wIncludeXmlParentPath, margin);
wlXmlParentPathField.setLayoutData(fdlXmlParentPathField);
wXmlParentPathField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlParentPathField);
wXmlParentPathField.addModifyListener(lsMod);
FormData fdXmlParentPathField = new FormData();
fdXmlParentPathField = new FormData();
fdXmlParentPathField.top = new FormAttachment(lastControl, margin);
fdXmlParentPathField.left = new FormAttachment(wlXmlParentPathField, margin);
fdXmlParentPathField.right = new FormAttachment(100, 0);
wXmlParentPathField.setLayoutData(fdXmlParentPathField);
lastControl = wXmlParentPathField;
// IncludeXmlDataName?
//
Label wlIncludeXmlDataName = new Label(shell, SWT.RIGHT);
wlIncludeXmlDataName.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlDataName.Label"));
props.setLook(wlIncludeXmlDataName);
FormData fdlIncludeXmlDataName = new FormData();
fdlIncludeXmlDataName.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlDataName.left = new FormAttachment(0, 0);
fdlIncludeXmlDataName.right = new FormAttachment(middle, -margin);
wlIncludeXmlDataName.setLayoutData(fdlIncludeXmlDataName);
wIncludeXmlDataName = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlDataName);
FormData fdIncludeXmlDataName = new FormData();
fdIncludeXmlDataName.top = new FormAttachment(lastControl, margin);
fdIncludeXmlDataName.left = new FormAttachment(middle, 0);
wIncludeXmlDataName.setLayoutData(fdIncludeXmlDataName);
// XmlDataNameField line
//
Label wlXmlDataNameField = new Label(shell, SWT.RIGHT);
wlXmlDataNameField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlDataNameField);
FormData fdlXmlDataNameField = new FormData();
fdlXmlDataNameField = new FormData();
fdlXmlDataNameField.top = new FormAttachment(lastControl, margin);
fdlXmlDataNameField.left = new FormAttachment(wIncludeXmlDataName, margin);
wlXmlDataNameField.setLayoutData(fdlXmlDataNameField);
wXmlDataNameField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlDataNameField);
wXmlDataNameField.addModifyListener(lsMod);
FormData fdXmlDataNameField = new FormData();
fdXmlDataNameField = new FormData();
fdXmlDataNameField.top = new FormAttachment(lastControl, margin);
fdXmlDataNameField.left = new FormAttachment(wlXmlDataNameField, margin);
fdXmlDataNameField.right = new FormAttachment(100, 0);
wXmlDataNameField.setLayoutData(fdXmlDataNameField);
lastControl = wXmlDataNameField;
// IncludeXmlDataValue?
//
Label wlIncludeXmlDataValue = new Label(shell, SWT.RIGHT);
wlIncludeXmlDataValue.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.IncludeXmlDataValue.Label"));
props.setLook(wlIncludeXmlDataValue);
FormData fdlIncludeXmlDataValue = new FormData();
fdlIncludeXmlDataValue.top = new FormAttachment(lastControl, margin);
fdlIncludeXmlDataValue.left = new FormAttachment(0, 0);
fdlIncludeXmlDataValue.right = new FormAttachment(middle, -margin);
wlIncludeXmlDataValue.setLayoutData(fdlIncludeXmlDataValue);
wIncludeXmlDataValue = new Button(shell, SWT.CHECK);
props.setLook(wIncludeXmlDataValue);
FormData fdIncludeXmlDataValue = new FormData();
fdIncludeXmlDataValue.top = new FormAttachment(lastControl, margin);
fdIncludeXmlDataValue.left = new FormAttachment(middle, 0);
wIncludeXmlDataValue.setLayoutData(fdIncludeXmlDataValue);
// XmlDataValueField line
//
Label wlXmlDataValueField = new Label(shell, SWT.RIGHT);
wlXmlDataValueField.setText(BaseMessages.getString(PKG, "XMLInputStreamDialog.Fieldname.Label"));
props.setLook(wlXmlDataValueField);
FormData fdlXmlDataValueField = new FormData();
fdlXmlDataValueField = new FormData();
fdlXmlDataValueField.top = new FormAttachment(lastControl, margin);
fdlXmlDataValueField.left = new FormAttachment(wIncludeXmlDataValue, margin);
wlXmlDataValueField.setLayoutData(fdlXmlDataValueField);
wXmlDataValueField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
props.setLook(wXmlDataValueField);
wXmlDataValueField.addModifyListener(lsMod);
FormData fdXmlDataValueField = new FormData();
fdXmlDataValueField = new FormData();
fdXmlDataValueField.top = new FormAttachment(lastControl, margin);
fdXmlDataValueField.left = new FormAttachment(wlXmlDataValueField, margin);
fdXmlDataValueField.right = new FormAttachment(100, 0);
wXmlDataValueField.setLayoutData(fdXmlDataValueField);
lastControl = wXmlDataValueField;
// Some buttons first, so that the dialog scales nicely...
//
wOK = new Button(shell, SWT.PUSH);
wOK.setText(BaseMessages.getString(PKG, "System.Button.OK"));
wPreview = new Button(shell, SWT.PUSH);
wPreview.setText(BaseMessages.getString(PKG, "System.Button.Preview"));
wCancel = new Button(shell, SWT.PUSH);
wCancel.setText(BaseMessages.getString(PKG, "System.Button.Cancel"));
setButtonPositions(new Button[] { wOK, wPreview, wCancel }, margin, lastControl);
// Add listeners
lsCancel = new Listener() {
@Override
public void handleEvent(Event e) {
cancel();
}
};
lsOK = new Listener() {
@Override
public void handleEvent(Event e) {
ok();
}
};
lsPreview = new Listener() {
@Override
public void handleEvent(Event e) {
preview();
}
};
wCancel.addListener(SWT.Selection, lsCancel);
wOK.addListener(SWT.Selection, lsOK);
wPreview.addListener(SWT.Selection, lsPreview);
lsDef = new SelectionAdapter() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
ok();
}
};
wStepname.addSelectionListener(lsDef);
if (isReceivingInput) {
wFilenameCombo.addSelectionListener(lsDef);
} else {
wFilename.addSelectionListener(lsDef);
// Listen to the browse button next to the file name
wbbFilename.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
FileDialog dialog = new FileDialog(shell, SWT.OPEN);
dialog.setFilterExtensions(new String[] { "*.xml;*.XML", "*" });
if (wFilename.getText() != null) {
String fname = transMeta.environmentSubstitute(wFilename.getText());
dialog.setFileName(fname);
}
dialog.setFilterNames(new String[] { BaseMessages.getString(PKG, "System.FileType.XMLFiles"), BaseMessages.getString(PKG, "System.FileType.AllFiles") });
if (dialog.open() != null) {
String str = dialog.getFilterPath() + System.getProperty("file.separator") + dialog.getFileName();
wFilename.setText(str);
}
}
});
}
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener(new ShellAdapter() {
@Override
public void shellClosed(ShellEvent e) {
cancel();
}
});
// Set the shell size, based upon previous time...
setSize();
getData();
inputMeta.setChanged(changed);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
return stepname;
}
use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.
the class TableView method getRowWithoutValues.
public RowMetaInterface getRowWithoutValues() {
RowMetaInterface f = new RowMeta();
f.addValueMeta(new ValueMetaInteger("#"));
for (int i = 0; i < columns.length; i++) {
f.addValueMeta(new ValueMetaString(columns[i].getName()));
}
return f;
}
use of org.pentaho.di.core.row.RowMeta in project pentaho-kettle by pentaho.
the class PrioritizeStreamsExecutionIT method getTestData.
private PrioritizeStreamsData getTestData(TestData code) {
PrioritizeStreamsData retData = new PrioritizeStreamsData();
RowSet in1 = new BlockingRowSet(4);
RowSet in2 = new BlockingRowSet(4);
RowSet in3 = new BlockingRowSet(4);
Object[][] data1 = { { "a" }, { "a" }, { "a" } };
Object[][] data2 = { { "b" }, { "b" }, { "b" } };
Object[][] data3 = { { "c" }, { "c" }, { "c" } };
RowMetaInterface rmi = new RowMeta();
Runnable stream1 = this.getInputProduser(in1, rmi, data1);
Runnable stream2 = this.getInputProduser(in2, rmi, data2);
Runnable stream3 = this.getInputProduser(in3, rmi, data3);
retData.outputRowMeta = rmi;
switch(code) {
case ABC:
{
retData.rowSets = new RowSet[] { in1, in2, in3 };
break;
}
case BAC:
{
retData.rowSets = new RowSet[] { in2, in1, in3 };
break;
}
case BCA:
{
retData.rowSets = new RowSet[] { in2, in3, in1 };
break;
}
case CAB:
{
retData.rowSets = new RowSet[] { in3, in1, in2 };
break;
}
case CBA:
{
retData.rowSets = new RowSet[] { in3, in2, in1 };
break;
}
default:
{
Assert.fail("This test data does not supported: " + code.toString());
}
}
retData.currentRowSet = retData.rowSets[0];
retData.stepnr = 0;
retData.stepnrs = 3;
service.execute(stream1);
service.execute(stream2);
service.execute(stream3);
return retData;
}
Aggregations