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

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

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

  • Common ways to obtain StatusInfo
private void myMethod () {
StatusInfo s =
  • Codota Iconnew StatusInfo()
  • Codota IconString message;new StatusInfo(severity, message)
  • Codota IconJavadocOptionsManager javadocOptionsManager;javadocOptionsManager.getWizardStatus()
  • Smart code suggestions by Codota
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private StatusInfo pathUpdated() {
  StatusInfo status= new StatusInfo();
  String path= fPathField.getText();
  if (path.length() > 0) { // empty path is ok
    if (!Path.ROOT.isValidPath(path)) {
      status.setError(NewWizardMessages.VariableCreationDialog_error_invalidpath);
    } else if (!new File(path).exists()) {
      status.setWarning(NewWizardMessages.VariableCreationDialog_warning_pathnotexists);
    }
  }
  return status;
}
origin: org.eclipse/org.eclipse.jdt.ui

  public IStatus validate(Object[] selection) {
    StatusInfo res= new StatusInfo();
    // only single selection
    if (selection.length == 1 && (selection[0] instanceof IFile))
      res.setOK();
    else
      res.setError(""); //$NON-NLS-1$
    return res;
  }
});
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private boolean doThresholdChanged(String thresholdString) {
  StatusInfo status= new StatusInfo();
  try {
    int threshold= Integer.parseInt(thresholdString);
    if (threshold < 0) {
      status.setError(PreferencesMessages.ImportOrganizeConfigurationBlock_error_invalidthreshold);
    }
  } catch (NumberFormatException e) {
    status.setError(PreferencesMessages.ImportOrganizeConfigurationBlock_error_invalidthreshold);
  }
  updateStatus(status);
  return status.isOK();
}
origin: org.eclipse/org.eclipse.jdt.ui

private IStatus updateArchivePathStatus() {
  // no validation yet
  try {
    fArchiveURLResult= getArchiveURL();
  } catch (MalformedURLException e) {
    fArchiveURLResult= null;
    StatusInfo status= new StatusInfo();
    status.setError(e.getMessage());  
    //status.setError(PreferencesMessages.getString("JavadocConfigurationBlock.MalformedURL.error"));  //$NON-NLS-1$
    return status;
  }
  return new StatusInfo();

}

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

