Could you give me some ideas on how I can achieve this.
I have SWT Tree with me, which is managed by means of Tree Viewer.
I want every item in the tree to be editable (I mean, if you put mouse on it and start editing its string value , it should change). But the Root item should not change.
User should not be able to modify the top item's name.
As of now Editing Support is provided for all the items in the tree including the top item. But top item shouldn't be editable.
Kindly give me some idea about it.
Regards, Venkata Vineel.
If you use JFace you should set a
org.eclipse.jface.viewers.EditingSupport
implemetation on yourorg.eclipse.jface.viewers.TreeViewerColumn
. The editing-support class has a methodorg.eclipse.jface.viewers.EditingSupport.canEdit(Object)
you have to implement and that should returnfalse
for your top-items. For some examples how to use TreeViewers, EditingSupport and all the other stuff regarding JFace see also the JFace Snippets page.