-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use offsets from .bgv
file to select appropriate text
#10510
base: master
Are you sure you want to change the base?
Conversation
|
||
private Line findLine(EditorCookie cake, int line) { | ||
try { | ||
return cake.getLineSet().getOriginal(line - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly IGV should honor https://www.graalvm.org/graphio/javadoc/jdk/graal/compiler/graphio/GraphLocations.html#locationOffsetStart(java.lang.Object) when the line isn't positive.
@@ -63,24 +67,48 @@ private void openOrView(boolean focus) { | |||
return; | |||
} | |||
int line = location.getLine(); | |||
int[] offsets = location.getOffsetsOrNull(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text based languages (like Truffle ones) are likely to fill offsets rather than line numbers. Passing the offsets to the LocationOpener
in faba84a and using the offsets rather than line when present. More an experiment for your consideration than bullet proof code right now.
.bgv
file.bgv
file to select appropriate text
Enso is trying to generate IGV graph for our internal
IR
:We had issues to provide proper
nodeSourceLocation
information. I had to debug visualizer code to find out what's wrong. While doing that I made few fixes.-1
as line location - IGV was then doing nothing - with 75d41ee it at least opens the fileNullPointerException
s so I am adding checks andassert
to catch that earlierWith these changes IGV picks up
start
andend
offset fromlocation
property and is capable to select appropriate source range. CCing @tkrodriguez, @sdedic, @Akirathan