Examples of IWorkbenchSiteProgressService


Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

      finally {
        // so we don't freeze workbench (eg. during page language or
        // content type change)
        ((ITextViewerExtension) getSourceViewer()).setRedraw(true);
       
        IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
        if (service != null) {
          service.warnOfContentChange();
        }
      }
    }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

public class ResourceActionDelegate implements IActionDelegate {
  protected IStructuredSelection fSelection;

  private IWorkbenchSiteProgressService getActiveProgressService() {
    IWorkbenchSiteProgressService service = null;
    if (PlatformUI.isWorkbenchRunning()) {
      IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      if (activeWorkbenchWindow != null) {
        IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
        if (activePage != null) {
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

   */
  public void run(IAction action) {
    if (fSelection != null && !fSelection.isEmpty()) {
      Job job = getJob();
      if (job != null) {
        IWorkbenchSiteProgressService progressService = getActiveProgressService();
        if (progressService != null) {
          progressService.schedule(job);
        }
        else {
          job.schedule();
        }
      }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

      finally {
        // so we don't freeze workbench (eg. during page language or
        // content type change)
        ((ITextViewerExtension) getSourceViewer()).setRedraw(true);
       
        IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
        if (service != null) {
          service.warnOfContentChange();
        }
      }
    }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

  public void dispose() {
    // nulling out just in case
  }
 
  private IWorkbenchSiteProgressService getActiveProgressService() {
    IWorkbenchSiteProgressService service = null;
    if (PlatformUI.isWorkbenchRunning()) {
      IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      if (activeWorkbenchWindow != null) {
        IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
        if (activePage != null) {
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

    }
   
    if (fSelection != null && !fSelection.isEmpty()) {
      Job job = getJob();
      if (job != null) {
        IWorkbenchSiteProgressService progressService = getActiveProgressService();
        if (progressService != null) {
          progressService.schedule(job);
        }
        else {
          job.schedule();
        }
      }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

  private void updatePage(final IPage page, final Preference preference) {
    Job job = page.updateJob(preference);
    if (job == null)
      return;
   
    IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService)
        getSite().getService(IWorkbenchSiteProgressService.class);
   
    service.schedule(job);
  }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

        if (currentEditor != null) {
            IFile file = ((FileEditorInput) (currentEditor.getEditorInput())).getFile();
            Job job = new ClearMarkersJob(file, Arrays.asList(new WorkItem[] { new WorkItem(file) }));
            job.setUser(true);
            job.setPriority(Job.INTERACTIVE);
            IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) currentEditor.getEditorSite().getService(
                    IWorkbenchSiteProgressService.class);
            service.schedule(job);
        }
    }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

     * Get the IWorkbenchSiteProgressService for the receiver.
     *
     * @return IWorkbenchSiteProgressService or <code>null</code>.
     */
    protected IWorkbenchSiteProgressService getProgressService() {
        IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getAdapter(
                IWorkbenchSiteProgressService.class);
        return service;
    }
View Full Code Here

Examples of org.eclipse.ui.progress.IWorkbenchSiteProgressService

   * @see org.eclipse.ui.console.IConsoleView#warnOfContentChange(org.eclipse.ui.console.IConsole)
   */
  public void warnOfContentChange(IConsole console) {
    IWorkbenchPart part = (IWorkbenchPart)fConsoleToPart.get(console);
    if (part != null) {
      IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) part.getSite().getAdapter(IWorkbenchSiteProgressService.class);
      if (service != null) {
        service.warnOfContentChange();
      }
    }
  }
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.