use of org.pentaho.di.ui.core.dialog.SubjectDataBrowserDialog in project pentaho-kettle by pentaho.
the class Spoon method showPluginInfo.
/**
* Show a plugin browser
*/
public void showPluginInfo() {
try {
// First we collect information concerning all the plugin types...
//
Map<String, RowMetaInterface> metaMap = new HashMap<>();
Map<String, List<Object[]>> dataMap = new HashMap<>();
PluginRegistry registry = PluginRegistry.getInstance();
List<Class<? extends PluginTypeInterface>> pluginTypeClasses = registry.getPluginTypes();
for (Class<? extends PluginTypeInterface> pluginTypeClass : pluginTypeClasses) {
PluginTypeInterface pluginTypeInterface = registry.getPluginType(pluginTypeClass);
if (pluginTypeInterface.isFragment()) {
continue;
}
String subject = pluginTypeInterface.getName();
RowBuffer pluginInformation = registry.getPluginInformation(pluginTypeClass);
metaMap.put(subject, pluginInformation.getRowMeta());
dataMap.put(subject, pluginInformation.getBuffer());
}
// Now push it all to a subject data browser...
//
SubjectDataBrowserDialog dialog = new SubjectDataBrowserDialog(shell, metaMap, dataMap, "Plugin browser", "Plugin type");
dialog.open();
} catch (Exception e) {
new ErrorDialog(shell, "Error", "Error listing plugins", e);
}
}
Aggregations