Questions tagged [treeviewer]
144 questions
2
votes
2 answers
SWT TreeViewer, trim string text in columns
I'm using a SWT TreeViewer to show some paths, is it possible to trim the path string to insert "..." (points) when the path is too long a is not fully visible in the tree column?
Something like this:
Thanks in advance

Daniel Peñalba
- 30,507
- 32
- 137
- 219
2
votes
0 answers
How to get the text Width in pixels of each tree item from a TreeViewer in Java?
I want to get the text width in pixels of each tree item from a TreeViewer having 2 columns, so that I can get the maximum sized tree item to fix it as its respective column's width.
I have already tried using pack method, but it doesn't solve my…

Amy
- 21
- 2
2
votes
1 answer
TreeViewer.setSelection() does not select the correct item after the path given
If there are more tree items based on the same object in the tree viewer, making a TreePath and passing it to TreeViewer.setSelection() does not select the item correctly when the current selection is equal to the one I want to…

True Soft
- 8,675
- 6
- 54
- 83
2
votes
2 answers
Jubula - CheckboxTreeViewer with columns. Selecting specific Column & Row
We've recently converted an element in our Eclipse RCP application from a TableViewer into a CheckboxTreeViewer and are updating the GUI tests in Jubula.
However, The test are failing because they no longer recognize the CheckboxTreeviewer…

Marv
- 77
- 9
2
votes
1 answer
Disable hover highlight in Jface TreeViewer on windows platform in eclipse rcp app
On windows platform, I am implementing a TreeViewer. I added listeners for SWT.MeasureItem, SWT.PaintItem, and SWT.EraseItem.
In SWT.EraseItem listener, I am clearin SWT.HOT bit too. Even after that I get hover highlight of that tree item. I want…

Sachin Giri
- 189
- 11
2
votes
0 answers
CheckboxTreeViewer : hide a checked box
I use a CheckBoxTreeViewer and I want to hide a checked checkbox. I dont' know how to do that : when a check box is hidden, it's uncheckd too... Anyone have a solution ?
Thx

paranoia25
- 626
- 1
- 5
- 23
2
votes
1 answer
Java SWT TreeViewer with one column that needs to be StyledText
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" -…

Oren Sarid
- 143
- 1
- 12
2
votes
1 answer
Java TreeViewer SWT.RIGHT_TO_LEFT
I work on a Eclipse Plugin which have two TreeViewer, one of them with the parameter SWT.RIGHT_TO_LEFT. This looks like this:
As you see the Tree Structure is drawn from right to left and that is what i need. But and here is my problem, the Text…

Darkpara
- 304
- 1
- 2
- 14
2
votes
1 answer
How to expand TreeViewer programmatically?
How to expand TreeViewer programmatically?
If I use underlying Tree.setExpanded(true),
action1 = new Action() {
public void run() {
viewer.getTree().getItems()[0].setExpanded(true);
}
};
element does not…

Dims
- 47,675
- 117
- 331
- 600
2
votes
1 answer
SWT DragSourceEvent image not anchored to mouse pointer correctly
I have the following issue when I drag and drop from a tree viewer in SWT. I am setting the image attribute of the dragSourceEvent e.g.
event.image = _dragImage
which works fine EXCEPT for instances where I have a long label on my tree viewer…

Forrie
- 73
- 7
2
votes
1 answer
How to set Cursor to a Particular Cell of a SWT Tree
I have a SWT Tree, and I want to set the cursor to a particular cell of that SWT Tree.
I have access of TreeViewer.
The screenshot below shows the cursor at column 1. I did it manually, but I want to do it programatically.

Abhishek Choudhary
- 8,255
- 19
- 69
- 128
2
votes
1 answer
How to set double click to edit a Table cell in SWT/JFace?
Is it possible to change the default behavior of SWT/JFace to enable cell editing only with double clicking? The way it is now (with single click) is hard to select a table row without bringing the text field up.
Here is a self-contained code…

freitass
- 6,542
- 5
- 40
- 44
2
votes
1 answer
TreeViewer dialog java eclipse doesnt give tree item children
I created a custom content provider tha implements ITreeContentProvider and my custom model similar to this: Vogella Tutorial JFace where it has Categories and Todos and Todos are stored as children of categories as a list in the class Category.
I…

user847988
- 984
- 1
- 16
- 30
2
votes
0 answers
TreeViewer refresh/update specific TreeColumn
Is there any way to refresh/update just a specific TreeColumn in a TreeViewer?
I currently have a feature in my TreeViewer that cand hide/show a TreeColumn. When a column is hidden, the values for that column can go out of sync with my Model. Thats…

Lori
- 562
- 5
- 24
1
vote
1 answer
Eclipse RCP - refresh PackageExplorerPart programmatically
I'm writing an eclipse plugin which contributes to the standard workbench and one action creates a new file under the current project. My problem is though, that the explorer does not refresh when the file is created in the action. What I tried so…

zeller
- 4,904
- 2
- 22
- 40