I'm working on a plugin for FitNesse integration with IntelliJ.
I'm stuck at a point where I want to let Java classes and methods aware of that they're referenced from a FitNesse table.
A typical FitNesse descision table looks like this:
| table name |
| have milk | need milk? |
| 1 | 2 |
Where 'table name' resolves to the fixture name ("TableName"), 'have milk' resolves to method 'setHaveMilk(s)' on that class and 'need milk?' resolves to a query on method 'needMilk()'.
I assume the right way to reference the usages from the Java class is by creating a "referencesSearch" and a "methodReferencesSearch" extension point (am I correct?).
Secondly, I need to check on the names. FitNesse is using 'graceful naming', e.g. a class and method names can be written in lowercase, separated by spaces. The PSI element contain methods for translating a graceful name to a method name.
I am currently checking the FitNesse document files for (psi-)references, but it seems only a small part of the AST is actually created. This leads me to believe I have to use an index or stubs at some point. Am I correct? If so, which one is the preferred method?
The reference searcher code I created so far can be found at https://github.com/amolenaar/idea-fitnesse/blob/master/src/main/scala/fitnesse/idea/lang/reference/FixtureClassReferencesSearch.java.
How is this going to inteact with the find-usages functionality of IntelliJ?
Any advise would be appreciated :)