-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Code comments #1127
Code comments #1127
Conversation
@skylot somehow comments search view is always empty for me. Am I doing something weird? :) |
@Surendrajat thanks! Looks like issue reproduces for inner classes. With warning in log:
|
@skylot seems like I did not realize I was only testing inner-classes ;P |
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.
Last commit fixed the remaining issue, so I'm happy with this feature. Thanks again!
Get rid of the "offset" field in the CodePosition is so exciting, it makes rename without reloading classes and update index much more easier. I think it's better not use CodePosition as a map key, so we can just update its relevant position after rename no need to reindex anymore. Since CodePosition is absolutely sorted, I think use a list and binary search is enough for efficiency. |
@lbj-the-goat you are right, but only partially. But I don't think it is a good idea to use inplace renaming, because it is not general enough, and as a result we will need to implement 2 ways of applying rename or comments or any other code modifications. |
@skylot resource search doesn't has a cache it's not slow. We only want a match in a line and it's in-memory, so I think a full document search shouldn't be a big problem. |
@lbj-the-goat sure, code index not really needed, but it slightly speeds up search results generation by caching them. So we need to make some PoC to check how such changes will affect performance and memory usage. And for this PR: I fixed some small search issues, and not found any new one, so I think it is ready for merge. |
@skylot Great plan, I once tried to change search featrue to multithreaded, but failed. |
Well, tests are a good thing, but now jadx-gui don't have them, so I think it is ok 🤣 |
In a quick test of the new code comment feature I wasn't able to use the key combinations proposed by the context menu. May be because there is no |
@jpstotz hm, I thought, these keystroke bindings are kinda language independent, and now I have no idea how to fix this. I will try to search for a solution anyway. And thanks for share this issue! |
Add comments feature to jadx-gui (fixes #359)