int index = contextId.lastIndexOf('.');
if (index != -1) {
String pluginId = contextId.substring(0, index);
Iterator iter = getContextProviders(pluginId).iterator();
while (iter.hasNext()) {
AbstractContextProvider provider = (AbstractContextProvider)iter.next();
try {
IContext context = provider.getContext(contextId, locale);
if (context != null) {
return new Context(context, contextId);
}
}
catch (Throwable t) {
// log and skip
String msg = "Error querying context provider (" + provider.getClass().getName() + ") with context Id: " + contextId; //$NON-NLS-1$ //$NON-NLS-2$
HelpPlugin.logError(msg, t);
}
}
}
return null;