Search in sources :

Example 1 with HopsFolderProvider

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

the class SpoonRefreshHopsSubtreeTest method setUp.

@Before
public void setUp() throws Exception {
    GUIResource guiResource = mock(GUIResource.class);
    hopsFolderProvider = new HopsFolderProvider(guiResource);
    treeNode = new TreeNode();
}
Also used : GUIResource(org.pentaho.di.ui.core.gui.GUIResource) TreeNode(org.pentaho.di.ui.core.widget.tree.TreeNode) HopsFolderProvider(org.pentaho.di.ui.spoon.tree.provider.HopsFolderProvider) Before(org.junit.Before)

Example 2 with HopsFolderProvider

use of org.pentaho.di.ui.spoon.tree.provider.HopsFolderProvider 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

HopsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.HopsFolderProvider)2 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 Before (org.junit.Before)1 GUIResource (org.pentaho.di.ui.core.gui.GUIResource)1 TreeNode (org.pentaho.di.ui.core.widget.tree.TreeNode)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 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