Examples of IStatus


Examples of org.eclipse.core.runtime.IStatus

        /* Perform the Operation if not yet Cancelled */
        if (!monitor.isCanceled()) {
          SafeRunner.run(new LoggingSafeRunnable() {
            public void run() throws Exception {
              fCurrentTask = task.getName();
              IStatus status = task.run(monitor);

              /* Log anything that is an Error or Warning */
              if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.WARNING)
                Activator.getDefault().getLog().log(status);
            }
          });

          /* Update Work Fields if not cancelled meanwhile */
 
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

      fShell = shell;
      fPriority = priority;
    }

    public IStatus run(IProgressMonitor monitor) {
      IStatus status = reload(fBookMark, fShell, monitor);
      return status;
    }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    /* Support Keybindings for assigning Labels */
    defineLabelCommands(CoreUtils.loadSortedLabels());

    /* Check for Status of Startup */
    IStatus startupStatus = Owl.getPersistenceService().getStartupStatus();
    if (startupStatus.getSeverity() == IStatus.ERROR)
      ErrorDialog.openError(OwlUI.getPrimaryShell(), Messages.Controller_STARTUP_ERROR, Messages.Controller_START_ERROR_MSG, startupStatus);

    /* Backup Subscriptions as OPML if no error */
    else {
      JobRunner.runDelayedInBackgroundThread(new Runnable() {
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

  /*
   * @see org.eclipse.ui.statushandlers.AbstractStatusHandler#handle(org.eclipse.ui.statushandlers.StatusAdapter, int)
   */
  @Override
  public void handle(StatusAdapter statusAdapter, int style) {
    IStatus status = statusAdapter.getStatus();

    /* Specially treat IOExceptions from PersistenceException */
    if (status != null) {
      Throwable ex = status.getException();
      if (ex instanceof PersistenceException)
        handlePersistenceException((PersistenceException) ex);
      else if (ex instanceof OutOfMemoryError)
        handleOutOfMemoryError((OutOfMemoryError) ex);
      else if (ex != null) {
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    Activator.getDefault().getLog().log(status); //Log in case there's also an exception creating an empty object container
    fObjectContainer = Db4o.openFile(config, getDBFilePath());
  }

  private IStatus createObjectContainer(Configuration config) {
    IStatus status = null;

    /* Open the DB */
    try {
      fObjectContainer = Db4o.openFile(config, getDBFilePath());
      status = Status.OK_STATUS;
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    if (foundSuitableBackup) {
      String message = createRecoveredFromCorruptedDatabaseMessage(currentDbCorruptedFile, lastModified);
      return Activator.getDefault().createErrorStatus(message, startupException);
    }

    IStatus status = Activator.getDefault().createErrorStatus("Database file and its back-ups are all corrupted. The corrupted database file has been saved to: " + currentDbCorruptedFile.getAbsolutePath(), startupException); //$NON-NLS-1$
    createEmptyObjectContainer(config, status);
    return status;
  }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    fPackageDialogField.setStatus(getPackage().length() == 0 ? "(default)" : "");
    fPackageDialogField.enableButton(getPackageFragmentRoot() != null);

    String packName = getPackage();
    if (packName.length() > 0) {
      IStatus val = JavaConventions.validatePackageName(packName);
      if (val.getSeverity() == IStatus.ERROR) {
        status.setError("Package name is not valid." + val.getMessage());
        return status;
      } else if (val.getSeverity() == IStatus.WARNING) {
        status.setWarning("This package name is discouraged. " + val.getMessage());
        // continue
      }
    } else {
      status.setWarning("The use of the default package is discouraged.");
    }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    if (aspectName.indexOf('.') != -1) {
      status.setError("Aspect name must not be qualified.");
      return status;
    }

    IStatus val = JavaConventions.validateJavaTypeName(aspectName);
    if (val.getSeverity() == IStatus.ERROR) {
      status.setError("Aspect name is not valid. " + val.getMessage());
      return status;
    } else if (val.getSeverity() == IStatus.WARNING) {
      status.setWarning("Aspect name is discouraged. " + val.getMessage());
    }

    IPackageFragment pack = getPackageFragment();
    if (pack != null) {
      ICompilationUnit cu = pack.getCompilationUnit(aspectName + ".java"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

        String targetClassName = getTargetClassName();
        if (targetClassName.length() == 0) {
            // accept the empty field (stands for java.lang.Object)
            return status;
        }
        IStatus val = JavaConventions.validateJavaTypeName(targetClassName);
        if (val.getSeverity() == IStatus.ERROR) {
            status.setError("Target class name is not valid.");
            return status;
        }
        if (root != null) {
            try {
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    protected void handleFieldChanged(String fieldName) {
        if (fieldName == TARGET_CLASS) {
            fArgumentTypesStatus = updateArgumentTypes();
        }
        IStatus status[] = new IStatus[] { fTargetClassStatus, fArgumentTypesStatus };
        updateStatus(status);
    }
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.