Reputation: 15539
I am starting to work on a project coded by someone else. In this project, there are several
new TreeItem("some text")
and
someTreeItem.addItem("subitem")
Now, after installation of GWT plugin (I had some trouble that I don't understand, and several invalid GWT sdk...), eclipse tells me that TreeItem(String)
is undefined, as well as addItem(String)
.
I have the felling that I installed a newer version (hopefully not an older one) of GWT. So my questions are:
new TreeItem(String)̀ and
addItem(String)`?Note:
I found that page which has the "string" API and that page that correspond the the API I have.
Upvotes: 0
Views: 642
Reputation: 1
There are two possibilities:
1) Most probably the version that you have imported does not support this constructor, for that you need to check the documentation.
2) Otherwise just check the .classpath file in project folder and check which version of gwt is being used there and update path to newer one.
Hope this helps.
Upvotes: 0
Reputation: 41089
You can replace new TreeItem("some text")
and addItem("some text")
with
TreeItem item = new TreeItem();
item.setText("some text");
myTree.addItem(item);
and
myTree.addTextItem("some text");
respectively.
Upvotes: 1