Tabnine Logo
ProblemLocationCore
Code IndexAdd Tabnine to your IDE (free)

How to use
ProblemLocationCore
in
org.eclipse.jdt.internal.ui.text.correction

Best Java code snippets using org.eclipse.jdt.internal.ui.text.correction.ProblemLocationCore (Showing top 5 results out of 315)

origin: eclipse/eclipse.jdt.ls

/**
 * Convert set of IProblems to IProblemLocations
 *
 * @param problems
 *            the problems to convert
 * @return the converted set
 */
protected static IProblemLocationCore[] convertProblems(IProblem[] problems) {
  IProblemLocationCore[] result = new IProblemLocationCore[problems.length];
  for (int i = 0; i < problems.length; i++) {
    result[i] = new ProblemLocationCore(problems[i]);
  }
  return result;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation

@Override
public String toString() {
  StringBuilder buf= new StringBuilder();
  buf.append("Id: ").append(getErrorCode(fId)).append('\n'); //$NON-NLS-1$
  buf.append('[').append(fOffset).append(", ").append(fLength).append(']').append('\n'); //$NON-NLS-1$
  String[] arg= fArguments;
  for (int i= 0; i < arg.length; i++) {
    buf.append(arg[i]);
    buf.append('\n');
  }
  return buf.toString();
}
origin: eclipse/eclipse.jdt.ls

public static ICleanUpFixCore createCleanUp(CompilationUnit compilationUnit, boolean insertInferredTypeArguments, boolean removeRedundantTypeArguments) {
  IProblem[] problems= compilationUnit.getProblems();
  IProblemLocationCore[] locations = new IProblemLocationCore[problems.length];
  for (int i= 0; i < problems.length; i++) {
    locations[i] = new ProblemLocationCore(problems[i]);
  }
  return createCleanUp(compilationUnit, locations,
      insertInferredTypeArguments,
      removeRedundantTypeArguments);
}
origin: eclipse/eclipse.jdt.ls

private IProblemLocationCore[] getProblemLocationCores(ICompilationUnit unit, List<Diagnostic> diagnostics) {
  IProblemLocationCore[] locations = new IProblemLocationCore[diagnostics.size()];
  for (int i = 0; i < diagnostics.size(); i++) {
    Diagnostic diagnostic = diagnostics.get(i);
    int problemId = getProblemId(diagnostic);
    int start = DiagnosticsHelper.getStartOffset(unit, diagnostic.getRange());
    int end = DiagnosticsHelper.getEndOffset(unit, diagnostic.getRange());
    boolean isError = diagnostic.getSeverity() == DiagnosticSeverity.Error;
    locations[i] = new ProblemLocationCore(start, end - start, problemId, new String[0], isError, IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
  }
  return locations;
}
origin: eclipse/eclipse.jdt.ls

public static ICleanUpFixCore createCleanUp(CompilationUnit compilationUnit, boolean addSerialVersionIds) {
  IProblem[] problems = compilationUnit.getProblems();
  IProblemLocationCore[] locations = new IProblemLocationCore[problems.length];
  for (int i = 0; i < problems.length; i++) {
    // locations[i]= new ProblemLocationCore(problems[i]);
    boolean isError = problems[i].isError();
    int problemId = problems[i].getID();
    int length = problems[i].getSourceEnd() - problems[i].getSourceStart();
    int offset = problems[i].getSourceStart();
    locations[i] = new ProblemLocationCore(offset, length, problemId, new String[0], isError, IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
  }
  return createCleanUp(compilationUnit, locations, addSerialVersionIds);
}
org.eclipse.jdt.internal.ui.text.correctionProblemLocationCore

Most used methods

  • <init>
  • getErrorCode

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now