public void addRunConfigurationListenerForExpandRemoteOption() { wRunConfiguration.addModifyListener( modifyEvent -> { List<Object> items = Arrays.asList( wRunConfiguration.getText(), false ); try { ExtensionPointHandler.callExtensionPoint( Spoon.getInstance().getLog(), KettleExtensionPoint .RunConfigurationIsRemote.id, items ); } catch ( KettleException ignored ) { // Ignore errors } getConfiguration().setRunConfiguration( wRunConfiguration.getText() ); wExpandRemote.setEnabled( (Boolean) items.get( 1 ) ); wExpandRemote.setSelection( wExpandRemote.isEnabled() && wExpandRemote.getSelection() ); } ); } }
public void getData() { wSafeMode.setSelection( configuration.isSafeModeEnabled() ); wClearLog.setSelection( configuration.isClearingLog() ); wExpandRemote.setSelection( getConfiguration().isExpandingRemoteJob() ); wLogLevel.select( DefaultLogLevel.getLogLevel().getLevel() ); wGatherMetrics.setSelection( configuration.isGatheringMetrics() ); if ( !runConfigurations.contains( getConfiguration().getRunConfiguration() ) ) { getConfiguration().setRunConfiguration( null ); if ( Utils.isEmpty( getConfiguration().getRunConfiguration() ) ) { wRunConfiguration.select( 0 ); } else { wRunConfiguration.setText( getConfiguration().getRunConfiguration() ); wExpandRemote.setEnabled( getConfiguration().isExecutingRemotely() ); if ( !Utils.isEmpty( getConfiguration().getStartCopyName() ) ) { JobEntryCopy copy = ( (JobMeta) abstractMeta ).findJobEntry( getConfiguration().getStartCopyName(), getConfiguration() .getStartCopyNr(), false ); if ( copy != null ) {
public void getInfo() { try { getConfiguration().setExpandingRemoteJob( wExpandRemote.getSelection() ); getConfiguration().setRunConfiguration( wRunConfiguration.getText() ); // various settings // configuration.setReplayDate( null ); configuration.setSafeModeEnabled( wSafeMode.getSelection() ); configuration.setClearingLog( wClearLog.getSelection() ); configuration.setLogLevel( LogLevel.values()[wLogLevel.getSelectionIndex()] ); String startCopyName = null; int startCopyNr = 0; if ( !Utils.isEmpty( wStartCopy.getText() ) ) { if ( wStartCopy.getSelectionIndex() >= 0 ) { JobEntryCopy copy = ( (JobMeta) abstractMeta ).getJobCopies().get( wStartCopy.getSelectionIndex() ); startCopyName = copy.getName(); startCopyNr = copy.getNr(); } } getConfiguration().setStartCopyName( startCopyName ); getConfiguration().setStartCopyNr( startCopyNr ); // The lower part of the dialog... getInfoParameters(); getInfoVariables(); // Metrics configuration.setGatheringMetrics( wGatherMetrics.getSelection() ); } catch ( Exception e ) { new ErrorDialog( shell, "Error in settings", "There is an error in the dialog settings", e ); } }