Conversation
|
Makes me wonder what will happen with e.g. C structure members. I.e. if you have a structure: struct mystruct {
int foo;
char bar;
};and it gets used in the code like this: struct mystruct my;
my.foo += my.bar;will it be still possible to find references of |
|
workaround is of course distance search xref has its own analyzer, hence it might need changes there too |
|
if I'd have to vote, I'd vote against it ... |
|
OR the other option is to allow it only for certain languages that use such notation ... such as java ... |
Unfortunately, no. As the whole term is stored, then the proposed workaround won't work. We can try to run the definitions found by ctags through the tokenizer again but that brings more problems and it's not completely correct. |
|
The idea here was that the C analyzer will take care of things as The purpose of this PR was that |
Suggester suggests OpenGrok's package names as single tokens for search; however, the search will split the text by
.into multiple tokens and the final result is empty.Example:

http://demo.opengrok.org/search?project=OpenGrok&full=&defs=org.opengrok.indexer.history&refs=&path=&hist=&type=&xrd=&nn=1
This change fixes the problem as now the search is successful:

However, the xref is still wrong, e.g.: http://demo.opengrok.org/xref/OpenGrok/opengrok-indexer/src/main/java/org/opengrok/indexer/history/PerforceHistoryParser.java?r=51e20d51#26
I'm not sure if this can have an adverse effect on other things and if we should rather try to split the defs terms by
.-> but then they do not represent the whole definition (in this instance the package).@vladak, what do you think?