Hi, I'm having trouble with the new XML format used for auto-completion.
What sorting algorithm should be used for the keywords? ATM it looks like whatever I do, either the calltips or the function names are not shown properly.
It seems to depend on the sorting, but I'm not sure about this. Nothing I have tried so far worked as expected.
Any help appreciated. Here's my API file: http://localhostr.com/files/9be040/omni-bot.xml
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, this is a bug in Notepad++, Calltips were always expecting a case-sensitive sort. This will be fixed in the next release.
The calltips do not support the dot because its actually an operator in most languages, meaning you can use a space too, and the name preceding
can be anything. Since the parser is very simple and 99% of the cases the dot is used on variables instead of static names, I've opted to ignore them.
Maybe someone someday makes a proper IntelliSense clone, but that's doubtful :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As of yet, the XML files do not support any other character than
0-9, a-z, A-Z and _ . I see you have some dots in there for namespace (or whatever its actually called), which will not works.
Also, there are two ways for sorting:
Case insensitive, this is what you seem to need considering the ignoreCase tag:
A-Z and a-z are considered equal, and most non-alphabetic characters come _after_ those.
so it could be sorted like:
filea
FileB
file_exists
Case sensitive:
a-z and A-Z do not overlap, and some characters are in between the two or after a-z.
In this case, the ordering would probably be something like
FileB
file_exists
filea
since upper case letters come first and underscore is before lowercase letters.
The TextFX has some sorting functions which work exactly as they should. Also, I'm making a tool which will read
a XML file and do any sorting needed for you. Your XML file sorted + the tool can be found here: http://localhostr.com/files/3b5f17/remdup.zip
Its still in development but it should sort of do the job. It was intended to remove duplicates (hence the name),
but I thought it could do some sorting as well.
It removes the comments though: http://localhostr.com/files/19899c/remdup.zip
The reason it depends on the sorting is that
-Scintilla depends on it for autocomplete
-Calltip depends on it to make searching just a little more efficient (not much point in search from 't' of the function starts with an 'f')
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a bunch man, that clears things up quite a bit. I will try the combination case-insensitive sorting/ignoreCase first and eventually delete the dotted keywords if that doesn't help. I don't like the latter idea though, because it is immensely helpful if you start typing "voice" and see all the voice commands, for example. Whatever, thanks for the help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm having trouble with the new XML format used for auto-completion.
What sorting algorithm should be used for the keywords? ATM it looks like whatever I do, either the calltips or the function names are not shown properly.
It seems to depend on the sorting, but I'm not sure about this. Nothing I have tried so far worked as expected.
Any help appreciated. Here's my API file: http://localhostr.com/files/9be040/omni-bot.xml
Ok, this is a bug in Notepad++, Calltips were always expecting a case-sensitive sort. This will be fixed in the next release.
The calltips do not support the dot because its actually an operator in most languages, meaning you can use a space too, and the name preceding
can be anything. Since the parser is very simple and 99% of the cases the dot is used on variables instead of static names, I've opted to ignore them.
Maybe someone someday makes a proper IntelliSense clone, but that's doubtful :)
Thanks for the quick answers. Greatly appreciated. I'll see what the next version brings.
As of yet, the XML files do not support any other character than
0-9, a-z, A-Z and _ . I see you have some dots in there for namespace (or whatever its actually called), which will not works.
Also, there are two ways for sorting:
Case insensitive, this is what you seem to need considering the ignoreCase tag:
A-Z and a-z are considered equal, and most non-alphabetic characters come _after_ those.
so it could be sorted like:
filea
FileB
file_exists
Case sensitive:
a-z and A-Z do not overlap, and some characters are in between the two or after a-z.
In this case, the ordering would probably be something like
FileB
file_exists
filea
since upper case letters come first and underscore is before lowercase letters.
The TextFX has some sorting functions which work exactly as they should. Also, I'm making a tool which will read
a XML file and do any sorting needed for you. Your XML file sorted + the tool can be found here:
http://localhostr.com/files/3b5f17/remdup.zip
Its still in development but it should sort of do the job. It was intended to remove duplicates (hence the name),
but I thought it could do some sorting as well.
It removes the comments though:
http://localhostr.com/files/19899c/remdup.zip
The reason it depends on the sorting is that
-Scintilla depends on it for autocomplete
-Calltip depends on it to make searching just a little more efficient (not much point in search from 't' of the function starts with an 'f')
Thanks a bunch man, that clears things up quite a bit. I will try the combination case-insensitive sorting/ignoreCase first and eventually delete the dotted keywords if that doesn't help. I don't like the latter idea though, because it is immensely helpful if you start typing "voice" and see all the voice commands, for example. Whatever, thanks for the help.
Hm, weird, now I've removed all keywords with dots in them, and still I get calltips only for "assert". The file is here: http://localhostr.com/files/8eed83/omni-bot.xml