Examples of offsetToLineColumn()


Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

    String filepath = ProjectUtils.getFilePath(project, file);

    List<IProblem> problems = requestor.getProblems();
    FileOffsets offsets = FileOffsets.compile(filepath);
    for (IProblem problem : problems){
      int[] lineColumn = offsets.offsetToLineColumn(problem.getOffset());
      Error error = new Error(
        problem.getUnmodifiedMessage(), filepath,
        lineColumn[0], lineColumn[1],
        problem.isWarning());
      if(!errors.contains(error)){
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

      ArrayList<Error> errors = new ArrayList<Error>();
      String filename = src.getResource().getLocation().toOSString();
      FileOffsets offsets = FileOffsets.compile(filename);
      for(IProblem problem : problems){
        int[] lineColumn =
          offsets.offsetToLineColumn(problem.getSourceStart());

        // one day vim might support ability to mark the offending text.
        /*int[] endLineColumn =
          offsets.offsetToLineColumn(problem.getSourceEnd());*/

 
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

        // exclude TODO, etc
        if (problem.getID() == IProblem.Task){
          continue;
        }

        int[] lineColumn = offsets.offsetToLineColumn(problem.getSourceStart());
        errors.add(new Error(
            problem.getMessage(),
            filename,
            lineColumn[0],
            lineColumn[1],
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

        ArrayList<Error> errors = new ArrayList<Error>();
        String filename = src.getResource()
          .getLocation().toOSString().replace('\\', '/');
        FileOffsets offsets = FileOffsets.compile(filename);
        for(IProblem problem : problems){
          int[] lineColumn = offsets.offsetToLineColumn(problem.getSourceStart());
          errors.add(new Error(
              problem.getMessage(),
              filename,
              lineColumn[0],
              lineColumn[1],
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

          int[] lineColumn = null;

          Integer start = (Integer)marker.getAttribute(IMarker.CHAR_START);
          if (start != null && start.intValue() > 0){
            lineColumn = offsets.offsetToLineColumn(start.intValue());
          }else{
            Integer line = (Integer)marker.getAttribute(IMarker.LINE_NUMBER);
            if (line != null && line.intValue() > 0){
              lineColumn = new int[]{line.intValue(), 1};
            }
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

          value = matcher.group(1).trim();
          matcher = Pattern
            .compile(">\\s*(\\Q" + value + "\\E)\\b", Pattern.MULTILINE)
            .matcher(contents);
          if(matcher.find()){
            int[] position = offsets.offsetToLineColumn(matcher.start(1));
            line = position[0];
            col = position[1];
          }
          break;
        }
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

      {
        return;
      }

      FileOffsets offsets = FileOffsets.compile(filename);
      int[] lineColumn = offsets.offsetToLineColumn(problem.getSourceStart());

      error = new Error(
          problem.getMessage(),
          filename.replace("__eclim_temp_", ""),
          lineColumn[0],
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

        if (problem.getID() == IProblem.Task){
          continue;
        }

        int[] lineColumn =
          offsets.offsetToLineColumn(problem.getSourceStart());

        // one day vim might support ability to mark the offending text.
        /*int[] endLineColumn =
          offsets.offsetToLineColumn(problem.getSourceEnd());*/

 
View Full Code Here

Examples of org.eclim.util.file.FileOffsets.offsetToLineColumn()

      String filepath = ProjectUtils.getFilePath(project, file);
      FileOffsets offsets = FileOffsets.compile(filepath);
      ArrayList<Error> errors = new ArrayList<Error>();
      for(IProblem problem : reporter.getProblems()){
        int[] lineColumn = offsets.offsetToLineColumn(problem.getSourceStart());
        errors.add(new Error(
            problem.getMessage(),
            filepath,
            lineColumn[0],
            lineColumn[1],
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.