Results 1 to 1 of 1
Thread: TreeViewer Listener
- 01-25-2010, 12:23 PM #1Member
- Join Date
- Jan 2010
- Rep Power
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.
Last edited by darie20; 01-25-2010 at 12:27 PM.
- By Gandolf in forum SWT / JFaceReplies: 0Last Post: 04-03-2009, 02:18 PM
- By xcallmejudasx in forum New To JavaReplies: 1Last Post: 11-10-2008, 07:38 PM
- By sushistix in forum SWT / JFaceReplies: 4Last Post: 10-28-2008, 09:25 PM
- By xcallmejudasx in forum SWT / JFaceReplies: 0Last Post: 10-27-2008, 03:51 PM
- By Java Tip in forum SWTReplies: 0Last Post: 07-07-2008, 04:54 PM