Search in sources :

Example 1 with StepsFolderProvider

use of org.pentaho.di.ui.spoon.tree.provider.StepsFolderProvider in project pentaho-kettle by pentaho.

the class Spoon method createSelectionTree.

private void createSelectionTree() {
    // //////////////////////////////////////////////////////////////////////////////////////////////////
    // 
    // Now set up the transformation/job tree
    // 
    selectionTree = new Tree(viewTreeComposite, SWT.SINGLE);
    selectionTreeManager = new TreeManager(selectionTree);
    selectionTreeManager.addRoot(STRING_TRANSFORMATIONS, Arrays.asList(new DBConnectionFolderProvider(), new StepsFolderProvider(), new HopsFolderProvider(), new PartitionsFolderProvider(), new SlavesFolderProvider(), new ClustersFolderProvider()));
    selectionTreeManager.addRoot(STRING_JOBS, Arrays.asList(new DBConnectionFolderProvider(), new JobEntriesFolderProvider(), new SlavesFolderProvider()));
    props.setLook(selectionTree);
    selectionTree.setLayout(new FillLayout());
    addDefaultKeyListeners(selectionTree);
    selectionTree.addMenuDetectListener(e -> setMenu(selectionTree));
    selectionTree.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            showSelection();
        }

        @Override
        public void widgetDefaultSelected(SelectionEvent e) {
            doubleClickedInTree(selectionTree);
        }
    });
    // Set a listener on the tree
    addDragSourceToTree(selectionTree);
}
Also used : ClustersFolderProvider(org.pentaho.di.ui.spoon.tree.provider.ClustersFolderProvider) SlavesFolderProvider(org.pentaho.di.ui.spoon.tree.provider.SlavesFolderProvider) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) StepsFolderProvider(org.pentaho.di.ui.spoon.tree.provider.StepsFolderProvider) PartitionsFolderProvider(org.pentaho.di.ui.spoon.tree.provider.PartitionsFolderProvider) FillLayout(org.eclipse.swt.layout.FillLayout) HopsFolderProvider(org.pentaho.di.ui.spoon.tree.provider.HopsFolderProvider) TreeManager(org.pentaho.di.ui.spoon.tree.TreeManager) SelectionEvent(org.eclipse.swt.events.SelectionEvent) Tree(org.eclipse.swt.widgets.Tree) DBConnectionFolderProvider(org.pentaho.di.ui.spoon.tree.provider.DBConnectionFolderProvider) JobEntriesFolderProvider(org.pentaho.di.ui.spoon.tree.provider.JobEntriesFolderProvider)

Aggregations

SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 FillLayout (org.eclipse.swt.layout.FillLayout)1 Tree (org.eclipse.swt.widgets.Tree)1 TreeManager (org.pentaho.di.ui.spoon.tree.TreeManager)1 ClustersFolderProvider (org.pentaho.di.ui.spoon.tree.provider.ClustersFolderProvider)1 DBConnectionFolderProvider (org.pentaho.di.ui.spoon.tree.provider.DBConnectionFolderProvider)1 HopsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.HopsFolderProvider)1 JobEntriesFolderProvider (org.pentaho.di.ui.spoon.tree.provider.JobEntriesFolderProvider)1 PartitionsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.PartitionsFolderProvider)1 SlavesFolderProvider (org.pentaho.di.ui.spoon.tree.provider.SlavesFolderProvider)1 StepsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.StepsFolderProvider)1