Package org.eclipse.ui

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


        return loader.loadBugResolutions();
    }

    public static void showMarker(IMarker marker, String viewId, IWorkbenchPart source) {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IViewPart view = page.findView(viewId);
        if (!page.isPartVisible(view)) {
            try {
                view = page.showView(viewId);
            } catch (PartInitException e) {
                FindbugsPlugin.getDefault().logException(e, "Could not open view: " + viewId);
View Full Code Here


    MultiStatus result = new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK,
        WorkbenchMessages.WorkbenchWindow_problemsSavingWindow, null);

    IWorkbenchPage activePage = window.getActivePage();
    if (activePage != null
        && activePage.findView(IIntroConstants.INTRO_VIEW_ID) != null) {
      IMemento introMem = memento
          .createChild(IWorkbenchConstants.TAG_INTRO);
      boolean isStandby = getWorkbench()
          .getIntroManager()
          .isIntroStandby(getWorkbench().getIntroManager().getIntro());
View Full Code Here

    memento.putInteger(IWorkbenchConstants.TAG_WIDTH, normalBounds.width);
    memento.putInteger(IWorkbenchConstants.TAG_HEIGHT, normalBounds.height);

    IWorkbenchPage activePage = getActivePage();
    if (activePage != null
        && activePage.findView(IIntroConstants.INTRO_VIEW_ID) != null) {
      IMemento introMem = memento
          .createChild(IWorkbenchConstants.TAG_INTRO);
      boolean isStandby = getWorkbench()
          .getIntroManager()
          .isIntroStandby(getWorkbench().getIntroManager().getIntro());
View Full Code Here

     * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
     */
    protected void execute(IAction action) throws InvocationTargetException,
            InterruptedException {
        IWorkbenchPage perspective = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IWorkbenchPart workbenchPart = perspective.findView("net.sf.cvschangelog.view.ChangeLogView");       
        if (workbenchPart == null) {
            workbenchPart = perspective.getActivePart();
        }
        if (!selection.isEmpty()) {
            Object adapter = CVSAction.getAdapter(selection.getFirstElement(), IResource.class);
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    IViewPart view = page.findView(LogResourcesView.ID);
    // Get the selection
    ISelection selection = view.getSite().getSelectionProvider()
        .getSelection();
    if ((selection != null) && (selection instanceof IStructuredSelection)) {
      // Collect for multi status
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    IViewPart view = page.findView(LogResourcesView.ID);
    // Get the selection
    ISelection selection = view.getSite().getSelectionProvider()
        .getSelection();
    if ((selection != null) && (selection instanceof IStructuredSelection)) {
      if (!MessageDialog.openQuestion(Display.getDefault().getActiveShell(),
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    IViewPart view = page.findView(LogResourcesView.ID);
    // Get the selection
    ISelection selection = view.getSite().getSelectionProvider()
        .getSelection();
    if ((selection != null) && (selection instanceof IStructuredSelection)) {
      if (!MessageDialog.openQuestion(Display.getDefault().getActiveShell(),
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Get the view early (avoid NPE on Linux)
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    IViewPart view = page.findView(LogResourcesView.ID);
   
    Collection<ILogDialectFactory> dialectFactories = null;
    try {
      dialectFactories = CorePlugin.getDefault().getLogDialectFactories();
    } catch (CoreException e) {
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    IViewPart view = page.findView(LogResourcesView.ID);
    // Get the selection
    ISelection selection = view.getSite().getSelectionProvider()
        .getSelection();
    if ((selection != null) && (selection instanceof IStructuredSelection)) {
      Object obj = ((IStructuredSelection) selection).getFirstElement();
View Full Code Here

        public IStatus runInUIThread(IProgressMonitor monitor) {
          IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          if (window != null) {
            IWorkbenchPage page= window.getActivePage();
            if (page != null) {
              IConsoleView consoleView= (IConsoleView)page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
              if (consoleView != null) {
                consoleView.warnOfContentChange(console);
              }
            }
          } 
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.