Search in sources :

Example 1 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode in project pentaho-kettle by pentaho.

the class SpoonRefreshSlavesSubtreeTest method setUp.

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

Example 2 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode in project pentaho-kettle by pentaho.

the class SpoonRefreshClustersSubtreeTest method setUp.

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

Example 3 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode 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 4 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode in project pentaho-kettle by pentaho.

the class RootNode method create.

public TreeNode create(AbstractMeta abstractMeta, Image image, boolean expanded) {
    TreeNode treeNode = new TreeNode(abstractMeta.getName(), image, expanded);
    addChild(treeNode);
    addAbstractMeta(abstractMeta, treeNode);
    treeFolderProviders.forEach(treeFolderProvider -> treeFolderProvider.create(abstractMeta, treeNode));
    return treeNode;
}
Also used : TreeNode(org.pentaho.di.ui.core.widget.tree.TreeNode)

Example 5 with TreeNode

use of org.pentaho.di.ui.core.widget.tree.TreeNode in project pentaho-kettle by pentaho.

the class PartitionsFolderProvider method refresh.

@Override
public void refresh(AbstractMeta meta, TreeNode treeNode, String filter) {
    TransMeta transMeta = (TransMeta) meta;
    List<PartitionSchema> partitionSchemas;
    try {
        partitionSchemas = pickupPartitionSchemas(transMeta);
    } catch (KettleException e) {
        new ErrorDialog(Spoon.getInstance().getShell(), BaseMessages.getString(PKG, "Spoon.ErrorDialog.Title"), BaseMessages.getString(PKG, "Spoon.ErrorDialog.ErrorFetchingFromRepo.PartitioningSchemas"), e);
        return;
    }
    // Put the steps below it.
    for (PartitionSchema partitionSchema : partitionSchemas) {
        if (!filterMatch(partitionSchema.getName(), filter)) {
            continue;
        }
        TreeNode childTreeNode = createTreeNode(treeNode, partitionSchema.getName(), guiResource.getImagePartitionSchema());
        if (partitionSchema.isShared()) {
            childTreeNode.setFont(guiResource.getFontBold());
        }
    }
}
Also used : KettleException(org.pentaho.di.core.exception.KettleException) PartitionSchema(org.pentaho.di.partition.PartitionSchema) TreeNode(org.pentaho.di.ui.core.widget.tree.TreeNode) TransMeta(org.pentaho.di.trans.TransMeta) ErrorDialog(org.pentaho.di.ui.core.dialog.ErrorDialog)

Aggregations

TreeNode (org.pentaho.di.ui.core.widget.tree.TreeNode)13 GUIResource (org.pentaho.di.ui.core.gui.GUIResource)6 Before (org.junit.Before)5 KettleException (org.pentaho.di.core.exception.KettleException)2 TransMeta (org.pentaho.di.trans.TransMeta)2 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)2 Image (org.eclipse.swt.graphics.Image)1 SlaveServer (org.pentaho.di.cluster.SlaveServer)1 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)1 PluginInterface (org.pentaho.di.core.plugins.PluginInterface)1 RunConfiguration (org.pentaho.di.engine.configuration.api.RunConfiguration)1 PartitionSchema (org.pentaho.di.partition.PartitionSchema)1 KettleRepositoryLostException (org.pentaho.di.repository.KettleRepositoryLostException)1 StepMeta (org.pentaho.di.trans.step.StepMeta)1 DatabasesCollector (org.pentaho.di.ui.spoon.DatabasesCollector)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 PartitionsFolderProvider (org.pentaho.di.ui.spoon.tree.provider.PartitionsFolderProvider)1 SlavesFolderProvider (org.pentaho.di.ui.spoon.tree.provider.SlavesFolderProvider)1