Rename a treeViewer Node with SWT

笑着哭i 提交于 2019-12-04 21:41:46

Are you really using jface's TreeViewer? Your code snippet does show that you are using the simple SWT Tree widget. Hence, much of your code is boilerplate code. If you are really using TreeViewer, then have a look at jface's EditingSupport which is very convenient and flexible allowing you to achieve what you are trying to solve manually.

To make it short, have a look at this snippet:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet026TreeViewerTabEditing.java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!