use of org.pentaho.di.core.gui.GUIOption in project pentaho-kettle by pentaho.
the class PropsUI method init.
@SuppressWarnings("unchecked")
protected synchronized void init() {
super.createLogChannel();
properties = new Properties();
pluginHistory = new ArrayList<ObjectUsageCount>();
setDefault();
loadProps();
addDefaultEntries();
loadPluginHistory();
loadScreens();
loadLastUsedFiles();
loadLastUsedRepoFiles();
loadOpenTabFiles();
resetRecentSearches();
PluginRegistry registry = PluginRegistry.getInstance();
List<PluginInterface> plugins = registry.getPlugins(LifecyclePluginType.class);
List<GUIOption<Object>> leditables = new ArrayList<GUIOption<Object>>();
for (PluginInterface plugin : plugins) {
if (!plugin.getClassMap().keySet().contains(GUIOption.class)) {
continue;
}
try {
GUIOption<Object> loaded = registry.loadClass(plugin, GUIOption.class);
if (loaded != null) {
leditables.add(loaded);
}
} catch (ClassCastException cce) {
// Not all Lifecycle plugins implement GUIOption, keep calm and carry on
LogChannel.GENERAL.logDebug("Plugin " + plugin.getIds()[0] + " does not implement GUIOption, it will not be editable");
} catch (Exception e) {
LogChannel.GENERAL.logError("Unexpected error loading class for plugin " + plugin.getName(), e);
}
}
editables = Collections.unmodifiableList(leditables);
}
Aggregations