Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IStatus


        });

        locationGroup.addPropertyChangeListener(new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent event) {
                IStatus status = locationGroup.getStatus();
                setPageComplete(status.isOK());
                if (status.isOK()) {
                    setErrorMessage(null);
                } else {
                    setErrorMessage(status.getMessage());
                }
            }
        });
    }
View Full Code Here


                setPageComplete(false);
                return;
            }

            // check whether the project name is valid
            @SuppressWarnings("unused")
            final IStatus nameStatus = workspace.validateName(name, IResource.PROJECT);
            if (!nameStatus.isOK()) {
                setErrorMessage(nameStatus.getMessage());
                setPageComplete(false);
                return;
            }

            // check whether project already exists
View Full Code Here

      // default 'name' to same value as 'email'
      user.setName(email);
    }

    // update
    IStatus status = userAdmin.updateUser(uid, user)// errors logged by Orion
    if (!status.isOK()) {
      return null;
    }

    // Set email as confirmed -- pre-M10 users' emails were confirmed by Maqetta, so
    // should be fine setting it here for Orion.
    // Need to do a seperate updateUser() call unfortunately, since we changed the email above.
    user.confirmEmail();
    userAdmin.updateUser(uid, user)// errors logged by Orion
    if (!status.isOK()) {
      return null;
    }

    return user;
  }
View Full Code Here

    return super.performOk();
  }
 
  private void openWriteErrorDialog(IOException ex) {
    IStatus status= new Status(IStatus.ERROR, EclipseEmmetPlugin.PLUGIN_ID, IStatus.OK, "Failed to write templates.", ex); //$NON-NLS-1$
    EclipseEmmetPlugin.getDefault().getLog().log(status);
    String title= "Error while saving variables";
    String message= "Error occured while saving variable preverences";
    MessageDialog.openError(getShell(), title, message);
  }
View Full Code Here

    return buffer.toString();
  }

  private void numberFieldChanged(Text textControl) {
    String number= textControl.getText();
    IStatus status= validatePositiveNumber(number);
    if (!status.matches(IStatus.ERROR))
      fOverlayStore.setValue((String) fTextFields.get(textControl), number);
    updateStatus(status);
  }
View Full Code Here

  void updateStatus(IStatus status) {
    if (!status.matches(IStatus.ERROR)) {
      for (int i= 0; i < fNumberFields.size(); i++) {
        Text text= (Text) fNumberFields.get(i);
        IStatus s= validatePositiveNumber(text.getText());
        status= StatusUtil.getMoreSevere(s, status);
      }
    }

    setValid(!status.matches(IStatus.ERROR));
View Full Code Here

   * Finds the most severe status from a array of stati.
   * An error is more severe than a warning, and a warning is more severe
   * than ok.
   */
  public static IStatus getMostSevere(IStatus[] status) {
    IStatus max= null;
    for (int i= 0; i < status.length; i++) {
      IStatus curr= status[i];
      if (curr.matches(IStatus.ERROR)) {
        return curr;
      }
      if (max == null || curr.getSeverity() > max.getSeverity()) {
        max= curr;
      }
    }
    return max;
  }
View Full Code Here

    return new ModifyEditorOperation() {

      @Override
      protected void performOperation(IProgressMonitor monitor) throws CoreException {
        IStatus status = openConnection(monitor);
        if (!status.isOK()) {
          throw new CoreException(status);
        }
      }
    };
  }
View Full Code Here

        @Override
        public IStatus runInUIThread(IProgressMonitor monitor) {

          IConnectionProfile profile = getConnectionProfile();
          IStatus status = Status.OK_STATUS;

          if (profile != null) {
            status = profile.connect();
          }
          else {
View Full Code Here

    if (profile != null && !matchesProfile(profile, tunnelDescriptor)) {
      // Different credentials for the same profile, most likely
      // meaning that a new tunnel was created, and the old profile
      // has obsolete credentials.
      if (profile.getConnectionState() == IConnectionProfile.CONNECTED_STATE) {
        IStatus status = profile.disconnect();
        if (!status.isOK()) {
          CloudFoundryPlugin.log(status);
        }
      }

      // Change the properties to reflect changes
View Full Code Here

TOP

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

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.