use of org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpTopic in project dsl-devkit by dsldevkit.
the class CheckContextsGenerator method createContextForCheck.
/**
* Creates a context for every check.
*
* @param factory
* the model factory
* @param check
* the check
* @return the new help context
*/
private CtxHelpContext createContextForCheck(final CtxHelpDocumentFactory factory, final Check check) {
CtxHelpContext context = factory.createContext();
context.setID(generatorNaming.getContextId(check));
CtxHelpTopic topic = factory.createTopic();
topic.setLabel(check.getLabel());
Path contextFilePath = new Path("docs/content/" + EcoreUtil2.getContainerOfType(check, CheckCatalog.class).getName() + ".html");
topic.setXMLAttribute(ICtxHelpConstants.ATTRIBUTE_HREF, contextFilePath.toPortableString() + '#' + generatorNaming.getContextId(check));
context.addChild(topic);
return context;
}
Aggregations