Skip to content

Commit

Permalink
Document how SearchTags work
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Oct 31, 2023
1 parent b4bc2a1 commit f7decff
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/net/wurstclient/SearchTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Adds search tags to a Wurst feature so that it can be found through the
* search bar in the Navigator GUI.
*
* <p>
* Navigator can already find features by their name and description, so
* repeating that information in the search tags is pointless. However, names
* and descriptions of settings are not used by Navigator, so repeating those
* can make sense if people are likely to search for them.
*
* <p>
* Navigator is not case-sensitive, so for example "NukerLegit" and "nukerlegit"
* are treated the same. However, Navigator struggles with spaces and the order
* of words, for example "NukerLegit", "Nuker Legit" and "Legit Nuker" are all
* treated differently.
*
* <p>
* By convention, search tags with spaces should be written in lower case and
* search tags without spaces should be written in camel case. For example,
* "NukerLegit" and "nuker legit". This is not enforced, but it makes the
* code easier to read.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SearchTags
Expand Down

0 comments on commit f7decff

Please sign in to comment.