I'm new to JFace and I have a simple problem which I cannot solve. The funny thing is that I have programmed Java in the last 3 years pretty much, but I noticed that programming with JFace is like learning another programming language, although it's still Java...:(
Ok, back to my problem: I'm trying to develop an xml text editor plugin for Eclipse. I used the auto-generated code from eclipse, which creates the basic editor and I want to improve it by adding some functionalities.
I created a multi page editor (for now I have 2 tabs). The first tab is named "Source Code View" - here you can edit an xml file "by hand", the second one is called "Tree View" - here I take the content of the input file and display it as a Tree. [please pay attention to this last sentence, I think here's the problem]
So far so good. Everything works fine until now. But: what I want is to create a listener for this tree, so that when I manually change the content in the first tab (eg: I delete a row = xml element), the tree should automatically update it's structure. So even if I don't save the input file, the tree should listen to changes made in the first tab (even if unsaved to the file from the workspace).
Well, I googled around for some time and did not find any concrete answer. JFace is not so good documented (with examples) as I hoped.
I would be very glad if you could give me some advice, at least what I should look for.
A listener in pure Java is as simple as "good morning", in Jface (at least for me), it isn't. :(
Thanks in advance.