Recaf
Recaf copied to clipboard
Metadata tagging
Metadata tagging
Recaf should allow metadata to be attached to both classes (Maybe even specific fields/methods) and files. My current thinking is:
- Tags - Things like
networking/io/gui/entry-pointetc to indicate behavior - Key-value pairs - Useful if the user wants to tag things in groups, they can then look for items with the key and see the different values for all matched items
Automatic tagging
Some degree of tagging should be automated. For this, Recaf should be able to declare rules that when matched, assign metadata to the matched item. For example:
Rules can include:
Any reference to XAny reference to a type with tag TParent in hierarchy contains XParent in hierarchy contains a type with tag TN count of T tagged referencesP percent of tagged items match T tagContainsString S with matchmode M>= file size S<= file size S== file size Slikely obfuscated
Design concerns:
- Tagging the current resources must not interfere with rules, so if
java.net.Downloaderis taggedTand we tag an incoming classExampleasTthis should not affectN count of Tsorts of rules.
Default rules:
- Recaf can supply a default set of rules for classes in the JDK
Custom rules:
- In addition to explicitly declaring types, allow users to tag entire maven-artifacts. For example, tag
okhttpasnetworkingso any reference to a class fromokhttpwill can contribute to rules that rely on references to tagged items
How rules get applied:
- When Recaf opens a workspace, run the rules on all items of the primary resource
- When a class is added to the primary resource (or renamed) run it on the class
UI Integration
The workspace navigator should allow something like:
meta>networkingto list all classes tagged with networkingmeta<networkingto hide all classes tagged with networkingmeta=networkingto list all classes tagged with networking, and only networking
Context menus should provide an option to edit the associated metadata of the selected item.
Persistence
These values can be associated with the relative paths to items and persistently stored in a sub-directory of the Recaf directory.
May be able to combine some aspects of this into #717 - where comments can be tagged