use of org.eclipse.help.IContext in project tdq-studio-se by Talend.
the class ExportPatternsAction method run.
@Override
public void run() {
Wizard wizard = isForExchange ? new ExportForExchangeWizard(folder.getFullPath().toString()) : new ExportPatternsWizard(node, isForExchange);
WizardDialog dialog = null;
// MOD hcheng 2009-07-07,for 8122.Add an help file in the "Export patterns for Talend exchange wizard".
if (isForExchange) {
IContext context = HelpSystem.getContext(HelpPlugin.getDefault().getPatternHelpContextID());
IHelpResource[] relatedTopics = context.getRelatedTopics();
String href = relatedTopics[3].getHref();
dialog = new OpeningHelpWizardDialog(null, wizard, href);
} else {
// MOD yyi 2009-08-20,for 8689.Add help in "export pattern" wizard.
IContext context = HelpSystem.getContext(HelpPlugin.getDefault().getPatternHelpContextID());
IHelpResource[] relatedTopics = context.getRelatedTopics();
String href = relatedTopics[4].getHref();
dialog = new OpeningHelpWizardDialog(null, wizard, href);
}
wizard.setWindowTitle(getText());
if (WizardDialog.OK == dialog.open()) {
try {
folder.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
log.error(e, e);
}
}
}
use of org.eclipse.help.IContext in project dbeaver by serge-rider.
the class BaseObjectEditPage method performHelp.
@Override
public void performHelp() {
if (this instanceof IHelpContextIdProvider) {
IWorkbenchHelpSystem helpSystem = UIUtils.getActiveWorkbenchWindow().getWorkbench().getHelpSystem();
if (helpSystem != null) {
String helpContextId = ((IHelpContextIdProvider) this).getHelpContextId();
IContext helpContext = new IContext() {
@Override
public IHelpResource[] getRelatedTopics() {
return new IHelpResource[] { new IHelpResource() {
@Override
public String getHref() {
return helpContextId;
}
@Override
public String getLabel() {
return helpContextId;
}
} };
}
@Override
public String getText() {
return helpContextId;
}
};
helpSystem.displayHelp(helpContext);
}
}
}
Aggregations