Questions tagged [treeviewer]
144 questions
0
votes
0 answers
SWT black background TreeViewer to set expand icon to bright gray
org.eclipse.jface.viewers.TreeViewer.getControl().setForeground(COLOR_WHITE);
org.eclipse.jface.viewers.TreeViewer.getControl().setBackground(COLOR_BLACK);
When setting SWT TreeViewer background to black, the color theme of expand/collapse icon…

Stan
- 37,207
- 50
- 124
- 185
0
votes
2 answers
Is getChildren() of ContentProvider called before treeExpanded() of ITreeViewerListener?
I want to fetch data if a specific element of a tree is expanded.
public void treeExpanded(TreeExpansionEvent event) {
Object element = event.getElement();
if (element instanceof MyClass) {
fetch.......
}
}
The problem is that the…

Ubuntix
- 324
- 4
- 15
0
votes
1 answer
Is there a way to wrap text in a tree viewer (Eclipse) (Not a simple Tree)
viewer.getControl().addListener(SWT.MeasureItem, new Listener() {
@Override
public void handleEvent(Event event) {
TreeItem item = (TreeItem)event.item;
String text = getText(item,…

user1223879
- 123
- 3
- 13
0
votes
0 answers
FilteredTree throwing StackOverFlow Exception
I am using a FilteredTree in my Eclipse plugin view inside a SashForm as follows:
public void createPartControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(2, false));
…

Amrit
- 433
- 3
- 19
0
votes
1 answer
extra column in a JFace TreeViewer
I've a strange problem ...
by creating a (Jface) tree viewer with few column I always got created one more (emtpy) ....
/// TreeViewer creation:
treeViewer = new TreeViewer(parent, SWT.BORDER | SWT.FULL_SELECTION);
/// TreeViewerColumn…

Kasper
- 685
- 2
- 11
- 30
0
votes
1 answer
when is the filter(Viewer,TreePath,Object[]) method called?
I have created and added a new filter to my TreeViewer object. It works fine but I cannot seem to understand when is the filter(Viewer,TreePath,Object[]) called.
So the filter is actually an instance of a class which extends ViewerFilter and needs…

Sterpu Mihai
- 486
- 1
- 4
- 15
0
votes
1 answer
How can we generate a sub menu context dynamically for a treeviewer
I have populated a context menu for a treeviewer but now i need to dynamically populate the submenu context for the treeviewer the sub context menu shold contain all the contents in the list.for eg the list contains [a,b,c,d,e] so now main menu has…

vinod raj
- 69
- 2
- 10
0
votes
1 answer
How can we create a sub context menu for a treeviewer
I have created a context menu using right click mouse for a tree viewer and now i need to create a sub context menu for it so that i need to set the values for it .The code to create a context menu is as follows.
protected void…

vinod raj
- 69
- 2
- 10
0
votes
0 answers
ViewerFilter on TreeViewer
I have a JFace TreeViewer with four TreeColumn. I added a ViewerFilter class into my Tree and Filter by a search text. The problem is it's only filtering the TreeParent and not working on TreeChildren.
For example:
A
A1
A2
A2.1
…

gamo
- 1,549
- 7
- 24
- 36
0
votes
1 answer
Tree from tree paths
In my project I have a lot of data, that can be structured in some way.
To simplify, let's pretend that that data is a bunch of file…

While True
- 423
- 2
- 15
0
votes
1 answer
Java/SWT mouse hover/click over a column of a tree viewer
I have a TreeViewer where some cells are styled to look like links. The tree is filled with content provider and StyledCellLabelProviders. I need to know when those specific "link" cells are hovered (so I change the mouse to the hand cursor) and…

Oren Sarid
- 143
- 1
- 12
0
votes
2 answers
Jface TreeViewer add right click menu, depending on clicked node
There is a good thread on how to correctly hook up a right-click menu to a Jface TreeViewer depending on the selected item.
I would like to show the right click menu depending on: if the right-click was on a node or into "empty space". The problem…

user3726374
- 583
- 1
- 4
- 24
0
votes
2 answers
Eclipse, own TreeViewer with file attributes in Project Explorer View
I'm writing Eclipse plugin. One of many features is create Tree with File Attributes like .java files have (if you click on .java File in Eclipse you can see whole list with what classes or methods this file have).
I can create this tree with…

Peter
- 27
- 3
0
votes
1 answer
How to expand an object in a Treeviewer?
I am trying to understand java treeviews. I created a Treeviewer with the following tutorial:
http://www.eclipse.org/articles/Article-TreeViewer/TreeViewerArticle.htm
Now I have a problem that I can´t solve :/
I want to expand the book-objects with…

JonnyBeton
- 173
- 12
0
votes
1 answer
java treeviewer add element
basically I am working with a treeviewer in Java (org.eclipse.jface.viewers.TreeViewer).
Now my problem is, that I want to add an childelement/ item to an existing knot.
First of all my tree looks like this:
Knot A
Knot B
Knot C
>child1
…

phiLoX
- 3
- 4