Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.MultiStatus


  public void openErrorDialog(Shell shell) {
    try {
      getCause().printStackTrace();
      String msg = getCause().getMessage();
      msg = msg == null ? "" : msg;
      MultiStatus status = new MultiStatus(PLUGIN_ID, Status.ERROR, getCustomStackTrace(), msg,
              getCause());
      ErrorDialog.openError(shell, "Project Customization Error", getMessage()
              + " \nPlease see the details (below).", status, 0xFFFF);
    } catch (Throwable th) {
      th.printStackTrace();
View Full Code Here


  public void openErrorDialog(Shell shell) {
    try {
      getCause().printStackTrace();
      String msg = getCause().getMessage();
      msg = msg == null ? "" : msg; //$NON-NLS-1$
      MultiStatus status = new MultiStatus(PLUGIN_ID, IStatus.ERROR, getCustomStackTrace(), msg,
              getCause());
      ErrorDialog.openError(shell, "Operation Error", getMessage()
              + " \nPlease see the details (below).", status, 0xFFFF);
    } catch (Throwable th) {
      th.printStackTrace();
View Full Code Here

  public void openErrorDialog(Shell shell) {
    try {
      getCause().printStackTrace();
      String msg = getCause().getMessage();
      msg = msg == null ? "" : msg; //$NON-NLS-1$
      MultiStatus status = new MultiStatus(PLUGIN_ID, IStatus.ERROR, getCustomStackTrace(), msg,
              getCause());
      ErrorDialog.openError(shell, "Operation Error", getMessage()
              + " \nPlease see the details (below).", status, 0xFFFF);
    } catch (Throwable th) {
      th.printStackTrace();
View Full Code Here

        IStatus[] subStatuses = new IStatus[exceptions.size()];
        for (int i = 0 ; i < subStatuses.length; i++) {
          subStatuses[i] = new Status(IStatus.ERROR, ChromiumDebugPlugin.PLUGIN_ID,
              exceptions.get(i).getMessage(), exceptions.get(i));
        }
        status = new MultiStatus(ChromiumDebugPlugin.PLUGIN_ID, IStatus.ERROR, subStatuses,
            "Breakpoint synchronization errors", null); //$NON-NLS-1$
      }
      if (callback != null) {
        callback.onDone(status);
      }
View Full Code Here

        return asyncChanges.isEmpty() ? null : (IProject) asyncChanges.remove(asyncChanges.size() - 1);
      }
    }

    protected IStatus run(IProgressMonitor monitor) {
      MultiStatus result = new MultiStatus(JSPFContentProperties.JSPCORE_ID, IResourceStatus.FAILED_SETTING_CHARSET, JSPCoreMessages.JSPFContentPropertiesManager_Updating, null);
      monitor = monitor == null ? new NullProgressMonitor() : monitor;
      try {
        monitor.beginTask(JSPCoreMessages.JSPFContentPropertiesManager_Updating, asyncChanges.size());
        try {
          IProject next;
          while ((next = getNextChange()) != null) {
            // just exit if the system is shutting down or has
            // been shut down
            // it is too late to change the workspace at this
            // point anyway
            if (Platform.getBundle("org.eclipse.osgi").getState() != Bundle.ACTIVE) //$NON-NLS-1$
              return Status.OK_STATUS;
            try {
              // save the preferences nodes
              if (next.isAccessible()) {
                // save content type preferences
                Preferences projectPrefs = JSPFContentProperties.getPreferences(next, JSPFContentProperties.JSPCONTENTTYPE, false);
                if (projectPrefs != null)
                  projectPrefs.flush();
                // save language preferences
                projectPrefs = JSPFContentProperties.getPreferences(next, JSPFContentProperties.JSPLANGUAGE, false);
                if (projectPrefs != null)
                  projectPrefs.flush();

              }
            }
            catch (BackingStoreException e) {
              // we got an error saving
              String detailMessage = NLS.bind(JSPCoreMessages.JSPFContentPropertiesManager_Problems_Updating, next.getFullPath());
              result.add(new Status(1 << (IResourceStatus.FAILED_SETTING_CHARSET % 100 / 33), ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_SETTING_CHARSET, detailMessage, e));
            }
          }
          monitor.worked(1);
        }
        catch (OperationCanceledException e) {
View Full Code Here

        return asyncChanges.isEmpty() ? null : (IProject) asyncChanges.remove(asyncChanges.size() - 1);
      }
    }

    protected IStatus run(IProgressMonitor monitor) {
      MultiStatus result = new MultiStatus(HTMLContentProperties.HTMLCORE_ID, IResourceStatus.FAILED_SETTING_CHARSET, HTMLCoreMessages.HTMLContentPropertiesManager_Updating, null);
      monitor = monitor == null ? new NullProgressMonitor() : monitor;
      try {
        monitor.beginTask(HTMLCoreMessages.HTMLContentPropertiesManager_Updating, asyncChanges.size());
        try {
          IProject next;
          while ((next = getNextChange()) != null) {
            // just exit if the system is shutting down or has
            // been shut down
            // it is too late to change the workspace at this
            // point anyway
            if (Platform.getBundle("org.eclipse.osgi").getState() != Bundle.ACTIVE) //$NON-NLS-1$
              return Status.OK_STATUS;
            try {
              // save the preferences nodes
              if (next.isAccessible()) {
                // save document type preferences
                Preferences projectPrefs = HTMLContentProperties.getPreferences(next, HTMLContentProperties.DOCUMENT_TYPE, false);
                if (projectPrefs != null)
                  projectPrefs.flush();
              }
            }
            catch (BackingStoreException e) {
              // we got an error saving
              String detailMessage = NLS.bind(HTMLCoreMessages.HTMLContentPropertiesManager_Problems_Updating, next.getFullPath());
              result.add(new Status(1 << (IResourceStatus.FAILED_SETTING_CHARSET % 100 / 33), ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_SETTING_CHARSET, detailMessage, e));
            }
          }
          monitor.worked(1);
        }
        catch (OperationCanceledException e) {
View Full Code Here

                public Boolean call() {

                    String message = Messages.AddProjectToSessionWizard_synchronize_projects;

                    String PID = Saros.SAROS;
                    MultiStatus info = new MultiStatus(PID, 1, message, null);
                    for (String projectName : everyThing.keySet()) {
                        FileListDiff diff = everyThing.get(projectName);
                        info.add(new Status(
                            IStatus.INFO,
                            PID,
                            1,
                            MessageFormat
                                .format(
                                    Messages.AddProjectToSessionWizard_files_affected,
                                    projectName), null));
                        for (IPath path : diff.getRemovedPaths()) {
                            info.add(new Status(
                                IStatus.WARNING,
                                PID,
                                1,
                                MessageFormat
                                    .format(
                                        Messages.AddProjectToSessionWizard_file_toRemove,
                                        path.toOSString()), null));
                        }
                        for (IPath path : diff.getAlteredPaths()) {
                            info.add(new Status(
                                IStatus.WARNING,
                                PID,
                                1,
                                MessageFormat
                                    .format(
                                        Messages.AddProjectToSessionWizard_file_overwritten,
                                        path.toOSString()), null));
                        }
                        for (IPath path : diff.getAddedPaths()) {
                            info.add(new Status(
                                IStatus.INFO,
                                PID,
                                1,
                                MessageFormat
                                    .format(
                                        Messages.AddProjectToSessionWizard_file_added,
                                        path.toOSString()), null));
                        }
                        info.add(new Status(IStatus.INFO, PID, 1, "", null)); //$NON-NLS-1$
                    }
                    return new OverwriteErrorDialog(
                        getShell(),
                        Messages.AddProjectToSessionWizard_delete_local_changes,
                        null, info).open() == IDialogConstants.OK_ID;
View Full Code Here

    IStatus status = null;
    if (errors.size() > 0) {
      Shell shell = editor.getSite().getShell();
      if (errors.size() > 1) {
        status = new MultiStatus(SSEUIPlugin.ID, IStatus.OK, (IStatus[]) errors.toArray(new IStatus[0]), SSEUIMessages.ManageBreakpoints_error_adding_message1, null); //$NON-NLS-1$
      }
      else {
        status = (IStatus) errors.get(0);
      }
      if ((status.getSeverity() > IStatus.INFO) || (Platform.inDebugMode() && !status.isOK())) {
View Full Code Here

      }
      monitor.done();

      if (fErrorStatus.getChildren().length > 0) {
        status = fErrorStatus;
        fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIMessages.FormatActionDelegate_errorStatusMessage, null); //$NON-NLS-1$
      }

      return status;
    }
View Full Code Here

      }
      monitor.done();

      if (fErrorStatus.getChildren().length > 0) {
        status = fErrorStatus;
        fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIMessages.FormatActionDelegate_errorStatusMessage, null); //$NON-NLS-1$
      }

      return status;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.MultiStatus

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.