Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubMonitor.subTask()


                File file;
                try {
                    file = saveFile(fileDescription.name,
                        monitor.newChild(1, SubMonitor.SUPPRESS_SETTASKNAME));
                } catch (SarosCancellationException e) {
                    monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                    return Status.CANCEL_STATUS;
                }

                monitor.setTaskName(Messages.SendFileAction_monitor_receiving_text);
View Full Code Here


                monitor.setTaskName(Messages.SendFileAction_monitor_receiving_text);

                FileOutputStream fileOutputStream;
                try {
                    monitor.subTask(Messages.SendFileAction_monitor_opening_text);
                    fileOutputStream = new FileOutputStream(file);
                    monitor.worked(1);
                } catch (FileNotFoundException e) {
                    errorPopup(Messages.SendFileAction_error_cannot_open_file_title,
                        Messages.SendFileAction_error_cannot_open_file_message,
View Full Code Here

                try {
                    receive(getStreamSession(), fileOutputStream,
                        monitor.newChild(100, SubMonitor.SUPPRESS_SETTASKNAME));
                } catch (RemoteCancellationException e) {
                    monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                    return Status.CANCEL_STATUS;
                } catch (IOException e) {
                    if (stopped) {
                        // interrupted IO
                        monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
View Full Code Here

                    monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                    return Status.CANCEL_STATUS;
                } catch (IOException e) {
                    if (stopped) {
                        // interrupted IO
                        monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                        return Status.CANCEL_STATUS;
                    }
                    if (streamException == null) {
                        // plain IOE
                        log.error("Error while receiving file: ", e); //$NON-NLS-1$
View Full Code Here

                        return new Status(IStatus.ERROR, Saros.SAROS,
                            Messages.SendFileAction_error_receiving_file_text, e);
                    } else {
                        // IOE because stream is down
                        if (streamException instanceof ReceiverGoneException) {
                            monitor.subTask(Messages.SendFileAction_monitor_receiver_left_during_transfer_text);
                            return Status.CANCEL_STATUS;
                        }
                        if (streamException instanceof ConnectionException) {
                            monitor.subTask(Messages.SendFileAction_monitor_lost_connection_text);
                            return Status.CANCEL_STATUS;
View Full Code Here

                        if (streamException instanceof ReceiverGoneException) {
                            monitor.subTask(Messages.SendFileAction_monitor_receiver_left_during_transfer_text);
                            return Status.CANCEL_STATUS;
                        }
                        if (streamException instanceof ConnectionException) {
                            monitor.subTask(Messages.SendFileAction_monitor_lost_connection_text);
                            return Status.CANCEL_STATUS;
                        }
                        log.error("Unexpected error: ", streamException); //$NON-NLS-1$
                        return new Status(IStatus.ERROR, Saros.SAROS,
                            Messages.SendFileAction_status_unexpected_error_text, streamException);
View Full Code Here

                        log.error("Unexpected error: ", streamException); //$NON-NLS-1$
                        return new Status(IStatus.ERROR, Saros.SAROS,
                            Messages.SendFileAction_status_unexpected_error_text, streamException);
                    }
                } catch (SarosCancellationException e) {
                    monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                    return Status.CANCEL_STATUS;
                }

            } finally {
                if (!stopped && streamException == null)
View Full Code Here

    final IProject prj = getProject();
    SubMonitor buildMonitor = SubMonitor.convert(monitor, "Building project " + prj.getName(), 50);
   
    //Save all changes
    buildMonitor.subTask("Saving editors");
    Display.getDefault().syncExec(new Runnable() { // save all editors needs to be called by the ui thread!
      @Override
      public void run() {
        IDE.saveAllEditors(new IResource[]{prj}, !XVRUtils.getBooleanPreference(PreferenceConstants.GEN_AUTO_SAVE_ON_BUILD));
      }
View Full Code Here

        IDE.saveAllEditors(new IResource[]{prj}, !XVRUtils.getBooleanPreference(PreferenceConstants.GEN_AUTO_SAVE_ON_BUILD));
      }
    });
   
    buildMonitor.worked(30);
    buildMonitor.subTask("compiling");

    List<String> compilerArgs = new ArrayList<String>();

    compilerArgs.add(this.compiler_path);
View Full Code Here

        if (! fParsedElements.contains(cu)) {
            sLogger.debug("Processing compilation unit " + cu.getElementName() + ": " + cu.getPath());
   
            SubMonitor progress = SubMonitor.convert(monitor, 100);
            progress.subTask("File " + cu.getElementName());
   
            try {
                status = fAnalyzer.analyze(cu, progress);
   
                if (fAnalyzer.getUnresolvedCalls().size() > 0) {
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.