Bug 142234

Summary: problem range includes parenthesis for warning on expression
Product: [Eclipse Project] JDT Reporter: Tom Seidel <tom.seidel>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: martinae
Version: 3.1.2   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tom Seidel CLA 2006-05-17 10:54:56 EDT
public class ContentAssist {
    private String memberVariable;

    public String getMemberVariable() {
        return (memberVariable);
    }
}
If i set the cursor to memberVariable and using STRG+F1 there is no "Qualify with 'this'". The Quick Fix - Entry "Remove extra parenthesis" is only aviable if I click on the marker.
Comment 1 Martin Aeschlimann CLA 2006-05-17 12:38:33 EDT
Reproduced in RC4. 
- set 'unqualified access' to warning
- no quick fix for (memberVariable);


Problem is that the compiler includes the brackets in the problem range for 'unqualified' access. We could implement a workaround for quick fix, but it would be more correct to report the warning only in the name.
Comment 2 Olivier Thomann CLA 2006-05-17 22:06:03 EDT
There is no parentherized expression in the compiler ast nodes.
This is unlikely to be changed for 3.2.
I would do it for 3.3.
Philippe, 3.3 or 3.2.1?
Comment 3 Philipe Mulet CLA 2006-05-18 04:44:09 EDT
3.3 I think
Comment 4 Philipe Mulet CLA 2006-05-18 04:44:37 EDT
UI may workaround it for 3.2.1 if necessary.
Comment 5 Olivier Thomann CLA 2007-02-11 21:37:49 EST
Released for 3.3M6.
Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.FieldAccessTest#test005/006
Comment 6 David Audel CLA 2007-03-20 11:48:34 EDT
Verified for 3.3 M6 using build I20070320-0010