-
Notifications
You must be signed in to change notification settings - Fork 823
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
Extract source name from .class and use it to locate proper source #5152
Extract source name from .class and use it to locate proper source #5152
Conversation
…file in ElementOpen.open
…ceNameForClassFile
Overall, seems reasonable to me. I guess I'd suggest to add a method to return a "source file name" into |
1aa6b0f
to
1ad59dc
Compare
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.
Looks reasonable to me.
SourceUtilsTest was executed without error. GoToSupportFileNameTest was executed without errors. Merging. |
This breaks java code editing! Steps to reproduce:
As we are nearing code freeze, it would be good to fix this quickly. Thank you. |
Issue was filed as: #5152. There is also additional information with debug info. |
@matthiasblaesing only glanced at this, but from the priority you've given the issue, IMO you should open a revert PR above that can be merged if the fix is not in place by Jan 17th. We shouldn't branch with this problem. Also, issue filed is #5266 😉 |
…r source" (apache#5152) Revert "Removing unused import" This reverts commit 1ad59dc. Revert "Introducing SourceUtils.findSourceFileName method that needs no reflection" This reverts commit e7d5437. Revert "Use the suggested names also when navigating via LSP in VSCode" This reverts commit 7e73d76. Revert "Extracts source name from .class and uses it to locate proper source file in ElementOpen.open" This reverts commit 93f6c38. Closes: apache#5266
I am working on a code base that is mixing Scala and Java. Often Java sources are referencing Scala classes. I'd like the NetBeans IDE to work with it a bit. Luckily there is information in every
.class
file about the name of the source file it comes from. This PR extracts that information and passes it toElementOpen.open
to use it in case regular search method used for Java sources fails.With this PR I am able to jump from
.java
file to.scala
file when Ctrl-Click on a class name.