how to get code-assist for constructors [message #269728] |
Tue, 24 March 2009 11:53  |
Eclipse User |
|
|
|
"code-assist" may not be the right name. When typing code, if I type
"{object-instance}." Eclipse then gives me a list of the methods and
fields that can follow the ".". But how can I get this for constructors.
I saw a thread where someone else asked about this. He was told to use
Ctrl-space. Two problems:
1) after typing "new " and Ctrl-space, Eclipse does not list
constructors for classes I have written. Note that my classes may be in
another project that is in the workspace. Eclipse does know about my
class because I have have an instance of the class and it knows the
fields and methods to display after the ".".
2) after typing "new className(" and Ctrl-space, it shows me the
constructor signatures (eg. Foo(int, int, int) ), but it does not show
me the names of the parameters like it would for methods.
So is there another solution?
Thanks,
Paul
|
|
|
|
Re: how to get code-assist for constructors [message #269747 is a reply to message #269745] |
Wed, 25 March 2009 10:55  |
Eclipse User |
|
|
|
Thank you Daniel. I believe it is working now. Part of my problem was
that I set a filter for class types (not realizing what that setting was
for). When I cleared those filters my constructors came back in the list.
Also I found that after having the name of the class, I can type "(" and
ctrl-space and now I'm getting the list of constructors with the
parameter names.
Thanks again for your reply.
Paul
Daniel Megert wrote:
> Paul Levin wrote:
>> "code-assist" may not be the right name. When typing code, if I type
>> "{object-instance}." Eclipse then gives me a list of the methods and
>> fields that can follow the ".". But how can I get this for constructors.
>>
>> I saw a thread where someone else asked about this. He was told to
>> use Ctrl-space. Two problems:
>>
>> 1) after typing "new " and Ctrl-space, Eclipse does not list
>> constructors for classes I have written. Note that my classes may be
>> in another project that is in the workspace. Eclipse does know about
>> my class because I have have an instance of the class and it knows the
>> fields and methods to display after the ".".
> You need to type at least the first character of your class and then
> press Ctrl+Space. In 3.4 and earlier this will show the types and in
> latest 3.5 builds you will get constructor proposals.
>
> Dani
>>
>> 2) after typing "new className(" and Ctrl-space, it shows me the
>> constructor signatures (eg. Foo(int, int, int) ), but it does not show
>> me the names of the parameters like it would for methods.
>>
>> So is there another solution?
>> Thanks,
>> Paul
|
|
|
Powered by
FUDForum. Page generated in 0.12031 seconds