Package org.eclipse.core.runtime

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


                    if (baseProject == null) {
                        subMonitor.subTask("Creating Project...");
                        project.create(subMonitor.newChild(50));

                        subMonitor.subTask("Opening Project...");
                        project.open(subMonitor.newChild(50));
                    } else {
                        subMonitor.subTask("Copying Project...");
                        baseProject.copy(project.getFullPath(), true,
                            subMonitor.newChild(100));
View Full Code Here


                        project.create(subMonitor.newChild(50));

                        subMonitor.subTask("Opening Project...");
                        project.open(subMonitor.newChild(50));
                    } else {
                        subMonitor.subTask("Copying Project...");
                        baseProject.copy(project.getFullPath(), true,
                            subMonitor.newChild(100));
                    }
                } catch (Exception e) {
                    throw new RuntimeException(e.getCause());
View Full Code Here

    int work = 100;

    SubMonitor subM = SubMonitor.convert(monitor, work);
    subM.setTaskName("Validating precondition");

    subM.subTask("Checking active project");
    updateActiveProject();
    if(this.active_prj == null || !this.active_prj.exists()) {
      XVRUtils.displayError("No project selected to be launched.");
      if(mode.equals(ILaunchManager.DEBUG_MODE))
        XVRUtils.setDebugSession(false);
View Full Code Here

            monitor.beginTask(Messages.SendFileAction_monitor_set_up_session_text, 101);

            setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);

            log.info("Asking " + user + " to accept our transfer."); //$NON-NLS-1$ //$NON-NLS-2$
            monitor.subTask(MessageFormat.format(Messages.SendFileAction_monitor_notifying_text,
                user.getHumanReadableName()));
            try {
                setStreamSession(streamServiceManager.createSession(
                    sendFileService, user,
                    FileDescription.fromFile(fileToSend), null));
View Full Code Here

            } catch (TimeoutException e) {
                errorPopup(getName(), Messages.SendFileAction_error_timed_out_text,
                    e, monitor);
                return Status.CANCEL_STATUS;
            } catch (ExecutionException e) {
                monitor.subTask(MessageFormat.format(Messages.SendFileAction_unexpected_error,
                    e.getMessage()));
                log.error("Unexpected error: ", e); //$NON-NLS-1$
                return new Status(IStatus.ERROR, Saros.SAROS,
                    Messages.SendFileAction_status_could_not_create_session_text, e);
            } catch (InterruptedException e) {
View Full Code Here

            try {
                send(getStreamSession(), fileToSend,
                    monitor.newChild(100, SubMonitor.SUPPRESS_SETTASKNAME));

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

                    return new Status(IStatus.ERROR, Saros.SAROS,
                        "Error while sending file", e); //$NON-NLS-1$
                } 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, 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, streamException);
                }
            } catch (RemoteCancellationException e) {
                monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                return Status.CANCEL_STATUS;
            } catch (SarosCancellationException e) {
                monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                return Status.CANCEL_STATUS;
            } finally {
View Full Code Here

                }
            } catch (RemoteCancellationException e) {
                monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                return Status.CANCEL_STATUS;
            } catch (SarosCancellationException e) {
                monitor.subTask(Messages.SendFileAction_monitor_canceled_text);
                return Status.CANCEL_STATUS;
            } finally {
                readyToStop.countDown();
                monitor.done();
            }
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.