public void widgetSelected( SelectionEvent e ) { // Clear the validation rules for a certain field... // int index = wValidationsList.getSelectionIndex(); if ( index >= 0 ) { selectionList.remove( index ); selectedField = null; wValidationsList.remove( index ); enableFields(); if ( selectionList.size() > 0 ) { wValidationsList.select( selectionList.size() - 1 ); } } } } );
@Override public void mouseUp( MouseEvent mouseEvent ) { MappingIODefinition definition = new MappingIODefinition(); definition.setMainDataPath( true ); definitions.add( definition ); wInputList.add( tabTitle + ( definitions.size() > 1 ? String.valueOf( definitions.size() ) : "" ) ); wInputList.select( definitions.size() - 1 ); updateFields( definitions.get( wInputList.getSelectionIndex() ), input, wMainPath, wlInputStep, wInputStep, wbInputStep, wlOutputStep, wOutputStep, wbOutputStep, wlDescription, wDescription, wFieldMappings, wRenameOutput ); wlNoItems.setVisible( false ); wFieldsComposite.setVisible( true ); wRemoveButton.setEnabled( true ); } } );
public boolean canFlipToNextPage() { refreshFields(); if ( wFields.getItemCount() > 0 ) { wFields.select( 0 ); showInfo(); } return false; }
public boolean canFlipToNextPage() { refreshFields(); if ( wFields.getItemCount() > 0 ) { wFields.select( 0 ); showInfo(); } return false; }
public boolean canFlipToNextPage() { refreshFields(); if ( wFields.getItemCount() > 0 ) { wFields.select( 0 ); showInfo(); } return false; }
public void modifyText( ModifyEvent event ) { // See if there is a selected Validation // if ( wValidationsList != null && wValidationsList.getItemCount() > 0 && wValidationsList.getSelection().length == 1 ) { int index = wValidationsList.getSelectionIndex(); String description = wValidationsList.getItem( index ); Validation validation = Validation.findValidation( selectionList, description ); String newDescription = wDescription.getText(); validation.setName( newDescription ); wValidationsList.setItem( index, newDescription ); wValidationsList.select( index ); } } } );
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { wTypes.select( input.getFileType() ); if ( input.getFilenameField() != null ) { wFilenameField.setText( input.getFilenameField() ); } wStepname.selectAll(); wStepname.setFocus(); }
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { // Populate the list of validations... // refreshValidationsList(); enableFields(); wValidateAll.setSelection( input.isValidatingAll() ); wConcatErrors.setSelection( input.isConcatenatingErrors() ); wConcatSeparator.setText( Const.NVL( input.getConcatenationSeparator(), "" ) ); // Select the first available field... // if ( input.getValidations().size() > 0 ) { Validation validatorField = input.getValidations().get( 0 ); String description = validatorField.getName(); int index = wValidationsList.indexOf( description ); if ( index >= 0 ) { wValidationsList.select( index ); showSelectedValidatorField( description ); } } setFlags(); wStepname.selectAll(); wStepname.setFocus(); }
public void setAccessTypes() { if ( wDBType.getSelectionCount() < 1 ) { return; } int[] acc = DatabaseMeta.getAccessTypeList( wDBType.getSelection()[0] ); wAccType.removeAll(); for ( int i = 0; i < acc.length; i++ ) { wAccType.add( DatabaseMeta.getAccessTypeDescLong( acc[i] ) ); } // If nothing is selected: select the first item (mostly the native driver) if ( wAccType.getSelectionIndex() < 0 ) { wAccType.select( 0 ); } }
public void widgetSelected( SelectionEvent e ) { // Create a new validation rule page ... // EnterStringDialog enterStringDialog = new EnterStringDialog( shell, "", BaseMessages.getString( PKG, "ValidatorDialog.EnterValidationRuleName.Title" ), BaseMessages.getString( PKG, "ValidatorDialog.EnterValidationRuleName.Message" ) ); String description = enterStringDialog.open(); if ( description != null ) { if ( Validation.findValidation( selectionList, description ) != null ) { MessageBox messageBox = new MessageBox( shell, SWT.ICON_ERROR ); //CHECKSTYLE:LineLength:OFF messageBox.setText( BaseMessages.getString( PKG, "ValidatorDialog.ValidationRuleNameAlreadyExists.Title" ) ); messageBox.setMessage( BaseMessages.getString( PKG, "ValidatorDialog.ValidationRuleNameAlreadyExists.Message" ) ); messageBox.open(); return; } saveChanges(); Validation validation = new Validation(); validation.setName( description ); selectionList.add( validation ); selectedField = validation; refreshValidationsList(); wValidationsList.select( selectionList.size() - 1 ); getValidatorFieldData( validation ); } } } );
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { wInput.setText( Const.NVL( input.getInputFileField(), "" ) ); wOutput.setText( Const.NVL( input.getOutputFileField(), "" ) ); for ( String name : input.getParameterFieldMap().keySet() ) { String field = input.getParameterFieldMap().get( name ); TableItem item = new TableItem( wFields.table, SWT.NONE ); item.setText( 1, name ); item.setText( 2, field ); } wFields.removeEmptyRows(); wFields.setRowNums(); wFields.optWidth( true ); wProcessor.select( input.getOutputProcessorType().ordinal() ); wStepname.selectAll(); wStepname.setFocus(); wParentFolder.setSelection( input.getCreateParentfolder() ); }
wJobstatus.select( jobMeta.getJobstatus() - 1 ); wLogTypeList.select( 0 ); showJobLogTableOptions( (JobLogTable) logTables.get( 0 ) );
wSelection.select( 0 );
wInputList.select( 0 ); updateFields( definitions.get( 0 ), input, wMainPath, wlInputStep, wInputStep, wbInputStep, wlOutputStep, wOutputStep, wbOutputStep, wlDescription, wDescription, wFieldMappings,
wSelection.select( selectedNrs ); wSelection.showSelection();