Search in sources :

Example 1 with IBundleGroup

use of org.eclipse.core.runtime.IBundleGroup in project knime-core by knime.

the class GlobalTimerinfoNodeModel method execute.

/**
 * {@inheritDoc}
 */
@Override
protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec) throws Exception {
    BufferedDataTable result0 = NodeTimer.GLOBAL_TIMER.getGlobalStatsTable(exec);
    BufferedDataContainer result1 = exec.createDataContainer(createSpecOut1());
    int rowcount = 0;
    for (IBundleGroupProvider provider : Platform.getBundleGroupProviders()) {
        for (IBundleGroup feature : provider.getBundleGroups()) {
            DataRow row = new DefaultRow(new RowKey("Row " + rowcount++), new StringCell(feature.getIdentifier()), new StringCell(feature.getVersion()));
            result1.addRowToTable(row);
        }
    }
    result1.close();
    return new PortObject[] { result0, result1.getTable() };
}
Also used : IBundleGroup(org.eclipse.core.runtime.IBundleGroup) IBundleGroupProvider(org.eclipse.core.runtime.IBundleGroupProvider) BufferedDataContainer(org.knime.core.node.BufferedDataContainer) RowKey(org.knime.core.data.RowKey) StringCell(org.knime.core.data.def.StringCell) BufferedDataTable(org.knime.core.node.BufferedDataTable) DefaultRow(org.knime.core.data.def.DefaultRow) DataRow(org.knime.core.data.DataRow) PortObject(org.knime.core.node.port.PortObject)

Aggregations

IBundleGroup (org.eclipse.core.runtime.IBundleGroup)1 IBundleGroupProvider (org.eclipse.core.runtime.IBundleGroupProvider)1 DataRow (org.knime.core.data.DataRow)1 RowKey (org.knime.core.data.RowKey)1 DefaultRow (org.knime.core.data.def.DefaultRow)1 StringCell (org.knime.core.data.def.StringCell)1 BufferedDataContainer (org.knime.core.node.BufferedDataContainer)1 BufferedDataTable (org.knime.core.node.BufferedDataTable)1 PortObject (org.knime.core.node.port.PortObject)1