-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement source lookup in Item Properties view #276
Merged
bhufmann
merged 8 commits into
eclipse-cdt-cloud:master
from
GregSavin:implement-source-lookup
Nov 22, 2024
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1ec22db
Trying to get 'go to source file' functionality wiggling.
GregSavin 81dc120
Now able to open a file editor when clicking on a valid Source
GregSavin 7c77d10
Adding "go to source file" support.
GregSavin 82dfa4c
after source code is opened, position cursor on the source line
GregSavin 771a9ed
Code cleanup in preparation for pull request.
GregSavin 8d60c60
Fix lint issue
GregSavin 68f7b8e
Fix another lint issue.
GregSavin f3be358
Adjust based on review comments.
GregSavin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ class TraceExplorerProperties extends React.Component<{}, PropertiesViewState> { | |
`${e.currentTarget.getAttribute('data-id')}` | ||
); | ||
console.log('filename: ' + fileLocation + ':' + line); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we need to keep the console log. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I added the import for the CSS, and removed the console.log(). |
||
console.log('Source lookup method not implemented'); | ||
this._signalHandler.sourceLookup(fileLocation, +line); | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I troubleshooting a use case with the Trace Compass server and I noticed that the events table data provider for certain trace types will return a list of source in the form [file1:line1, file2:line2]. Even if it's only one file it will provide it with the brackets. I think when we did this prototype, there was only never the brackets. Anyways, I think for now it's ok to not support the list. I'll need to think about more how to support that better.
Is your format always
file:line
or is it also [file:line]`, i.e. with brackets?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.
Our format is using file:line only (at least currently).
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.
We support
[file:line,file:line,...]
in tc for1- SIMD
2- Heterogeonous snapshot events
3- Recycled trace points (bad practice)
4- Callstacks
5- User defined behaviour.
I would argue that
file:line
is fine, until there's a demand for more. When that comes, @GregSavin I hope we can solve the issue together (i.e we don't want to break your work)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.
Thanks, I think I've addressed the immediately actionable review comments. The fact that callstacks can carry source annotations (in a list form) is new to me. Going forward, I'll try to learn more about that specific case (how the data flow works for that), but for now, our only usage of "Source" attribute is as an aspect of our ITmfEvent subclass, and it's only file:line.