/** * @return */ public NamedCluster getSelectedNamedCluster() { return namedClusterWidget.getSelectedNamedCluster(); }
private void editNamedCluster() { Spoon spoon = Spoon.getInstance(); AbstractMeta meta = (AbstractMeta) spoon.getActiveMeta(); if ( meta != null ) { List<NamedCluster> namedClusters = null; try { namedClusters = namedClusterService.list( spoon.getMetaStore() ); } catch ( MetaStoreException e ) { //Ignore } int index = getNameClusterCombo().getSelectionIndex(); if ( index > -1 && namedClusters != null && namedClusters.size() > 0 ) { ncDelegate.editNamedCluster( spoon.getMetaStore(), namedClusters .get( index ), getShell() ); initiate(); } } }
@Override public NamedClusterWidget createNamedClusterWidget( Composite parent, boolean showLabel ) { return new NamedClusterWidgetBridgedImpl( new NamedClusterWidgetImpl( parent, showLabel, namedClusterService, runtimeTestActionService, runtimeTester ) ); }
namedClusterLabel.setLayoutData( fd ); namedClusterWidgetImpl = new NamedClusterWidgetImpl( shell, false, namedClusterService, runtimeTestActionService, runtimeTester ); namedClusterWidgetImpl.initiate(); props.setLook( namedClusterWidgetImpl ); fd = new FormData(); fd.top = new FormAttachment( m_wName, margin ); fd.left = new FormAttachment( middle, 0 ); namedClusterWidgetImpl.setLayoutData( fd );
wFileComp.setLayout( fileLayout ); namedClusterWidget = new NamedClusterWidgetImpl( wFileComp, true, namedClusterService, runtimeTestActionService, runtimeTester ); namedClusterWidget.initiate(); props.setLook( namedClusterWidget ); FormData fd = new FormData(); fd.top = new FormAttachment( 0, 0 ); fd.left = new FormAttachment( 0, 235 ); namedClusterWidget.setLayoutData( fd ); namedClusterWidget.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent evt ) { String ncName = ( (Combo) evt.getSource() ).getText();
BaseMessages.getString( BASE_PKG, "System.FileType.AllFiles" ) }; NamedCluster namedCluster = namedClusterWidget.getSelectedNamedCluster(); if ( namedCluster == null ) { return; hadoopDialog = ( (HadoopVfsFileChooserDialog) panel ); NamedClusterWidgetImpl ncWidget = hadoopDialog.getNamedClusterWidget(); ncWidget.initiate(); ncName = null; if ( initialFile != null ) {
@Override public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( Schemes.NAMED_CLUSTER_SCHEME + "://" ); vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); }
/** * @param name */ public void setSelectedNamedCluster( String name ) { namedClusterWidget.setSelectedNamedCluster( name ); }
setLayout( layout ); setNameClusterCombo( new Combo( this, SWT.DROP_DOWN | SWT.READ_ONLY ) ); getNameClusterCombo().setLayoutData( new RowData( 150, SWT.DEFAULT ) ); props.setLook( newButton ); initiate();
private void createConnectionPanel() { // The Connection group Group connectionGroup = new Group( this, SWT.SHADOW_ETCHED_IN ); connectionGroup.setText( BaseMessages.getString( PKG, "HadoopVfsFileChooserDialog.ConnectionGroup.Label" ) ); //$NON-NLS-1$ ; GridLayout connectionGroupLayout = new GridLayout(); connectionGroupLayout.marginWidth = 5; connectionGroupLayout.marginHeight = 5; connectionGroupLayout.verticalSpacing = 5; connectionGroupLayout.horizontalSpacing = 5; GridData gData = new GridData( SWT.FILL, SWT.FILL, true, false ); connectionGroup.setLayoutData( gData ); connectionGroup.setLayout( connectionGroupLayout ); setNamedClusterWidget( new NamedClusterWidgetImpl( connectionGroup, true, namedClusterService, runtimeTestActionService, runtimeTester ) ); getNamedClusterWidget().addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent evt ) { try { connect(); } catch ( Exception e ) { // To prevent errors from multiple event firings. } } } ); // The composite we need in the group Composite textFieldPanel = new Composite( connectionGroup, SWT.NONE ); GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, false ); textFieldPanel.setLayoutData( gridData ); textFieldPanel.setLayout( new GridLayout( 5, false ) ); }
@Override public void initiate() { namedClusterWidget.initiate(); }
@Override public void addSelectionListener( SelectionListener selectionListener ) { namedClusterWidget.addSelectionListener( selectionListener ); } }
new NamedClusterWidgetImpl( this, false, namedClusterService, runtimeTestActionService, runtimeTester ); namedClusterWidget.initiate(); props.setLook( namedClusterWidget ); fd = new FormData(); fd.top = new FormAttachment( 0, margin ); fd.right = new FormAttachment( 100, 0 ); namedClusterWidget.setLayoutData( fd );
HadoopVfsFileChooserDialog hadoopDialog = ( (HadoopVfsFileChooserDialog) panel ); namedClusterWidget = hadoopDialog.getNamedClusterWidget(); namedClusterWidget.initiate(); hadoopDialog.setNamedCluster( clusterName ); hadoopDialog.initializeConnectionPanel( initialFile ); } else if ( currentPanel.getVfsSchemeDisplayText().equals( S3_ENVIRONMENT ) ) { wFields.getActiveTableItem().setText( wFields.getActiveTableColumn() - 1, S3_ENVIRONMENT ); } else if ( namedClusterWidget != null && namedClusterWidget.getSelectedNamedCluster() != null ) { url = jobEntry.getUrlPath( url ); wFields.getActiveTableItem().setText( wFields.getActiveTableColumn() - 1, namedClusterWidget.getSelectedNamedCluster().getName() );
public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( "hdfs://" ); vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); }
@Override public void setSelectedNamedCluster( String name ) { namedClusterWidget.setSelectedNamedCluster( name ); }
new NamedClusterWidgetImpl( connectionGroup, true, namedClusterService, runtimeTestActionService, runtimeTester ) ); getNamedClusterWidget().addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent evt ) {
HadoopVfsFileChooserDialog hadoopDialog = ( (HadoopVfsFileChooserDialog) panel ); namedClusterWidget = hadoopDialog.getNamedClusterWidget(); namedClusterWidget.initiate(); hadoopDialog.setNamedCluster( clusterName ); hadoopDialog.initializeConnectionPanel( initialFile );
new NamedClusterWidgetImpl( wConfigComp, false, namedClusterService, runtimeTestActionService, runtimeTester ); namedClusterWidget.initiate(); props.setLook( namedClusterWidget ); fd = new FormData(); fd.top = new FormAttachment( 0, 0 ); fd.left = new FormAttachment( middle, 0 ); namedClusterWidget.setLayoutData( fd );