Hi all,
I have created a new view inside Eclipse.
My view is extending ViewPart (org.eclipse.ui.part.ViewPart)
Inside this view there is a TableViewer which displays data that come from a .properties file (containing file name).
To build it up I followed these tutorials:
http://www.vogella.de/articles/EclipseJFaceTable/article.html
http://www.vogella.de/articles/EclipseJFaceTableAdvanced/article.html
So I have built up a ModelProvider which gives me back, in a form of Array the content of the .properties file.
These data are now displayed inside the table, it works fine with sorting and search inside it.
Now one problem arises
This .properties file is filled up by a method called when user chooses different files from a FileDialog (org.eclipse.swt.widgets.FileDialog). Method takes these files and saves filename into .properties file.
If the menu item is called a second time, files change. The .properties file is updated correctly but at the moment the TableViewer is not updated.
I wanted to implement the Observable-Observer model using this tutorial
http://www.java-tips.org/java-se-tips/javax.swing/read-a-data-file-into-a-jtable-and-reload-if-data-file-have-ch.html
but if I do:
I get this error:
The type Observer cannot be a superinterface of MyView; a superinterface must be an interface.
How can I solve this problem?
Or, can you suggest me how to update the table? Probably I am on the wrong way.
Thanks
Marco