treeviewer

CheckboxTreeViewer: Can't expand nodes by default

风格不统一 提交于 2019-12-11 08:47:45
问题 I recently implemented a CheckboxTreeViewer in my own Dialog . This works fine so far except that the tree doesn't allow me to expand nodes by default. It only works when I check the checkbox, as you can see in the following images: This is by default. As you can see, it's not possible to expand the node, though it has children: After checking the check box, it works: I already tried to use setExpandPreCheckFilters , but with no success: Composite container = (Composite) super

Updating Eclipse JFace Treeviewer when model changes?

ぃ、小莉子 提交于 2019-12-11 06:16:15
问题 I am developing a RCP application with a TreeViewer . While there are good number of articles to explain how to add editing support to the Viewer (and how changes in view are updated in the model), I don't find much for updating the Treeview when the underlaying model changes. my question in short: TreeView ----> Model updation ------ there are lots of examples Model ----> Treeview updation ----- this is my question Edit: This is what I tried and it works. comments please viewer.getTree()

Scrolling TreeViewer Tree SWT

你。 提交于 2019-12-11 05:58:25
问题 My dialog have two TreeViewer components. The vertical scroll bars have to be synchronized. I have tried with setSelection and setTopItem methods but both have no effect to other tree. xViewerLeft = createXViewer(leftComposite, this); xViewerRight = createXViewer(rightComposite, this); xViewerLeft.getTree().getVerticalBar().addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event arg0) { //xViewerRight.getTree().setSelection(xViewerLeft.getTree().getSelection()); /

JFace - How can I make only one column editable in TreeViewer based on checkbox value from another column in the same row?

穿精又带淫゛_ 提交于 2019-12-11 02:37:23
问题 I have a TreeViewer which has two columns: ProximityClustersColumn : which has names as String, selectionColumn: which has checkbox as shown in the figure TreeViewer I have two questions: On clicking the selection column's checkbox, the corresponding name of ProximityClustersColumn should become editable. For eg: When I click on the checkbox corresponding to "Studium organisieren-Formelles", the cell "Studium organisieren-Formelles" should become editable. Also, as seen in the figure, a check

Hiding empty parents - JFace's TreeViewer

时光毁灭记忆、已成空白 提交于 2019-12-10 18:34:41
问题 I'm creating a tree viewer in JFace and I want to achieve something. I use filter in it. The filter works well, but not perfectly. When I use filter.expandAll() method, the filter filters all of the tree's items, but there's something really annoying. Although it filters all of the tree's items, it doesn't hide item parents, that become now empty. Example: As you can see, there's only one item that matches the filter: "General/Map/New". But all of the parents are now shown although that they

How best to use ViewerFilter on a TreeViewer?

[亡魂溺海] 提交于 2019-12-06 21:22:41
问题 I am applying a ViewerFilter to a tree of a few branches, but mostly leaves. The filter really applies to the leaves, using properties within the leaf. All branches are left untouched so that their leaves can appear. However I would like to filter out branches that contain no selected leaves, and I can see no mechanism within ViewerFilter that allows this. Is this possible at all? For example, given the notional tree below (where b is a branch, a L is a leaf) b0 b1 L2 L4 L8 b2 L1 L3 L5 I

Updating the JFace TreeViewer after the underlying model changes

前提是你 提交于 2019-12-06 13:47:51
问题 I have a tree viewer in my view, which listens to EMF models from the standard Ecore editor and does further things with it. I have already registered a selection listener, which checks whether the selected elements are the types the tree viewer needs as input. So the problem is that if there any changes in the model (e.g. adding a new element or new information to an existing element etc.) the tree viewer shows the changed model only if the user changes the selection, i.e. clicks to any

Rename a treeViewer Node with SWT

笑着哭i 提交于 2019-12-04 21:41:46
I have a treeViewer on which I have to implement editing for renaming that should be able to be invoked in two ways: by the F2 key by a single mouse click if a node is selected. More ever as Windows allows folder rename. For this, I have used ICellModifier , but it has not given the expected result. By the following code, I have achieved point number 2 though it is creating a problem for opening the editor on a double click if a node is selected. The main concern is to allow the F2 key for renaming which is still pending. I have to use the same code that I have written in the following in a

Java SWT TreeViewer with one column that needs to be StyledText

╄→гoц情女王★ 提交于 2019-12-04 16:56:43
I have a TreeViewer used in an eclipse plugin that uses a content provider and a label provider that implements all of ( ITableLabelProvider , IFontProvider , IColorProvider ). But I need one of the columns of the table it creates to hold "links" - underlined blue text that when clicked causes some popup to open. I guess what I want to do is cause that single column to hold styled text and not just text, and attach a listener to the items in that column of the tree, but I couldn't figure out how to do it. greg-449 Use a separate label provider for each column using TreeViewerColumn :