/** @deprecated */ @Deprecated @Override public IContext getContext(String contextId) { // non-UI method - forward to HelpSystem return HelpSystem.getContext(contextId); }
@Override public IContext getContext(Object target) { String id = fTree.computeContextId(); if (id!=null) { return HelpSystem.getContext(id); } return null; }
/** @deprecated */ @Deprecated @Override public void displayContext(String contextId, int x, int y) { // convenience method - funnel through the real method IContext context = HelpSystem.getContext(contextId); if (context != null) { displayContext(context, x, y); } }
public IContext getContext(Object target) { IContext context= HelpSystem.getContext(fId); if (fSelected != null && fSelected.length > 0) { try { context= new JavadocHelpContext(context, fSelected); } catch (JavaModelException e) { } } return context; } public String getSearchExpression(Object target) {
public static IContext findHelpContext(Control c) { String contextId = null; Control node = c; do { contextId = (String) node.getData(HELP_KEY); if (contextId != null) break; node = node.getParent(); } while (node != null); if (contextId != null) { return HelpSystem.getContext(contextId); } return null; }
public IContext getContext(Object target) { String contextId = HelpUtil.getContextId(HelpUtil.getHelpKey(target), _contextHelpPluginID); if (contextId == null) { return null; } return HelpSystem.getContext(contextId); }
@Override public void displayHelp(String contextId) { IContext context = HelpSystem.getContext(contextId); if (context != null) { Point point = computePopUpLocation(Display.getCurrent()); displayContext(context, point.x, point.y); } }
@Override public IContext getContext(Object target) { String contextId = null; // See if there is a context registered for the current selection IMarker[] markers = view.getSelectedMarkers(); if(markers.length > 0) { contextId = IDE.getMarkerHelpRegistry().getHelp(markers[0]); } //TODO this needs to be migrated to the ide plug-in if (contextId == null) { contextId = PlatformUI.PLUGIN_ID + ".problem_view_context";//$NON-NLS-1$ } return HelpSystem.getContext(contextId); }
public static void displayHelp(String contextId, Object[] selected) throws CoreException { IContext context= HelpSystem.getContext(contextId); if (context != null) { if (selected != null && selected.length > 0) { context= new JavadocHelpContext(context, selected); } PlatformUI.getWorkbench().getHelpSystem().displayHelp(context); } }
public static void displayHelp(String contextId, Object[] selected) throws CoreException { IContext context= HelpSystem.getContext(contextId); if (context != null) { if (selected != null && selected.length > 0) { context= new JavadocHelpContext(context, selected); } PlatformUI.getWorkbench().getHelpSystem().displayHelp(context); } }
public IContext getContext(Object target) { IContext context= HelpSystem.getContext(fId); if (fSelected != null && fSelected.length > 0) { try { context= new JavadocHelpContext(context, fSelected); } catch (JavaModelException e) { // since we are updating the UI with async exec it // can happen that the element doesn't exist anymore // but we are still showing it in the user interface if (!e.isDoesNotExist()) JavaPlugin.log(e); } } return context; } public String getSearchExpression(Object target) {
@Override public IContext getContext(Object target) { IContext context= HelpSystem.getContext(fId); if (fSelected != null && fSelected.length > 0) { try { context= new JavadocHelpContext(context, fSelected); } catch (JavaModelException e) { // since we are updating the UI with async exec it // can happen that the element doesn't exist anymore // but we are still showing it in the user interface if (!e.isDoesNotExist()) JavaPlugin.log(e); } } return context; } @Override
@Override public IContext getContext(Object target) { IContext context= HelpSystem.getContext(fId); if (fSelected != null && fSelected.length > 0) { try { context= new JavadocHelpContext(context, fSelected); } catch (JavaModelException e) { // since we are updating the UI with async exec it // can happen that the element doesn't exist anymore // but we are still showing it in the user interface if (!e.isDoesNotExist()) JavaPlugin.log(e); } } return context; } @Override
public static void displayHelp(String contextId, Object[] selected) throws CoreException { IContext context= HelpSystem.getContext(contextId); if (context != null) { if (selected != null && selected.length > 0) { context= new JavadocHelpContext(context, selected); } PlatformUI.getWorkbench().getHelpSystem().displayHelp(context); } }
/** * Open an infopop */ private void openInfopop(Widget widget) { if (item == null || item.getContextId() == null) { return; } IContext context = HelpSystem.getContext(item.getContextId()); if (context != null) { // determine a location in the upper right corner of the widget Point point = widget.getDisplay().getCursorLocation(); point = new Point(point.x + 15, point.y); // display the help PlatformUI.getWorkbench().getHelpSystem().displayContext(context, point.x, point.y); } }
@Override public void run() { IContext context = HelpSystem.getContext(contextId); if (context != null) { PlatformUI.getWorkbench().getHelpSystem().displayHelp(context); } else { PlatformUI.getWorkbench().getHelpSystem().displayHelp(); } } }
/** * Creates a new help listener for the given command. This retrieves the * help context ID from the command, and creates an appropriate listener * based on this. * * @param command * The command for which the listener should be created; must * not be <code>null</code>. * @return A help listener; never <code>null</code>. */ public HelpListener createHelpListener(ICommand command) { // TODO Need a help ID from the context // final String contextId = command.getHelpId(); final String contextId = ""; //$NON-NLS-1$ return event -> { if (getHelpUI() != null) { IContext context = HelpSystem.getContext(contextId); if (context != null) { Point point = computePopUpLocation(event.widget .getDisplay()); displayContext(context, point.x, point.y); } } }; }
/** * Handle help events locally rather than deferring to WorkbenchHelp. This * allows help specific to the selected config type to be presented. * @param evt the {@link HelpEvent} */ protected void handleHelpRequest(HelpEvent evt) { if (getViewer().getTree() != evt.getSource()) { return; } String id = computeContextId(); if (id == null || HelpSystem.getContext(id) == null) { // Use the launch configuration help context instead id = IDebugHelpContextIds.LAUNCH_CONFIGURATION_VIEW; } PlatformUI.getWorkbench().getHelpSystem().displayHelp(id); }
@Override public void setHelp(final IAction action, final String contextId) { if (WorkbenchPlugin.DEBUG) setHelpTrace(contextId); action.setHelpListener(event -> { if (getHelpUI() != null) { IContext context = HelpSystem.getContext(contextId); if (context != null) { Point point = computePopUpLocation(event.widget .getDisplay()); String title = LegacyActionTools.removeMnemonics(action.getText()); displayContext(new ContextWithTitle(context, title), point.x, point.y); } } }); }
context = HelpSystem.getContext(id ); debugMessage("Retrieved context (" + context + ") for id = " + id);