Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339056 - [quick assist][quick fix] The order of quick fix/quick assists is wrong sometimes
Summary: [quick assist][quick fix] The order of quick fix/quick assists is wrong somet...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 03:47 EST by Raksha Vasisht CLA
Modified: 2011-03-09 08:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raksha Vasisht CLA 2011-03-07 03:47:32 EST
N20110305-2000

Case 1 -  (bug 332521 comment #10)
--------
The fix still shows quick assists ahead of quick fixes sometimes :

public class A {

    /**
     * blah blah
     *
     */
    void boo(int ti){

    }
}

1. Have your compiler preferences set to warn/error out with missing/malformed
Javadoc.
2. Ctrl +1 shows :

a) Add all missing tags
b) Assign parameter to new field
c) Add '@param' tag 
d) Rename ...
e) Rename..

==> Shouldn't (c) come before (b) since it solves the problem and here since I
clicked on a param I could also be looking for (c) rather than (a)?

Test case 2:  (from bug 334992 comment# 7)
-----------
public class A {    
    int foo(){
        new StringBuffer();
        return 1;        
    }
}

=> I would expect that the 'Return the allocated Object' quick fix comes before
or after both the Assign quick assists.
Comment 1 Markus Keller CLA 2011-03-07 09:43:05 EST
> Case 1 -  (bug 332521 comment #10)
> a) Add all missing tags
> b) Assign parameter to new field
> c) Add '@param' tag 
> [..]
> ==> Shouldn't (c) come before (b) since it solves the problem and here since I
> clicked on a param I could also be looking for (c) rather than (a)?

I agree, fixed in JavadocTagsSubProcessor.


> Test case 2:  (from bug 334992 comment# 7)
> -----------
> public class A {    
>     int foo(){
>         new StringBuffer();
>         return 1;        
>     }
> }
> 
> => I would expect that the 'Return the allocated Object' quick fix comes before
> or after both the Assign quick assists.

Fixed in QuickAssistProcessor#getAssignToVariableProposals(..).
Comment 2 Raksha Vasisht CLA 2011-03-09 08:44:02 EST
Verified for 3.6 M6 with I20110307-2110.