|
|
Re: How are Quick Fix Proposals ordered in Quick Fix Dialog (or hover) [message #809106 is a reply to message #808997] |
Tue, 28 February 2012 13:35 |
Deepak Azad Messages: 543 Registered: July 2009 |
Senior Member |
|
|
Some quick answers...
On 2/28/2012 4:41 PM, Kivanc Muslu wrote:
> While digging up the code, I just realized that some classes (e.g.,
> IJavaCompletionProposal and TemplateProposal) contain getRelevance()
> method that is used in sorting the proposals before displaying.
Yup, we set the 'relevance' for the proposals in code.
> However, if the relevance is the same, are they then sorted
> alphabetically?
Not sure, I will have to check. (It is either that, or the order in
which they are added in the code)
> Are relevance constant values?
They are just integers from -10 to +10. Though the javadoc for
getRelevance() API specifies some other range ;-)
> Is there a place where I
> can see all of them?
Unfortunately no. The constants used are spread all over the place. This
is not an ideal situation even for us, as it is a PITA to try and assign
the correct relevance to a new quick fix. (See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=339223)
--
Deepak Azad
http://wiki.eclipse.org/JDT/FAQ
|
|
|
Powered by
FUDForum. Page generated in 0.02990 seconds