Bug 150632 - [assist] Content Assist and Parameter Hints sometimes don't work for constructor call
Summary: [assist] Content Assist and Parameter Hints sometimes don't work for construc...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 141256 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-14 06:18 EDT by Markus Keller CLA
Modified: 2007-08-03 07:14 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (4.62 KB, patch)
2007-06-27 09:08 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2006-07-14 06:18:54 EDT
I20060711-1100

In the example below, invoke content assist in the call to constructor of ModifierFilter.

Expected: proposals for constructor call and anonymous inner type
Was: proposals for PUBLIC_FILTER and SETTINGS_LAST_USED_FILTERS. I found no way to get the parameter hints for the constructor call (or the anonymous proposal).

Interestingly, this works fine as soon as I remove the declaration of the abstract method getName(), or move the declaration to after PUBLIC_FILTER.


abstract class MatchFilter {
    private static final String SETTINGS_LAST_USED_FILTERS= "filters_last_used"; 

    // works if next line is commented out or moved to after PUBLIC_FILTER
    public abstract String getName();

    // content assist at new ModifierFilter(|):
    private static final MatchFilter PUBLIC_FILTER= new ModifierFilter();
}

class ModifierFilter extends MatchFilter {
    private final String fName;
    public ModifierFilter(String name) {
        fName= name;
    }
    public String getName() {
        return fName;
    }
}
Comment 1 Tom Hofmann CLA 2006-07-17 06:32:59 EDT
Problem seems to be with jdt-core - we do not get any ctor proposals when there is an abstract method before the field declaration.
Comment 2 Tom Hofmann CLA 2006-07-17 06:51:23 EDT
Moving to core.
Comment 3 Tom Hofmann CLA 2006-07-17 07:03:38 EDT
Maybe related to bug 141256?
Comment 4 David Audel CLA 2007-06-27 09:07:06 EDT
*** Bug 141256 has been marked as a duplicate of this bug. ***
Comment 5 David Audel CLA 2007-06-27 09:08:24 EDT
Created attachment 72595 [details]
Proposed fix
Comment 6 David Audel CLA 2007-06-27 09:13:10 EDT
Released for 3.4M1.

Test added:
  CompletionParserTest2#test0172()

K_METHOD_DELIMITER wasn't removed from the stack when the method is abstract
Comment 7 Frederic Fusier CLA 2007-08-03 07:14:35 EDT
Verified for 3.4M1 using build I20070802-0800.