public TransGraph findTransGraphOfTransformation( TransMeta transMeta ) { // Now loop over the entries in the tab-map for ( TabMapEntry mapEntry : spoon.delegates.tabs.getTabs() ) { if ( mapEntry.getObject() instanceof TransGraph ) { TransGraph transGraph = (TransGraph) mapEntry.getObject(); if ( transGraph.getMeta().equals( transMeta ) ) { return transGraph; } } } return null; }
public void showExecutionResults() { if ( isExecutionResultsPaneVisible() ) { disposeExtraView(); } else { addAllTabs(); } }
@Override public void widgetSelected( SelectionEvent e ) { addHop( stream ); } } );
@Override public void mouseHover( MouseEvent e ) { boolean tip = true; boolean isDeprecated = false; toolTip.hide(); toolTip.setHideDelay( TOOLTIP_HIDE_DELAY_SHORT ); Point real = screen2real( e.x, e.y ); AreaOwner areaOwner = getVisibleAreaOwner( real.x, real.y ); if ( areaOwner != null && areaOwner.getAreaType() != null ) { switch ( areaOwner.getAreaType() ) { case STEP_ICON: StepMeta stepMeta = (StepMeta) areaOwner.getOwner(); isDeprecated = stepMeta.isDeprecated(); if ( !stepMeta.isMissing() && !mouseOverSteps.contains( stepMeta ) ) { addStepMouseOverDelayTimer( stepMeta ); redraw(); tip = false; } break; default: break; } } // Show a tool tip upon mouse-over of an object on the canvas if ( ( tip && !helpTip.isVisible() ) || isDeprecated ) { setToolTip( real.x, real.y, e.x, e.y ); } }
Point real = screen2real( e.x, e.y ); lastclick = new Point( real.x, real.y ); hideToolTips(); setMenu( real.x, real.y ); return; AreaOwner areaOwner = getVisibleAreaOwner( real.x, real.y ); if ( areaOwner != null && areaOwner.getAreaType() != null ) { switch ( areaOwner.getAreaType() ) { clearSettings(); currentStep = (StepMeta) areaOwner.getParent(); stopStepMouseOverDelayTimer( currentStep ); editStep(); break; modalMessageDialog( getString( "TransGraph.StepInjectionSupported.Title" ), getString( "TransGraph.StepInjectionSupported.Tooltip" ), SWT.OK | SWT.ICON_INFORMATION ); break; clearSettings(); stepMeta = (StepMeta) areaOwner.getParent(); setMenu( stepMeta.getLocation().x, stepMeta.getLocation().y ); break; addCandidateAsHop( e.x, e.y ); } else {
setXulDomContainer( container ); } catch ( XulException e1 ) { log.logError( "Error loading XUL resource bundle for Spoon", e1 ); setLayout( new FormLayout() ); setLayoutData( new GridData( GridData.FILL_BOTH ) ); addToolBar(); setControlStates(); // enable / disable the icons in the toolbar too. menuMap.put( "trans-graph-hop", (XulMenupopup) getXulDomContainer().getDocumentRoot().getElementById( "trans-graph-hop" ) ); menuMap.put( "trans-graph-entry", (XulMenupopup) getXulDomContainer().getDocumentRoot().getElementById( "trans-graph-entry" ) ); menuMap.put( "trans-graph-background", (XulMenupopup) getXulDomContainer().getDocumentRoot().getElementById( "trans-graph-background" ) ); menuMap.put( "trans-graph-note", (XulMenupopup) getXulDomContainer().getDocumentRoot().getElementById( "trans-graph-note" ) ); } catch ( Throwable t ) { clearSettings(); setVisible( true ); newProps(); setBackground( GUIResource.getInstance().getColorBackground() ); final Timer timer = new Timer( "TransGraph.setControlStates Timer: " + getMeta().getName() );
@Override public void mouseUp( MouseEvent e ) { try { TransGraphExtension ext = new TransGraphExtension( null, e, getArea() ); ExtensionPointHandler.callExtensionPoint( LogChannel.GENERAL, KettleExtensionPoint.TransGraphMouseUp.id, ext ); if ( ext.isPreventDefault() ) { redraw(); clearSettings(); return; TransHopMeta selectedHop = findHop( e.x, e.y ); updateErrorMetaForHop( selectedHop ); Point real = screen2real( e.x, e.y ); Point icon = new Point( real.x - iconoffset.x, real.y - iconoffset.y ); AreaOwner areaOwner = getVisibleAreaOwner( real.x, real.y ); ExtensionPointHandler.callExtensionPoint( LogChannel.GENERAL, KettleExtensionPoint.TransGraphMouseUp.id, ext ); if ( ext.isPreventDefault() ) { redraw(); clearSettings(); return; addCandidateAsHop( e.x, e.y ); redraw(); } else { selectInRect( transMeta, selectionRegion ); selectionRegion = null; stopStepMouseOverDelayTimers();
public synchronized void start( TransExecutionConfiguration executionConfiguration ) throws KettleException { handleTransMetaChanges( transMeta ); final String[] args; if ( arguments != null ) { args = convertArguments( arguments ); } else { args = null; setControlStates(); modalMessageDialog( getString( "TransLog.Dialog.DoNoStartTransformationTwice.Title" ), getString( "TransLog.Dialog.DoNoStartTransformationTwice.Message" ), SWT.OK | SWT.ICON_WARNING ); showSaveFileMessage(); } else if ( spoon.rep != null && transMeta.getName() == null ) { modalMessageDialog( getString( "TransLog.Dialog.GiveTransformationANameBeforeRunning.Title" ), getString( "TransLog.Dialog.GiveTransformationANameBeforeRunning.Message" ), SWT.OK | SWT.ICON_WARNING ); } else { modalMessageDialog( getString( "TransLog.Dialog.SaveTransformationBeforeRunning2.Title" ), getString( "TransLog.Dialog.SaveTransformationBeforeRunning2.Message" ), SWT.OK | SWT.ICON_WARNING );
activeTransGraph.showSaveFileMessage(); activeTransGraph.debug( executionConfiguration, transDebugMeta ); } else { activeTransGraph.start( executionConfiguration ); activeTransGraph.handleTransMetaChanges( transMeta ); if ( transMeta.hasChanged() ) { showSaveTransformationBeforeRunningDialog( spoon.getShell() ); activeTransGraph.handleTransMetaChanges( transMeta ); if ( transMeta.hasChanged() ) { showSaveTransformationBeforeRunningDialog( spoon.getShell() );
transGraph.addExtraView(); } else { if ( transGridTab != null && !transGridTab.isDisposed() ) { colinf[12].setAllignement( SWT.RIGHT ); transGridView = new TableView( transGraph.getManagedObject(), transGridComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, 1, true, // readonly! final Timer tim = new Timer( "TransGraph: " + transGraph.getMeta().getName() );
transGraph.addExtraView(); } else { if ( transPerfTab != null && !transPerfTab.isDisposed() ) { transGraph.getDisplay().asyncExec( new Runnable() {
MenuItem item = new MenuItem( menu, SWT.NONE ); item.setText( Const.NVL( stream.getDescription(), "" ) ); item.setImage( getImageFor( stream ) ); item.addSelectionListener( new SelectionAdapter() { @Override addHop( streams.get( 0 ) ); } else { return;
private void sendNow( Repository repository, AbstractMeta meta ) { try { if ( meta instanceof TransMeta ) { Spoon.getInstance().getActiveTransGraph().handleTransMetaChanges( (TransMeta) meta ); } else { Spoon.getInstance().getActiveJobGraph().handleJobMetaChanges( (JobMeta) meta ); } } catch ( Exception e ) { // Ignore an exception if occurs } if ( !meta.hasChanged() ) { SchedulerRequest.Builder builder = new SchedulerRequest.Builder(); builder.repository( repository ); SchedulerRequest schedulerRequest = builder.build(); schedulerRequest.submit( meta ); } } }
transGraph.addExtraView(); } else { if ( transHistoryTab != null && !transHistoryTab.isDisposed() ) { transMeta = transGraph.getManagedObject();
protected void addHop( StreamInterface stream ) { switch ( stream.getStreamType() ) { case ERROR: addErrorHop(); candidate.setErrorHop( true ); spoon.newHop( transMeta, candidate ); clearSettings();
transGraph.addExtraView(); } else { if ( transLogTab != null && !transLogTab.isDisposed() ) { transGraph.addDisposeListener( new DisposeListener() { public void widgetDisposed( DisposeEvent event ) { if ( transGraph.trans != null ) {
@Override public void run() { addAllTabs(); prepareTrans( parentThread, args ); } } );
transGraph.addExtraView(); } else { if ( transPreviewTab != null && !transPreviewTab.isDisposed() ) {
transGraph = new TransGraph( spoon.tabfolder.getSwtTabset(), spoon, transMeta ); PropsUI props = PropsUI.getInstance(); if ( tabName.length() >= getMaxTabLength() ) {
@Override public void run() { addAllTabs(); } } );