Package org.eclipse.jface.operation

Examples of org.eclipse.jface.operation.IRunnableWithProgress


        for (IService service : services) {
            final IService runService = service;
           
            try {
                getContainer().run(false, true,
                        new IRunnableWithProgress(){

                            public void run(IProgressMonitor monitor)
                                    throws InvocationTargetException, InterruptedException {
                                monitor.beginTask(Messages.Wizard_WW_Connecting, IProgressMonitor.UNKNOWN);
               
View Full Code Here


        if ( getActivePage() == 1 ) {
            boolean reteFailed = false;
            graph = null;
            try {
                final String contents = textEditor.getDocumentProvider().getDocument( getEditorInput() ).get();
                final IRunnableWithProgress runnable = new IRunnableWithProgress() {

                    public void run(IProgressMonitor monitor) throws InvocationTargetException,
                                                             InterruptedException {
                        try {
                            graph = reteViewer.loadReteModel( monitor,
View Full Code Here

    void done(String [] fileNames);
  }

  private void getConfigurationFiles(final IProject project, final GetConfigurationFilesCallback callback) {
    try {
      PlatformUI.getWorkbench().getProgressService().run(true, false, new IRunnableWithProgress() {
        @SuppressWarnings("unused")
        @Override
        public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
          monitor.beginTask("Retrieving configuration files for " + project.getName(), IProgressMonitor.UNKNOWN);
          synchronized (projectPathToAbsolutePath) {
View Full Code Here

    Shell parent = getWorkbenchWindow().getShell();
    progressDialog = new TimeTriggeredProgressMonitorDialog(parent,
        getWorkbenchWindow().getWorkbench().getProgressService()
            .getLongOperationTime());
    IRunnableWithProgress runnable = new IRunnableWithProgress() {
      public void run(IProgressMonitor pm)
          throws InvocationTargetException {
        try {
          runCommand(pm);
        } catch (ExecutionException e) {
View Full Code Here

    if (saveable instanceof ISaveablesSource) {
      return saveModels((ISaveablesSource) saveable, window, confirm);
    }

    // Create save block.
    IRunnableWithProgress progressOp = new IRunnableWithProgress() {
      public void run(IProgressMonitor monitor) {
        IProgressMonitor monitorWrap = new EventLoopProgressMonitor(monitor);
        saveable.doSave(monitorWrap);
      }
    };
View Full Code Here

    if (dirtyModels.isEmpty()) {
      return true;
    }
   
    // Create save block.
    IRunnableWithProgress progressOp = new IRunnableWithProgress() {
      public void run(IProgressMonitor monitor) {
        IProgressMonitor monitorWrap = new EventLoopProgressMonitor(monitor);
        monitorWrap.beginTask(WorkbenchMessages.Save, dirtyModels.size());
        for (Iterator i = dirtyModels.iterator(); i.hasNext();) {
          Saveable model = (Saveable) i.next();
View Full Code Here

        return (choice==USER_RESPONSE?ISaveablePart2.DEFAULT:choice);
      }
    }

    // Create save block.
    IRunnableWithProgress progressOp = new IRunnableWithProgress() {
      public void run(IProgressMonitor monitor) {
        IProgressMonitor monitorWrap = new EventLoopProgressMonitor(monitor);
        saveable.doSave(monitorWrap);
      }
    };
View Full Code Here

   */
  static boolean runProgressMonitorOperation(String opName,
      final IRunnableWithProgress progressOp,
      final IRunnableContext runnableContext, final IShellProvider shellProvider) {
    final boolean[] success = new boolean[] { false };
    IRunnableWithProgress runnable = new IRunnableWithProgress() {
      public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        progressOp.run(monitor);
        // Only indicate success if the monitor wasn't canceled
        if (!monitor.isCanceled())
          success[0] = true;
View Full Code Here

   * @return true if the user canceled.
   */
  public static boolean waitForBackgroundSaveJobs(final List modelsToSave) {
    // block if any of the saveables is still saving in the background
    try {
      PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) throws InterruptedException {
          Job.getJobManager().join(new DynamicFamily(modelsToSave), monitor);
        }
      });
    } catch (InvocationTargetException e) {
View Full Code Here

    final OutputStream os =
        new BufferedOutputStream(new FileOutputStream(localFile));

    try {
      PlatformUI.getWorkbench().getProgressService().busyCursorWhile(
          new IRunnableWithProgress() {
            public void run(IProgressMonitor monitor)
                throws InvocationTargetException {
              try {
                monitor.beginTask("View file from Distributed File System",
                    IProgressMonitor.UNKNOWN);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.operation.IRunnableWithProgress

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.