Skip to content
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

Change names in javadocs when you change a mapping. #27

Open
2 tasks
viktor40 opened this issue Mar 2, 2022 · 1 comment
Open
2 tasks

Change names in javadocs when you change a mapping. #27

viktor40 opened this issue Mar 2, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@viktor40
Copy link
Member

viktor40 commented Mar 2, 2022

This is a separate issue for #6. This relates to the second bulletin of this issue.
When changing a mapping the javadocs should also update automatically so links don't break and you don't have to manually change all the javadocs.

  • For the @param tag: when changing the parameter of a method, the parameter should change inside the javadoc for that function.
  • For method or class names linked using @link, @linkplain, @see the linked methods or classes should change names when the linked class or method changes names.
@viktor40
Copy link
Member Author

viktor40 commented Mar 2, 2022

The second point seems the most troublesome at the moment. This will probably need some kind of indexing where when starting enigma, all javadocs are searched for links and indexed which methods or functions are linked. This way we won't need to look through everything each time a mapping is changed. Looking up the indexed methods should be fast enough so there is no noticeable additional lag when renaming a method or a class.

My current idea is a hashmap with the class like as a key net.minecraft.package.ClassName. Each class would then have another hashmap as it's value. It's keys then have the methods from this class that are linked in javadocs, the values are all the javadocs in which these methods are linked.

Please feel welcome to suggest a better datastructure to use or even a better way of indexing.

@viktor40 viktor40 self-assigned this Mar 2, 2022
@viktor40 viktor40 added enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant