Skip to content

Commit

Permalink
Special AnnotationType for offset based position
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaroslav Tulach committed Feb 28, 2025
1 parent a32bff9 commit 293308c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void run() {
CurrentNodeAnnotation.highlight(select);
} else if (select.size() >= 1 && select.get(0) instanceof Line.Part) {
Line.Part part = (Line.Part) select.get(0);
part.getLine().show(Line.ShowOpenType.REUSE, focus ? Line.ShowVisibilityType.FRONT : Line.ShowVisibilityType.FRONT);
part.getLine().show(Line.ShowOpenType.REUSE, focus ? Line.ShowVisibilityType.FRONT : Line.ShowVisibilityType.FRONT, part.getColumn());
CurrentNodeAnnotation.highlight(select);
} else {
// neither line nor offsets
Expand Down Expand Up @@ -221,7 +221,7 @@ private static void highlight(List<Annotatable> select) {

@Override
public String getAnnotationType() {
return "NodePositionCurrent";
return "NodePositionOffset";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>


<!DOCTYPE type PUBLIC "-//NetBeans//DTD annotation type 1.0//EN" "http://www.netbeans.org/dtds/annotation-type-1_0.dtd">
<type
name='NodePositionOffset'
description_key='Hint_NodePositionCurrent'
localizing_bundle='org.graalvm.visualizer.source.resources.Bundle'
visible='true'
glyph='nbresloc:/org/graalvm/visualizer/source/resources/extractNodes.gif'
highlight='0xC8FF00'
type='linepart'
priority='1100'
custom_sidebar_color='0xFFCCCC'
/>
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<file name="NodePositionCurrent.xml" url="NodePositionCurrent.xml"/>
<file name="CallSiteCurrent.xml" url="CallSiteCurrent.xml"/>
<file name="CalledSiteCurrent.xml" url="CalledSiteCurrent.xml"/>
<file name="NodePositionOffset.xml" url="NodePositionOffset.xml"/>
</folder>
<folder name="FontsColors">
<folder name="NetBeans">
Expand Down

0 comments on commit 293308c

Please sign in to comment.