Package org.eclipse.ui

Examples of org.eclipse.ui.IViewPart


      try {
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        if (window != null) {
          IWorkbenchPage page = window.getActivePage();
          if (page != null) {
            IViewPart view = null;
            if (marker.isSubtypeOf(IMarker.PROBLEM)) {
              view = page.findView(IPageLayout.ID_PROBLEM_VIEW);
            }
            else if (marker.isSubtypeOf(IMarker.TASK)) {
              view = page.findView(IPageLayout.ID_TASK_LIST);
            }
            else if (marker.isSubtypeOf(IMarker.BOOKMARK)) {
              view = page.findView(IPageLayout.ID_BOOKMARKS);
            }
//            else if (marker.isSubtypeOf(IBreakpoint.BREAKPOINT_MARKER)) {
//              view = page.findView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
//            }
           
            if (view == null) {
              view = page.findView("org.eclipse.ui.views.AllMarkersView");
            }
            // If the view isn't open on this perspective, don't
            // interact with it
            if (view != null) {
              Method method = view.getClass().getMethod("setSelection", new Class[]{IStructuredSelection.class, boolean.class}); //$NON-NLS-1$
              if (method != null) {
                method.invoke(view, new Object[]{new StructuredSelection(marker), Boolean.TRUE});
                page.bringToTop(view);
              }
            }
View Full Code Here


    if (fSelectionProvider != null) {
      IWorkbenchWindow window = SSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
      IWorkbenchPage page = window.getActivePage();
      if (page != null) {
        IViewPart findView = page.findView(getViewID());
        if (findView instanceof ISelectionListener && fPart != null) {
          ((ISelectionListener) findView).selectionChanged(fPart, fSelectionProvider.getSelection());
        }
        else {
          findView.getViewSite().getSelectionProvider().setSelection(fSelectionProvider.getSelection());
        }
      }
    }
  }
View Full Code Here

    }
  }

  protected void internalRun(IJavaProject project) {
    try {
      IViewPart showView = PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage()
          .showView("com.onpositive.gae.baseviewer.dataviewa");
      if (showView instanceof DataViewPart) {
        DataViewPart p = (DataViewPart) showView;
        p.setProject(project);
View Full Code Here

    return null;
  }

  public static InfoTableView getInfoTableView(String id)
  {
    IViewPart v;
    try
    {
      IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
      if (windows.length > 0)
      {
View Full Code Here

    public void stopServer() {
        logViewController.stopServer();
    }

    public IViewPart openView(final String viewId) {
        IViewPart view = null;

        try {
            IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            view = workbenchPage.findView(viewId);
View Full Code Here

            }

            if ( entry != null )
            {
                String targetId = BrowserView.getId();
                IViewPart targetView = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(
                    targetId );
                if ( targetView == null )
                {
                    try
                    {
View Full Code Here

    public void run()
    {
        if ( getSelectedSearchResults().length == 1 )
        {
            String targetId = BrowserView.getId();
            IViewPart targetView = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(
                targetId );
            if ( targetView == null )
            {
                try
                {
View Full Code Here

            }

            if ( entry != null )
            {
                String targetId = BrowserView.getId();
                IViewPart targetView = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(
                    targetId );
                if ( targetView == null )
                {
                    try
                    {
View Full Code Here

    IWorkbenchWindow wbwin = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IViewReference[] vr = wbwin.getActivePage().getViewReferences();

    for (int i = 0; i < vr.length; i++)
      {
      IViewPart vp = vr[i].getView(true);

      if (vp instanceof DBStructView)
        {
        ((DBStructView) vp).restart();
        }
View Full Code Here

    IViewReference[] ivrt = iwp.getViewReferences();

    for (IViewReference ivrf : ivrt)
      {
      IViewPart ivpart = ivrf.getView(false);

      if (ivpart instanceof DataUpdatable)
        {
        ((DataUpdatable) ivpart).refresh(subject, clientData);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IViewPart

Copyright © 2018 www.massapicom. 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.