private IStatus updateFileNameStatus() {
  StatusInfo status= new StatusInfo();
  fFileVariablePath= null;
    status.setError(NewWizardMessages.EditVariableEntryDialog_filename_empty);
    return status;
  } else {
    if (!Path.EMPTY.isValidPath(fileName)) {
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_notvalid); 
      return status;
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_deviceinpath); 
      return status;
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_notvalid); 
      return status;
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_varnotexists); 
      return status;
      status.setWarning(message); 
      return status;
      if (deprecationMessage != null) {
        message= deprecationMessage + "\n" + message; //$NON-NLS-1$
        status.setWarning(message);
      } else {
        status.setInfo(message);
      status.setWarning(deprecationMessage); 
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private StatusInfo computeDetailsStatus(DialogField field) {
  Set<String> packages= new HashSet<>();
  StatusInfo status= new StatusInfo();
  if (fIsPatchCheckbox.isSelected()) {
    String patchedModule= fPatchedModule.getText().trim();
        status.setError(NewWizardMessages.ModuleDialog_missingPatch_error);
      status.setError(Messages.format(NewWizardMessages.ModuleDialog_wrongPatch_error, patchedModule));
    } else if (isModuleExcluded(patchedModule)) {
      status.setError(Messages.format(NewWizardMessages.ModuleDialog_patchedModuleExcluded_error, patchedModule));
  if (status.isOK()) {
    for (ModuleAddExport export : fAddExportsList.getElements()) {
      if (!packages.add(export.fPackage)) {
        status.setError(Messages.format(NewWizardMessages.ModuleDialog_duplicatePackage_error, export.fPackage));
        break;
        status.setError(Messages.format(NewWizardMessages.ModuleDialog_exportSourceModuleExcluded_error,
            new String[]{ export.fPackage, export.fSourceModule }));
  if (status.isOK()) {
    Set<String> readModules= new HashSet<>();
    for (ModuleAddReads reads : fAddReadsList.getElements()) {
      if (!readModules.add(reads.toString())) {
        status.setError(Messages.format(NewWizardMessages.ModuleDialog_duplicateReads_error, reads.toString()));
        break;
        status.setError(Messages.format(NewWizardMessages.ModuleDialog_readsSourceModuleExcluded_error,
            reads.fSourceModule));
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IStatus computeContentsStatus() {
  StatusInfo info= new StatusInfo();
  if (fIsModuleCheckbox.isSelected()) {
    if (fJavaElements != null) {
      if (fModuleLists[IDX_INCLUDED].fNames.isEmpty()) {
        info.setError(NewWizardMessages.ModuleDialog_mustIncludeModule_error);
      } else if (fModuleLists[IDX_INCLUDED].fNames.size() + fModuleLists[IDX_AVAILABLE].fNames.size() == 1) {
        info.setInfo(NewWizardMessages.ModuleDialog_cannotLimitSingle_error);
      }
    } else {
      info.setInfo(NewWizardMessages.ModuleDialog_unknownModules_info);
    }
  }
  return info;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void validate(String newName) {
  if (newName.length() == 0) {
    nameValidationStatus.setError(JavaUIMessages.GenerateToStringDialog_templateEdition_TemplateNameEmptyErrorMessage);
  } else if (!newName.equals(fInitialTemplateName) && templateNames.contains(newName)) {
    nameValidationStatus.setError(JavaUIMessages.GenerateToStringDialog_templateEdition_TemplateNameDuplicateErrorMessage);
  } else {
    nameValidationStatus.setOK();
  }
  updateStatus(nameValidationStatus);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Creates a <code>NewElementWizardPage</code>.
 *
 * @param name the wizard page's name
 */
public NewElementWizardPage(String name) {
  super(name);
  fPageVisible= false;
  fCurrStatus=  new StatusInfo();
}
origin: org.eclipse/org.eclipse.jdt.ui

  fOutputFolderStatus.setError(NewWizardMessages.BuildPathsBlock_error_EnterBuildPath); 
  return;
    fOutputFolderStatus.setError(NewWizardMessages.BuildPathsBlock_error_InvalidBuildPath); 
    return;
fOutputFolderStatus.setOK();
pathStr= outputPath.lastSegment();
if (pathStr.equals(".settings") && outputPath.segmentCount() == 2) { //$NON-NLS-1$
  fOutputFolderStatus.setWarning(NewWizardMessages.OutputLocation_SettingsAsLocation);
  fOutputFolderStatus.setWarning(Messages.format(NewWizardMessages.OutputLocation_DotAsLocation, pathStr));
origin: org.eclipse/org.eclipse.jdt.ui

private IStatus validatePath() {
  StatusInfo status= new StatusInfo();
  String val= fPathField.getText();
  if (val.length() == 0) {
    return status;
  }
  Path path= new Path(val);
  if (path.isAbsolute()) {
    if (!path.toFile().isDirectory()) {
      status.setWarning(NewWizardMessages.NativeLibrariesDialog_error_external_not_existing); 
      return status;
    }
  } else {
    if (!(ResourcesPlugin.getWorkspace().getRoot().findMember(path) instanceof IContainer)) {
      status.setWarning(NewWizardMessages.NativeLibrariesDialog_error_internal_not_existing); 
      return status;
    }
  }
  return status;
}
origin: org.eclipse/org.eclipse.jdt.ui

fClassPathStatus.setOK();
    fClassPathStatus.setWarning(Messages.format(NewWizardMessages.BuildPathsBlock_warning_EntryMissing, entryMissing.getPath().toString())); 
  } else {
    fClassPathStatus.setWarning(Messages.format(NewWizardMessages.BuildPathsBlock_warning_EntriesMissing, String.valueOf(nEntriesMissing))); 
  fClassPathStatus.setInfo(entryDeprecated.getDeprecationMessage());
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

fRootStatus.setOK();
  fRootStatus.setError(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_error_EnterRootName, BasicElementLabels.getPathLabel(fCurrJProject.getPath(), false)));
} else {
  IPath path= projPath.append(str);
  IStatus validate= fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER);
  if (validate.matches(IStatus.ERROR)) {
    fRootStatus.setError(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_error_InvalidRootName, validate.getMessage()));
  } else {
    IResource res= fWorkspaceRoot.findMember(path);
    if (res != null) {
      if (res.getType() != IResource.FOLDER) {
        fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_NotAFolder);
        return;
        fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_FolderIsVirtual);
        return;
        fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_FolderNameFiltered);
        return;
          IFileStore store= EFS.getStore(projLocation).getChild(str);
          if (store.fetchInfo().exists()) {
            fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_AlreadyExistingDifferentCase);
            return;
      if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
        if (path.equals(curr.getPath())) {
          fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_AlreadyExisting);
origin: org.eclipse/org.eclipse.jdt.ui

private void updateStatus(HoverConfig hoverConfig) {
  if (hoverConfig != null && hoverConfig.fIsEnabled && hoverConfig.fStateMask == -1)
    fStatus= new StatusInfo(IStatus.ERROR, Messages.format(PreferencesMessages.JavaEditorHoverConfigurationBlock_modifierIsNotValid, hoverConfig.fModifierString)); 
  else
    fStatus= new StatusInfo();
  
  int i= 0;
  HashMap stateMasks= new HashMap(fHoverConfigs.length);
  while (fStatus.isOK() && i < fHoverConfigs.length) {
    if (fHoverConfigs[i].fIsEnabled) {
      String label= getContributedHovers()[i].getLabel();
      Integer stateMask= new Integer(fHoverConfigs[i].fStateMask);
      if (fHoverConfigs[i].fStateMask == -1)
        fStatus= new StatusInfo(IStatus.ERROR, Messages.format(PreferencesMessages.JavaEditorHoverConfigurationBlock_modifierIsNotValidForHover, new String[] {fHoverConfigs[i].fModifierString, label})); 
      else if (stateMasks.containsKey(stateMask))
        fStatus= new StatusInfo(IStatus.ERROR, Messages.format(PreferencesMessages.JavaEditorHoverConfigurationBlock_duplicateModifier, new String[] {label, (String)stateMasks.get(stateMask)})); 
      else
        stateMasks.put(stateMask, label);
    }
    i++;
  }
  fMainPreferencePage.setValid(fStatus.isOK());
  StatusUtil.applyToStatusLine(fMainPreferencePage, fStatus);
}

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

  return new StatusInfo(IStatus.ERROR, Messages.format(NewWizardMessages.OutputLocationDialog_error_invalidpath, pathValidation.getMessage()));
    return new StatusInfo(IStatus.ERROR, NewWizardMessages.OutputLocationDialog_error_existingisfile);
  cpProject.setDefaultOutputLocation(cpProject.getDefaultOutputLocation().append(outputFolderName));
  ClasspathModifier.removeFromClasspath(javaProject, cpProject.getCPListElements(), null);
  result= new StatusInfo(IStatus.INFO, Messages.format(NewWizardMessages.OutputLocationDialog_removeProjectFromBP, cpProject.getDefaultOutputLocation()));
if (!status.isOK()) {
  if (allowInvalidCP) {
    return new StatusInfo(IStatus.WARNING, status.getMessage());
  } else {
    return new StatusInfo(IStatus.ERROR, status.getMessage());
  StatusInfo statusInfo= new StatusInfo(IStatus.WARNING, NewWizardMessages.OutputLocation_SettingsAsLocation);
  if (result.isOK()) {
    return statusInfo;
  } else {
    MultiStatus ms= new MultiStatus(result.getPlugin(), result.getCode(), new IStatus[] {result, statusInfo}, statusInfo.getMessage(), null);
    return ms;
  StatusInfo statusInfo= new StatusInfo(IStatus.WARNING, Messages.format(NewWizardMessages.OutputLocation_DotAsLocation, outputPath.toString()));
  if (result.isOK()) {
    return statusInfo;
  } else {
    MultiStatus ms= new MultiStatus(result.getPlugin(), result.getCode(), new IStatus[] {result, statusInfo}, statusInfo.getMessage(), null);
    return ms;
origin: org.eclipse/org.eclipse.ajdt.ui

public void updateInPathStatus() {
  fInPathStatus.setOK();
  List elements = fInPathList.getElements();
  CPListElement entryMissing = null;
  int nEntriesMissing = 0;
  IClasspathEntry[] entries = new IClasspathEntry[elements.size()];
  for (int i = elements.size() - 1; i >= 0; i--) {
    CPListElement currElement = (CPListElement) elements.get(i);
    entries[i] = currElement.getClasspathEntry();
    if (currElement.isMissing()) {
      nEntriesMissing++;
      if (entryMissing == null) {
        entryMissing = currElement;
      }
    }
  }
  if (nEntriesMissing > 0) {
    if (nEntriesMissing == 1) {
      fInPathStatus.setWarning(UIMessages.InPathBlock_warning_EntryMissing); 
    } else {
      fInPathStatus.setWarning(UIMessages.InPathBlock_warning_EntriesMissing);
    }
  }
  updateBuildPathStatus();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private IStatus updateFileNameStatus() {
  StatusInfo status= new StatusInfo();
  fFileVariablePath= null;
    status.setError(NewWizardMessages.EditVariableEntryDialog_filename_empty);
    return status;
  } else {
    if (!Path.EMPTY.isValidPath(fileName)) {
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_notvalid);
      return status;
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_deviceinpath);
      return status;
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_notvalid);
      return status;
      status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_varnotexists);
      return status;
      status.setWarning(message);
      return status;
      if (deprecationMessage != null) {
        message= deprecationMessage + "\n" + message; //$NON-NLS-1$
        status.setWarning(message);
      } else {
        status.setInfo(message);
      status.setWarning(deprecationMessage);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (!pathNameStatus.isOK())
  return pathNameStatus;
  IStatus linkNameStatus= validateLinkLocation(fRootDialogField.getText());
  if (linkNameStatus.matches(IStatus.ERROR)) {
    StatusInfo result= new StatusInfo();
    result.setError(linkNameStatus.getMessage());
    return result;
StatusInfo result= new StatusInfo();
result.setOK();
    if (path.equals(curr.getPath()) && fExistingEntries.get(i) != fNewElement) {
      if (folder.exists()) {
        result.setError(NewWizardMessages.NewSourceFolderWizardPage_error_AlreadyExisting);
        return result;
      } else {
  return new StatusInfo(IStatus.ERROR, Messages.format(NewWizardMessages.NewFolderDialog_folderNameEmpty_alreadyExists, BasicElementLabels.getPathLabel(folder.getFullPath(), false)));
  return new StatusInfo();
    if (status2.isOK()) {
      if (isProjectSourceFolderReplaced) {
        result.setInfo(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_ReplaceSFandOL, BasicElementLabels.getPathLabel(fNewOutputLocation, false)));
      } else {
        result.setInfo(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_ReplaceOL, BasicElementLabels.getPathLabel(fNewOutputLocation, false)));
    result.setInfo(NewWizardMessages.AddSourceFolderWizardPage_conflictWarning + status.getMessage());
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IStatus updateArchivePathStatus() {
  // no validation yet
  try {
    fArchiveURLResult= getArchiveURL();
  } catch (MalformedURLException e) {
    fArchiveURLResult= null;
    StatusInfo status= new StatusInfo();
    status.setError(e.getMessage());
    //status.setError(PreferencesMessages.getString("JavadocConfigurationBlock.MalformedURL.error"));  //$NON-NLS-1$
    return status;
  }
  return new StatusInfo();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IStatus validateNullnessAnnotation(String value, String errorMessage, boolean isTypeMandatory) {
  StatusInfo status= new StatusInfo();
  if (value.isEmpty() && !isTypeMandatory)
    return status;
  if (JavaConventions.validateJavaTypeName(value, JavaCore.VERSION_1_5, JavaCore.VERSION_1_5).matches(IStatus.ERROR)
      || value.indexOf('.') == -1) {
    status.setError(errorMessage);
  } else if (fProject != null) {
    try {
      if (JavaCore.create(fProject).findType(value) == null) {
        String notFoundMessage= NLS.bind(PreferencesMessages.NullAnnotationsConfigurationDialog_notFound_info, value);
        if (isTypeMandatory)
          status.setError(notFoundMessage);
        else
          status.setInfo(notFoundMessage);
      }
    } catch (JavaModelException e) {
      ExceptionHandler.handle(e, getShell(), PreferencesMessages.NullAnnotationsConfigurationDialog_error_title, PreferencesMessages.NullAnnotationsConfigurationDialog_error_message);
    }
  }
  return status;
}

org.eclipse.jdt.internal.ui.dialogsStatusInfo

Javadoc

A settable IStatus. Can be an error, warning, info or ok. For error, info and warning states, a message describes the problem.

Most used methods

  • <init>
    Creates a status .
  • setError
    Sets the status to ERROR.
  • setOK
    Sets the status to OK.
  • setWarning
    Sets the status to WARNING.
  • getMessage
  • isOK
    Returns if the status' severity is OK.
  • setInfo
    Sets the status to INFO.
  • getSeverity

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JComboBox (javax.swing)
  • JOptionPane (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
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