Examples of findView()


Examples of org.eclipse.ui.IWorkbenchPage.findView()

   * none.
   */
  public static IFolder getBookMarkExplorerSelection() {
    IWorkbenchPage page = getPage();
    if (page != null) {
      IViewPart viewPart = page.findView(BookMarkExplorer.VIEW_ID);
      if (viewPart != null) {
        IStructuredSelection selection = (IStructuredSelection) viewPart.getSite().getSelectionProvider().getSelection();
        if (!selection.isEmpty()) {
          Object selectedEntity = selection.iterator().next();
          if (selectedEntity instanceof IFolder)
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

   * Switch between showing and hiding the Bookmarks View.
   */
  public static void toggleBookmarks() {
    IWorkbenchPage page = OwlUI.getPage();
    if (page != null) {
      IViewPart explorerView = page.findView(BookMarkExplorer.VIEW_ID);

      /* Hide Bookmarks */
      if (explorerView != null)
        page.hideView(explorerView);

View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

        manager.add(new Action("Bookmarks", IAction.AS_CHECK_BOX) {
          @Override
          public void run() {
            IWorkbenchPage page = OwlUI.getPage();
            if (page != null) {
              IViewPart explorerView = page.findView(BookMarkExplorer.VIEW_ID);

              /* Hide Bookmarks */
              if (explorerView != null)
                page.hideView(explorerView);

View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

          @Override
          public boolean isChecked() {
            IWorkbenchPage page = OwlUI.getPage();
            if (page != null)
              return page.findView(BookMarkExplorer.VIEW_ID) != null;

            return false;
          }
        });
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

   * none.
   */
  public static IFolder getBookMarkExplorerSelection() {
    IWorkbenchPage page = getPage();
    if (page != null) {
      IViewPart viewPart = page.findView(BookMarkExplorer.VIEW_ID);
      if (viewPart != null) {
        IStructuredSelection selection = (IStructuredSelection) viewPart.getSite().getSelectionProvider().getSelection();
        if (!selection.isEmpty()) {
          Object selectedEntity = selection.iterator().next();
          if (selectedEntity instanceof IFolder)
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

          @Override
          public boolean isChecked() {
            IWorkbenchPage page = OwlUI.getPage();
            if (page != null)
              return page.findView(BookMarkExplorer.VIEW_ID) != null;

            return false;
          }
        });
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    MeclipseView view = (MeclipseView) page.findView(MeclipseView.ID);
    // Get the selection
    IStructuredSelection selection = (IStructuredSelection) view
        .getViewer().getSelection();

    if (selection != null && selection instanceof IStructuredSelection) {
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

    final IActionDelegate delegate = getDelegate();
    final IAction action = getAction();

    // Check to see if the view delegate should be initialized.
    if ((viewId != null) && (page != null) && (viewDelegate != null)) {
      final IViewPart viewPart = page.findView(viewId);
      if (viewPart == null) {
        return false;
      }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

          objectDelegate.setActivePart(action, activePart);
        } else if (editorDelegate != null) {
          editorDelegate.setActiveEditor(action, activeEditor);
        } else if ((viewId != null) && (page != null)
            && (viewDelegate != null)) {
          final IViewPart viewPart = page.findView(viewId);
          viewDelegate.init(viewPart);
        } else if (windowDelegate != null) {
          windowDelegate.init(window);
        }
      }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPage.findView()

       * view ready yet. If not, then we'll have to wait.
       */
      if (viewId != null) {
        final IWorkbenchPage activePage = window.getActivePage();
        if (activePage != null) {
          final IViewPart part = activePage.findView(viewId);
          if (part == null) {
            return false;
          }
        } else {
          return false;
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.