|How to change order of proposals [message #1127838]
||Mon, 07 October 2013 04:18
| Yen Mai
Registered: October 2013
I'm trying to make some changes in ordering of proposals when using Ctrl + Space.
Basically, I don't want to filter any elements - i.e. all the elements that are accepted by grammar will be showed. What I want to change is the ordering of those elements, so that I can have all the valid elements will be displayed on top (very similar with Java's CA in Eclipse)
There is a set of conditions like check constant elements, type-compatible to decide the priority of element in suggested list. Base on the current context, the complete model and proposed element, I need to adjust the priority.
Problem came: I cannot find any good way to adjust the default priority.
I've tried to follow this post
but it seems the ordering is based on text, it will be the same for every model and context.
(** Sorry I have fewer then 5 messages, so I cannot use external links)
Recently, I tried another way, to extend ReferenceProposalCreator and change the priority when lookupCrossReference(). By this way, I got the model and able to do some logic check for type compatible... But I still cannot get the context. Something like the following now bother me:
The model I got from both case above is the same, but you can see they are different context. First case, all integer variables need to be on top. Second case, all variables that match with method arguments need to be on top.
Is there anybody experience with something similar? I really appreciate any comment and suggestion...
Powered by FUDForum
. Page generated in 0.02187 seconds