Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Lahoda <[email protected]>
  • Loading branch information
dbalek and lahodaj authored Jan 31, 2025
1 parent 650d552 commit 74d5eaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ide/parsing.indexing/apichanges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ is the proper place.
<change id="ErrorsCache.getErrors">
<api name="IndexingAPI"/>
<summary>Added method to ErrorsCache to return all errors or warnings for the given file</summary>
<version major="9" minor="39"/>
<version major="9" minor="40"/>
<date day="6" month="9" year="2024"/>
<author login="dbalek"/>
<compatibility source="compatible" binary="compatible" semantic="compatible" addition="yes"/>
Expand Down
2 changes: 1 addition & 1 deletion ide/parsing.indexing/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.
javac.release=17
javac.compilerargs=-Xlint -Xlint:-serial
spec.version.base=9.39.0
spec.version.base=9.40.0
is.autoload=true
javadoc.apichanges=${basedir}/apichanges.xml
javadoc.arch=${basedir}/arch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ public static Collection<? extends URL> getAllFilesWithRecord(URL root) throws I
* @param file file for which the errors are being retrieved
* @param convertor constructor of {@code T} instances from error description properties
* @return errors or warnings
* @since 9.39
* @since 9.40
*/
public static <T> List<T> getErrors(FileObject file, ReverseConvertor<T> convertor) throws IOException {
return Collections.unmodifiableList(TaskCache.getDefault().getErrors(file, convertor));
}

/**Position in a text expressed as 1-based line and character offset.
* @since 9.39
* @since 9.40
*/
public record Position(int line, int column) {}

/**Range in a text expressed as (1-based) start and end positions.
* @since 9.39
* @since 9.40
*/
public record Range(Position start, Position end) {}

Expand All @@ -103,15 +103,15 @@ public static interface Convertor<T> {
public int getLineNumber(T t);
public String getMessage(T t);
/**
* @since 9.39
* @since 9.40
*/
public default Range getRange(T t) {
return null;
}
}

/**Constructor of error description from the properties.
* @since 9.39
* @since 9.40
*/
public static interface ReverseConvertor<T> {
public T get(ErrorKind kind, Range range, String message);
Expand Down

0 comments on commit 74d5eaf

Please sign in to comment.