Examples of IWorkbenchHelpSystem


Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

   * The identifier of the command parameter for the URI to oepn.
   */
  private static final String PARAM_ID_HREF = "href"; //$NON-NLS-1$

  public final Object execute(final ExecutionEvent event) {
    final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench()
        .getHelpSystem();
    final String href = event.getParameter(PARAM_ID_HREF);

    if (href == null) {
      helpSystem.displayHelp();
    } else {
      helpSystem.displayHelpResource(href);
    }

    return null;
  }
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

            Link l = new Link(c, SWT.NONE);
            l.setText("<a>Open User guide</a>  ");
            l.addSelectionListener(new SelectionAdapter() {
             
              public void widgetSelected(SelectionEvent e) {
                IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
                helpSystem.displayHelpResource("/com.onpositive.gae.tools.core/html/overview.html");
              }
            });
            Link l1 = new Link(c, SWT.NONE);
            l1.addSelectionListener(new SelectionAdapter() {
             
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

  }

  protected void createActions() {
    super.createActions();
    ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();
    IWorkbenchHelpSystem helpSystem = SSEUIPlugin.getDefault().getWorkbench().getHelpSystem();
    // TextView Action - moving the selected text to
    // the clipboard
    // override the cut/paste/delete action to make
    // them run on read-only
    // files
    Action action = new TextOperationAction(resourceBundle, "Editor_Cut_", this, ITextOperationTarget.CUT); //$NON-NLS-1$
    action.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
    setAction(ITextEditorActionConstants.CUT, action);
    helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.CUT_ACTION);
    // TextView Action - inserting the clipboard
    // content at the current
    // position
    // override the cut/paste/delete action to make
    // them run on read-only
    // files
    action = new TextOperationAction(resourceBundle, "Editor_Paste_", this, ITextOperationTarget.PASTE); //$NON-NLS-1$
    action.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
    setAction(ITextEditorActionConstants.PASTE, action);
    helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.PASTE_ACTION);
    // TextView Action - deleting the selected text or
    // if selection is
    // empty the character at the right of the current
    // position
    // override the cut/paste/delete action to make
    // them run on read-only
    // files
    action = new TextOperationAction(resourceBundle, "Editor_Delete_", this, ITextOperationTarget.DELETE); //$NON-NLS-1$
    action.setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
    setAction(ITextEditorActionConstants.DELETE, action);
    helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.DELETE_ACTION);
    // SourceView Action - requesting content assist to
    // show completetion
    // proposals for the current insert position
    action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS + UNDERSCORE, this, ISourceViewer.CONTENTASSIST_PROPOSALS);
    helpSystem.setHelp(action, IHelpContextIds.CONTMNU_CONTENTASSIST_HELPID);
    action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS, true);
    // SourceView Action - requesting content assist to
    // show the content
    // information for the current insert position
    action = new TextOperationAction(SSEUIMessages.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION + UNDERSCORE, this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
    action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, true);
    // StructuredTextViewer Action - requesting format
    // of the whole
    // document
    action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT + UNDERSCORE, this, StructuredTextViewer.FORMAT_DOCUMENT);
    helpSystem.setHelp(action, IHelpContextIds.CONTMNU_FORMAT_DOC_HELPID);
    action.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, true);
    markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, true);
    // StructuredTextViewer Action - requesting format
    // of the active
    // elements
    action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS + UNDERSCORE, this, StructuredTextViewer.FORMAT_ACTIVE_ELEMENTS);
    helpSystem.setHelp(action, IHelpContextIds.CONTMNU_FORMAT_ELEMENTS_HELPID);
    action.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, true);
    markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, true);
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

      setHelpContextId(helpContextId);

      if (getSourceViewer() != null) {
        StyledText styledText = getSourceViewer().getTextWidget();
        if (styledText != null) {
          IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
          helpSystem.setHelp(styledText, getHelpContextId());
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

  }

  protected void createActions() {
    super.createActions();
    ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();
    IWorkbenchHelpSystem helpSystem = SSEUIPlugin.getDefault().getWorkbench().getHelpSystem();
    // TextView Action - moving the selected text to
    // the clipboard
    // override the cut/paste/delete action to make
    // them run on read-only
    // files
    Action action = new TextOperationAction(resourceBundle, "Editor_Cut_", this, ITextOperationTarget.CUT); //$NON-NLS-1$
    action.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
    setAction(ITextEditorActionConstants.CUT, action);
    helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.CUT_ACTION);
    // TextView Action - inserting the clipboard
    // content at the current
    // position
    // override the cut/paste/delete action to make
    // them run on read-only
    // files
    action = new TextOperationAction(resourceBundle, "Editor_Paste_", this, ITextOperationTarget.PASTE); //$NON-NLS-1$
    action.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
    setAction(ITextEditorActionConstants.PASTE, action);
    helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.PASTE_ACTION);
    // TextView Action - deleting the selected text or
    // if selection is
    // empty the character at the right of the current
    // position
    // override the cut/paste/delete action to make
    // them run on read-only
    // files
    action = new TextOperationAction(resourceBundle, "Editor_Delete_", this, ITextOperationTarget.DELETE); //$NON-NLS-1$
    action.setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
    setAction(ITextEditorActionConstants.DELETE, action);
    helpSystem.setHelp(action, IAbstractTextEditorHelpContextIds.DELETE_ACTION);
    // SourceView Action - requesting content assist to
    // show completetion
    // proposals for the current insert position
    action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS + UNDERSCORE, this, ISourceViewer.CONTENTASSIST_PROPOSALS);
    helpSystem.setHelp(action, IHelpContextIds.CONTMNU_CONTENTASSIST_HELPID);
    action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS, true);
    // SourceView Action - requesting content assist to
    // show the content
    // information for the current insert position
    action = new TextOperationAction(SSEUIMessages.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION + UNDERSCORE, this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
    action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, true);
    // StructuredTextViewer Action - requesting format
    // of the whole
    // document
    action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT + UNDERSCORE, this, StructuredTextViewer.FORMAT_DOCUMENT);
    helpSystem.setHelp(action, IHelpContextIds.CONTMNU_FORMAT_DOC_HELPID);
    action.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, true);
    markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT, true);
    // StructuredTextViewer Action - requesting format
    // of the active
    // elements
    action = new TextOperationAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS + UNDERSCORE, this, StructuredTextViewer.FORMAT_ACTIVE_ELEMENTS);
    helpSystem.setHelp(action, IHelpContextIds.CONTMNU_FORMAT_ELEMENTS_HELPID);
    action.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
    setAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, action);
    markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, true);
    markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS, true);
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

      setHelpContextId(helpContextId);

      if (getSourceViewer() != null) {
        StyledText styledText = getSourceViewer().getTextWidget();
        if (styledText != null) {
          IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
          helpSystem.setHelp(styledText, getHelpContextId());
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

    IHelpResource[] relatedTopics = context.getRelatedTopics();
    if (relatedTopics != null && relatedTopics.length > 0) {
      IHelpResource resource = relatedTopics[0];
      if (resource != null) {
        String helpUrl = resource.getHref();
        IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench()
            .getHelpSystem();
        URL url = helpSystem.resolve(helpUrl, true);
        return browser.setUrl(url.toExternalForm());
      }
    }
    Activator.getLogger().warning(
        "Could not find resource in context: " + contextName);
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

    };

    browser = new Browser(sbody, SWT.NONE);
    GridData data = new GridData(GridData.FILL_BOTH);
    browser.setLayoutData(data);
    IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench()
        .getHelpSystem();
    URL url = helpSystem
        .resolve("org.fusesource.ide.help/index.html", true);
    browser.setUrl(url.toExternalForm());
    browser.addLocationListener(locationListener);

    // section.pack();
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

        IWorkbenchPage page = wbw.getActivePage();
        if (page != null) {
          try {
            if (page.findView(UIHelper.ID_PROPERTIES_VIEW) == null) {
              IViewPart propView = page.showView(UIHelper.ID_PROPERTIES_VIEW);
              IWorkbenchHelpSystem helpSystem = propView.getSite().getWorkbenchWindow().getWorkbench().getHelpSystem();
              //Activator.getLogger().debug(propView.getClass().getName());
              //helpSystem.setHelp(propView, PLUGIN_ID);
            }
          } catch (PartInitException ex) {
            Activator.getLogger().error(ex);
View Full Code Here

Examples of org.eclipse.ui.help.IWorkbenchHelpSystem

  {
    IProject project = ProjectUtils.getProject(
        commandLine.getValue(Options.NAME_OPTION));
    String pattern = commandLine.getValue(Options.PATTERN_OPTION);

    IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();

    ArrayList<String> results = new ArrayList<String>();
    for(SearchMatch match : executeSearch(commandLine)){
      IJavaElement element = (IJavaElement)match.getElement();

      if (element == null){
        continue;
      }

      // for pattern searches, honor import excludes
      if (pattern != null){
        String name = null;
        switch(element.getElementType()){
          case IJavaElement.TYPE:
            name = ((IType)element).getFullyQualifiedName();
            break;
          case IJavaElement.METHOD:
          case IJavaElement.FIELD:
            name = ((IType)element.getParent()).getFullyQualifiedName();
            break;
        }
        if (name != null){
          name = name.replace('$', '.');
          if (ImportUtils.isImportExcluded(project, name)){
            continue;
          }
        }
      }

      URL url = JavaUI.getJavadocLocation(element, true);
      if(url == null){
        continue;
      }

      // android injects its own docs, so filter those out if the project doesn't
      // have the android nature.
      if (ANDROID_JDK_URL.matcher(url.toString()).matches() &&
          !project.hasNature(ANDROID_NATURE))
      {
        continue;
      }

      // convert any jar urls to a usable eclipse url
      Matcher jarMatcher = JAR_URL.matcher(url.toExternalForm());
      if (jarMatcher.matches()){
        url = helpSystem.resolve(url.toExternalForm(), true);
      }

      results.add(url.toString());
    }
    return results;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.