use of org.eclipse.help.internal.context.ContextFileProvider in project statecharts by Yakindu.
the class AbstractUserHelpDocumentationProvider method parseHelp.
private String parseHelp(String contextId) throws Exception {
ContextFileProvider provider = new ContextFileProvider();
IContext context = provider.getContext(contextId, Locale.getDefault().toString());
IHelpResource[] relatedTopics = context.getRelatedTopics();
Assert.isTrue(relatedTopics != null);
// We assume that there is only one topic registered
IHelpResource helpResource = relatedTopics[0];
String href = helpResource.getHref().substring(1);
URL url = new URL("platform:/plugin/" + href);
return convertStreamToString(url.openConnection().getInputStream());
}
Aggregations