private String createContextHelp(IContextProvider provider, Control c) { if (provider == null) return createContextHelp(c); lastContext = provider.getContext(c); if (lastContext != null) { return formatHelpContext(lastContext); } return null; }
/** * */ private void addHelpListener() { // Set help on the view itself viewer.getControl().addHelpListener(e -> { IContextProvider provider = Adapters.adapt(ExtendedMarkersView.this, IContextProvider.class); if (provider == null) return; IContext context = provider.getContext(viewer.getControl()); PlatformUI.getWorkbench().getHelpSystem().displayHelp(context); }); }
public void handleActivation(IContextProvider provider, IContext context, Control c, IWorkbenchPart part) { if (text.isDisposed()) return; lastControl = c; lastProvider = provider; lastContext = context; lastPart = part; if (context==null && provider!=null) { lastContext = provider.getContext(c); } String helpText; if (lastContext!=null) helpText = formatHelpContext(lastContext); else helpText = createContextHelp(c); updateTitle(); if (getSection().isExpanded()) updateText(helpText); updateDynamicHelp(context!=null); }
else { IContextProvider provider = part.getAdapter(IContextProvider.class); IContext context = (provider != null) ? provider.getContext(control) : null; if (context != null) { buffer.append(toolkit.createHelpIdentifierSection(context));