Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » FilteredTree repaint issues with DND enabled(Filtered tree struggles to paint when control clicking on elements after a selection in another view.)
FilteredTree repaint issues with DND enabled [message #1830259] Wed, 22 July 2020 09:41 Go to next message
Roy Stoliday is currently offline Roy StolidayFriend
Messages: 2
Registered: November 2018
Junior Member
Windows 10 64bit
Eclipse Version: 2020-03 (4.15.0)
Build id: 20200313-1211

To isolate the problem to we are having in our main code base, I've created a new Plugin project using the 'View contribution using 3.x API' wizard.

I run this as an Eclipse Application
I have the Sample View when I run and it works fine.

I've changed the SampleView.java to make a the TreeViewer a FilteredTree instead.
I've then added drag support to it.

I run this as an Eclipse Application
I have Project Explorer open.
I've created a project and put a folder in it.
I expand out all the nodes in the Sample View
index.php/fa/38616/0/
I select one of them ('Leaf 2' under 'Parent 1')


I then select the folder I created in the Project Explorer.
I then CTRL+ left click on the 'Leaf 2' node again.
The other nodes in the tree disappear.
index.php/fa/38617/0/
I can sort of paint them back in again by moving the mouse cursor over where they should be.


Top of createPartControl method now looks like this:

	@Override
	public void createPartControl(Composite parent) {
		
		//viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
		FilteredTree filteredTree = new FilteredTree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), true, true);
		viewer = filteredTree.getViewer();

		drillDownAdapter = new DrillDownAdapter(viewer);
		
	    int ops = DND.DROP_COPY | DND.DROP_MOVE;
	    Transfer[] transfers = new Transfer[] { TextTransfer.getInstance()};
	    viewer.addDragSupport(ops, transfers, new DragSourceAdapter());		
				
		viewer.setContentProvider(new ViewContentProvider());
		viewer.setInput(getViewSite());
		viewer.setLabelProvider(new ViewLabelProvider());


Can anyone help with why there's a paint problem?
Images of problem occurring and full SampleView and also whole project attached for reference.
Re: FilteredTree repaint issues with DND enabled [message #1830274 is a reply to message #1830259] Wed, 22 July 2020 13:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33257
Registered: July 2009
Senior Member
This sounds a bit like this problem:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=526694

No one seems to care to fix it, and then the bug gets closed because no one even responds...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: FilteredTree repaint issues with DND enabled [message #1830303 is a reply to message #1830274] Thu, 23 July 2020 06:28 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
I have re-opened the bug report.

Can you attach the example to reproduce the issue to the bug report?
Re: FilteredTree repaint issues with DND enabled [message #1830359 is a reply to message #1830303] Fri, 24 July 2020 06:43 Go to previous messageGo to next message
Roy Stoliday is currently offline Roy StolidayFriend
Messages: 2
Registered: November 2018
Junior Member
Hi Rolf, my example code is attached. I think you're referring to Ed Merks' issue?
Re: FilteredTree repaint issues with DND enabled [message #1830375 is a reply to message #1830359] Fri, 24 July 2020 11:07 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
Yes, can you add the code to the bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=526694
Previous Topic:Creating PARENT-5-PROJECT_LOC links programmatically
Next Topic:Why does F5 seem to do nothing, but "Refresh" does?
Goto Forum:
  


Current Time: Mon Dec 02 08:49:00 GMT 2024

Powered by FUDForum. Page generated in 0.03427 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top