@VisibleForTesting JobExecutionConfigurationDialog newJobExecutionConfigurationDialog( JobExecutionConfiguration executionConfiguration, JobMeta jobMeta ) { return new JobExecutionConfigurationDialog( spoon.getShell(), executionConfiguration, jobMeta ); } }
public boolean open() { mainLayout( PKG, "JobExecutionConfigurationDialog", GUIResource.getInstance().getImageJobGraph() ); runConfigurationSectionLayout( PKG, "TransExecutionConfigurationDialog" ); optionsSectionLayout( PKG, "JobExecutionConfigurationDialog" ); parametersSectionLayout( PKG, "JobExecutionConfigurationDialog" ); String docUrl = Const.getDocUrl( BaseMessages.getString( Spoon.class, "Spoon.JobExecutionConfigurationDialog.Help" ) ); String docTitle = BaseMessages.getString( PKG, "JobExecutionConfigurationDialog.docTitle" ); String docHeader = BaseMessages.getString( PKG, "JobExecutionConfigurationDialog.docHeader" ); buttonsSectionLayout( PKG, "JobExecutionConfigurationDialog", docTitle, docUrl, docHeader ); getData(); openDialog(); return retval; }
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 ) { startCopy = getJobEntryCopyName( copy ); getParamsData(); getVariablesData();
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 ); } }
fd_expandCheckButton.left = new FormAttachment( 0, 10 ); wExpandRemote.setLayoutData( fd_expandCheckButton ); addRunConfigurationListenerForExpandRemoteOption(); for ( int i = 0; i < names.length; i++ ) { JobEntryCopy copy = jobMeta.getJobCopies().get( i ); names[i] = getJobEntryCopyName( copy );
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() ); } ); } }