use of org.knime.workbench.workflowcoach.data.NodeTripleProviderFactory in project knime-core by knime.
the class ConfigureAction method run.
/**
* {@inheritDoc}
*/
@Override
public void run() {
List<NodeTripleProviderFactory> nodeTripleProviderFactories = NodeRecommendationManager.getInstance().getNodeTripleProviderFactories();
String[] prefPageIDs = new String[nodeTripleProviderFactories.size()];
for (int i = 0; i < prefPageIDs.length; i++) {
prefPageIDs[i] = nodeTripleProviderFactories.get(i).getPreferencePageID();
}
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(m_viewer.getControl().getShell(), WorkflowCoachPreferencePage.ID, prefPageIDs, null);
dialog.open();
}
use of org.knime.workbench.workflowcoach.data.NodeTripleProviderFactory in project knime-core by knime.
the class NodeRecommendationManager method getNodeTripleProviderFactories.
/**
* Returns all available {@link NodeTripleProviderFactory}s. Node triple provider factories can be added via the
* respective extension point.
*
* @return a list of available node triple provider factories
*/
public List<NodeTripleProviderFactory> getNodeTripleProviderFactories() {
List<NodeTripleProviderFactory> l = new ArrayList<NodeTripleProviderFactory>(3);
// get node triple providers from extension points
IExtensionPoint extPoint = Platform.getExtensionRegistry().getExtensionPoint(TRIPLE_PROVIDER_EXTENSION_POINT_ID);
assert (extPoint != null) : "Invalid extension point: " + TRIPLE_PROVIDER_EXTENSION_POINT_ID;
IExtension[] extensions = extPoint.getExtensions();
for (IExtension ext : extensions) {
for (IConfigurationElement conf : ext.getConfigurationElements()) {
try {
NodeTripleProviderFactory factory = (NodeTripleProviderFactory) conf.createExecutableExtension("factory-class");
l.add(factory);
} catch (CoreException e) {
LOGGER.warn("Could not create factory from " + conf.getAttribute("factory-class"));
}
}
}
return l;
}
Aggregations