Codota Logo
StatusUtil
Code IndexAdd Codota to your IDE (free)

How to use
StatusUtil
in
org.eclipse.jdt.internal.ui.dialogs

Best Java code snippets using org.eclipse.jdt.internal.ui.dialogs.StatusUtil (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * @return the most severe error (if there is one)
 */
private IStatus findMostSevereStatus() {
  return StatusUtil.getMostSevere(new IStatus[] { fJavadocStatus, fPreferenceStatus, fDestinationStatus, fDocletStatus, fTreeStatus, fWizardStatus });
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * @see IStatusChangeListener#statusChanged(IStatus)
 */
@Override
public void statusChanged(IStatus status) {
  setValid(!status.matches(IStatus.ERROR));
  StatusUtil.applyToStatusLine(this, status);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private IStatus doValidation(IAnnotationDialogField dialogField, AnnotationWrapper element, String newValue, boolean isTypeMandatory) {
  IStatus fieldStatus= validateNullnessAnnotation(newValue, dialogField.getErrorMessage(), isTypeMandatory);
  if (fieldStatus != null) {
    dialogField.setStatus(element, fieldStatus);
    // compute most severe among all known statuses, preferring fieldStatus then first-found if equal severities:
    IStatus mostSevereStatus= StatusUtil.getMoreSevere(fNullableAnnotationDialogField.getStatus(), fieldStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fNonNullAnnotationDialogField.getStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fNonNullByDefaultAnnotationDialogField.getStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fOtherNullableAnnotationsDialogField.getMostSevereStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fOtherNonNullAnnotationsDialogField.getMostSevereStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fOtherNonNullByDefaultAnnotationsDialogField.getMostSevereStatus(), mostSevereStatus);
    updateStatus(mostSevereStatus);
    return fieldStatus;
  }
  return new StatusInfo();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected void updateStatus(IStatus status) {
  if (fMainPage == null)
    return;
  fMainPage.setValid(status.isOK());
  StatusUtil.applyToStatusLine(fMainPage, status);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IStatus doValidation(IAnnotationDialogField dialogField, AnnotationWrapper element, String newValue, boolean isTypeMandatory) {
  IStatus fieldStatus= validateNullnessAnnotation(newValue, dialogField.getErrorMessage(), isTypeMandatory);
  if (fieldStatus != null) {
    dialogField.setStatus(element, fieldStatus);
    // compute most severe among all known statuses, preferring fieldStatus then first-found if equal severities:
    IStatus mostSevereStatus= StatusUtil.getMoreSevere(fNullableAnnotationDialogField.getStatus(), fieldStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fNonNullAnnotationDialogField.getStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fNonNullByDefaultAnnotationDialogField.getStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fOtherNullableAnnotationsDialogField.getMostSevereStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fOtherNonNullAnnotationsDialogField.getMostSevereStatus(), mostSevereStatus);
    mostSevereStatus= StatusUtil.getMoreSevere(fOtherNonNullByDefaultAnnotationsDialogField.getMostSevereStatus(), mostSevereStatus);
    updateStatus(mostSevereStatus);
    return fieldStatus;
  }
  return new StatusInfo();
}
origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Finds the most severe error (if there is one)
 */
private IStatus findMostSevereStatus() {
  return StatusUtil.getMostSevere(new IStatus[] { fJavadocStatus, fPreferenceStatus, fDestinationStatus, fDocletStatus, fTreeStatus, fWizardStatus });
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Updates the status line and the OK button according to the given status
 *
 * @param status status to apply
 */
protected void updateStatus(IStatus status) {
  fCurrStatus= status;
  setPageComplete(!status.matches(IStatus.ERROR));
  if (fPageVisible) {
    StatusUtil.applyToStatusLine(this, status);
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void doFieldUpdated(DialogField field) {
  if (field == fNameField) {
    fNameStatus= nameUpdated();
  } else if (field == fPathField) {
    fPathStatus= pathUpdated();
  } else if (field == fDirButton) {
    IPath path= chooseExtDirectory();
    if (path != null) {
      fPathField.setText(path.toString());
    }
  }
  updateStatus(StatusUtil.getMoreSevere(fPathStatus, fNameStatus));
}
origin: org.eclipse/org.eclipse.ajdt.ui

/**
 * Finds the most severe error (if there is one)
 */
private IStatus findMostSevereStatus() {
  return StatusUtil.getMostSevere(new IStatus[] { fJavadocStatus, fPreferenceStatus, fDestinationStatus, fDocletStatus, fTreeStatus, fWizardStatus });
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void statusChanged(IStatus status) {
  setValid(!status.matches(IStatus.ERROR));
  StatusUtil.applyToStatusLine(this, status);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void doFieldUpdated(DialogField field) {
  if (field == fNameField) {
    fNameStatus= nameUpdated();
  } else if (field == fPathField) {
    fPathStatus= pathUpdated();
  } else if (field == fDirButton) {
    IPath path= chooseExtDirectory();
    if (path != null) {
      fPathField.setText(path.toString());
    }
  }
  updateStatus(StatusUtil.getMoreSevere(fPathStatus, fNameStatus));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * @return the most severe error (if there is one)
 */
private IStatus findMostSevereStatus() {
  return StatusUtil.getMostSevere(new IStatus[] { fJavadocStatus, fPreferenceStatus, fDestinationStatus, fDocletStatus, fTreeStatus, fWizardStatus });
}
origin: org.eclipse/org.eclipse.jdt.ui

void updateStatus(IStatus status) {
  if (!fFieldsInitialized)
    return;
  
  setValid(!status.matches(IStatus.ERROR));
  StatusUtil.applyToStatusLine(this, status);
}

origin: org.eclipse/org.eclipse.jdt.ui

private void doFieldUpdated(DialogField field) {	
  if (field == fNameField) {
    fNameStatus= nameUpdated();
  } else if (field == fPathField) {
    fPathStatus= pathUpdated();
  } else if (field == fDirButton) {
    IPath path= chooseExtDirectory();
    if (path != null) {
      fPathField.setText(path.toString());
    }
  }        
  updateStatus(StatusUtil.getMoreSevere(fPathStatus, fNameStatus));
}        

origin: org.eclipse/org.eclipse.ajdt.ui

private IStatus findMostSevereStatus() {
  return StatusUtil.getMostSevere(new IStatus[] { fAspectPathStatus,
      fOutputFolderStatus, fBuildPathStatus });
}
origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Updates the status line and the OK button according to the given status
 * 
 * @param status status to apply
 */
protected void updateStatus(IStatus status) {
  fCurrStatus= status;
  setPageComplete(!status.matches(IStatus.ERROR));
  if (fPageVisible) {
    StatusUtil.applyToStatusLine(this, status);
  }
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void statusChanged() {
  IStatus status;
  boolean isURL= fIsForSource || fURLRadioButton.isSelected();
  if (isURL) {
    status= fURLStatus;
  } else {
    status= StatusUtil.getMoreSevere(fArchiveStatus, fArchivePathStatus);
  }
  if (!fIsForSource) {
    boolean canBrowseArchivePath= !isURL && fArchiveStatus.isOK() && fArchiveField.getText().length() > 0;
    if (canBrowseArchivePath && fWorkspaceRadio.isSelected()) {
      IResource resource= ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(fArchiveField.getText()));
      canBrowseArchivePath= resource != null && resource.getLocation() != null;
    }
    fBrowseArchivePath.setEnabled(canBrowseArchivePath);
  }
  fContext.statusChanged(status);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IStatus findMostSevereStatus() {
  return StatusUtil.getMostSevere(new IStatus[] { fAntStatus, fOverviewStatus });
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * Updates the status line and the OK button according to the given status
 *
 * @param status status to apply
 */
protected void updateStatus(IStatus status) {
  fCurrStatus= status;
  setPageComplete(!status.matches(IStatus.ERROR));
  if (fPageVisible) {
    StatusUtil.applyToStatusLine(this, status);
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

private void statusChanged() {
  IStatus status;
  boolean isURL= fIsForSource || fURLRadioButton.isSelected();
  if (isURL) {
    status= fURLStatus;
  } else {
    status= StatusUtil.getMoreSevere(fArchiveStatus, fArchivePathStatus);
  }
  if (!fIsForSource) {
    boolean canBrowseArchivePath= !isURL && fArchiveStatus.isOK() && fArchiveField.getText().length() > 0;
    if (canBrowseArchivePath && fWorkspaceRadio.isSelected()) {
      IResource resource= ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(fArchiveField.getText()));
      canBrowseArchivePath= resource != null && resource.getLocation() != null;
    }
    fBrowseArchivePath.setEnabled(canBrowseArchivePath);
  }
  fContext.statusChanged(status);
}
org.eclipse.jdt.internal.ui.dialogsStatusUtil

Javadoc

A utility class to work with IStatus.

Most used methods

  • getMostSevere
    Finds the most severe status from a array of stati. An error is more severe than a warning, and a wa
  • applyToStatusLine
    Applies the status to the status line of a dialog page.
  • getMoreSevere
    Compares two instances of IStatus. The more severe is returned: An error is more severe than a warni

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now