Bug 142234 - problem range includes parenthesis for warning on expression
Summary: problem range includes parenthesis for warning on expression
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-17 10:54 EDT by Tom Seidel CLA
Modified: 2007-03-20 11:48 EDT (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 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