Examples of IWorkbenchPage


Examples of org.eclipse.ui.IWorkbenchPage

        /* For unread & next news, consider all news of the active feed */
        if (!success && fType.isNewsScoped() && fType.isUnread() && fType.isNext())
          success = activeFeedView.navigate(false, false, fType.isNext(), fType.isUnread());

        if (success) {
          IWorkbenchPage page = activeFeedView.getSite().getPage();
          page.activate(activeFeedView.getSite().getPart());
          page.activate(activeFeedView);

          return true;
        }
      }

View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

        if (fType.isNewsScoped() && fType.isUnread())
          perform = PerformAfterInputSet.SELECT_UNREAD_NEWS;
        else if (fType.isNewsScoped())
          perform = PerformAfterInputSet.SELECT_FIRST_NEWS;

        IWorkbenchPage page = OwlUI.getPage();
        if (page != null)
          OwlUI.openInFeedView(page, new StructuredSelection(mark), true, false, perform);
      }

      return targetNode != null;
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

    /* Only Link for Single Selections */
    if (selection.size() == 1) {
      Object element = selection.getFirstElement();

      /* Find the Editor showing given Selection */
      IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      IEditorReference[] editorReferences = activePage.getEditorReferences();
      IEditorReference reference = EditorUtils.findEditor(editorReferences, element);
      if (reference != null)
        activePage.bringToTop(reference.getPart(true));
    }
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

        break;
      }

        /* Close Others */
      case CLOSE_OTHERS: {
        IWorkbenchPage page = fWindow.getActivePage();
        if (page != null) {
          IEditorReference[] refArray = page.getEditorReferences();
          if (refArray != null && refArray.length > 1) {
            IEditorReference[] otherEditors = new IEditorReference[refArray.length - 1];
            IEditorReference activeEditor = (IEditorReference) page.getReference(page.getActiveEditor());
            for (int i = 0; i < refArray.length; i++) {
              if (refArray[i] != activeEditor)
                continue;
              System.arraycopy(refArray, 0, otherEditors, 0, i);
              System.arraycopy(refArray, i + 1, otherEditors, i, refArray.length - 1 - i);
              break;
            }
            page.closeEditors(otherEditors, true);
          }
        }
        break;
      }

View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

  /**
   * TODO Find a better solution once its possible to add listeners to
   * {@link IPreferenceScope} and then listen to changes of display-properties.
   */
  public static void updateFilterAndGrouping() {
    IWorkbenchPage page = OwlUI.getPage();
    if (page != null) {
      IEditorReference[] editorReferences = page.getEditorReferences();
      for (IEditorReference reference : editorReferences) {
        try {
          IEditorInput editorInput = reference.getEditorInput();
          if (editorInput instanceof FeedViewInput) {
            FeedView feedView = (FeedView) reference.getEditor(true);
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

  /**
   * TODO Find a better solution once its possible to add listeners to
   * {@link IPreferenceScope} and then listen to changes of column-properties.
   */
  public static void updateColumns() {
    IWorkbenchPage page = OwlUI.getPage();
    if (page != null) {
      IEditorReference[] editorReferences = page.getEditorReferences();
      for (IEditorReference reference : editorReferences) {
        try {
          IEditorInput editorInput = reference.getEditorInput();
          if (editorInput instanceof FeedViewInput) {
            FeedView feedView = (FeedView) reference.getEditor(true);
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

   *
   * @return the first active <code>IEditorPart</code> from the PlatformUI
   * facade or <code>NULL</code> if none.
   */
  public static IEditorPart getActiveEditor() {
    IWorkbenchPage page = getPage();
    if (page != null)
      return page.getActiveEditor();

    return null;
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

  /**
   * @return a list of all editors currently open in the UI as references.
   */
  public static List<IEditorReference> getEditorReferences() {
    IWorkbenchPage page = getPage();
    if (page != null) {
      IEditorReference[] references = page.getEditorReferences();
      return Arrays.asList(references);
    }

    return Collections.emptyList();
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

   *
   * @return the first active <code>FeedView</code> from the PlatformUI facade
   * or <code>NULL</code> if none.
   */
  public static FeedView getActiveFeedView() {
    IWorkbenchPage page = getPage();
    if (page != null) {
      IEditorPart activeEditor = page.getActiveEditor();
      if (activeEditor != null && activeEditor instanceof FeedView)
        return (FeedView) activeEditor;
    }

    return null;
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage

   *
   * @return the selection from the first active <code>Part</code> from the
   * PlatformUI facade or <code>StructuredSelection.EMPTY</code> if none.
   */
  public static IStructuredSelection getActiveSelection() {
    IWorkbenchPage page = getPage();
    if (page != null) {
      IWorkbenchPart part = page.getActivePart();
      if (part != null && part.getSite() != null) {
        ISelectionProvider selectionProvider = part.getSite().getSelectionProvider();
        if (selectionProvider != null) {
          ISelection selection = selectionProvider.getSelection();
          if (!selection.isEmpty() && selection instanceof IStructuredSelection)
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.