Details
-
Type:
Sub-task
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.0Release
-
Fix Version/s: 2.1.2Release
-
Component/s: Editor
-
Labels:None
-
Number of attachments :
Description
When the quick fix dialog is shown, there should be some better ordering for potential fixes. This is particularly the case for the add import quick fix, which may have many types to propose.
Take a look at the class org.codehaus.groovy.eclipse.codeassist.proposals.Relevance, which calculates relevance for content assist. This may or may not be useful for you. In particular, you can look at how relevance is calculated for type proposals, in org.codehaus.groovy.eclipse.codeassist.processors.GroovyProposalTypeSearchRequestor.proposeImportableType()
It would be reasonable to refactor this logic into a separate class so that it would be accessible for quickfixes. If you go that way, then the logic from ...proposeNoImportType() and proposeConstructor() should be refactored out as well.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | fix_greclipse_936_v20110218_1800.patch [ 53797 ] |
| Attachment | fix_greclipse_936_v20110218_1800.patch [ 53797 ] |
| Attachment | fix_greclipse_936_v20110218_2122.patch [ 53800 ] |
| Attachment | fix_greclipse_936_v20110218_2122.patch [ 53800 ] |
| Attachment | fix_greclipse_936_v20110219_2048.patch [ 53820 ] |
| Attachment | fix_greclipse_936_v20110221_1704.patch [ 53840 ] |
| Attachment | fix_greclipse_936_v20110221_1938.patch [ 53844 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.1.2Release [ 16995 ] | |
| Resolution | Fixed [ 1 ] |
| Attachment | fix_greclipse_936_minor_cleanup_v20110224_1341.patch [ 53920 ] |
Another reference for implementing relevance for quick fixes is in jdt:
org.eclipse.jdt.internal.codeassist.CompletionEngine.proposeType(..)
It contains additional relevance calculations, although not all may be applicable to Groovy.