[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Hi JDT-guys,
I've been looking around for more detailed information about the eclipse content assist functionality for java, however i was constantly facing the standard documentations. Maybe you could be so kind to answer my questions?!
I currently prepare (myself and) my projects to migrate from jBuilder 2006 to Eclipse and one thing, that really got used to over the past years, was the "code insight" funtion of jBuilder2006. Obviously the "content assist" is the eclipse-pendant.
Question 1: (given the following sample code)
List<String> stringList = new [CTRL-SPACE]
the code assistant proposes List<String> as constructor, which is obviously senseless/incorrect, since List is a pure interface (hence, it has no contructors). So the actual question is, how do i get the available constructors listed? I could press 'a' prior to Ctrl-Space and would end up with e.g. the ArrayList constructors, but is there any chance, to get simply all (not only those, that start with an 'a') constructors listed? jBuilder was not even able to list all constructors, but also referred to the current import statements, such that ArrayList would only be listed, if it was included before. So this question clearly refers to the new-operator.
Question 2:
given the following declaration/initialization code:
List<String> stringList = new ArrayList<String>();
[code, filling the list]
String myString = stringList.
The code assistant will now show a list of all methods it knows from the List-interface. However many of the methods in the list-interface wouldn't work either within such an assignment. So, is it possible to filter out methods with inappropriate return types?
Best regards
Uwe