Tabnine Logo
ProblemLocationCore.<init>
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.eclipse.jdt.internal.ui.text.correction.ProblemLocationCore.<init> (Showing top 4 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: 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<init>

Popular methods of ProblemLocationCore

  • getErrorCode

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • JLabel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for Android Studio
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