Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drag And Drop on a view(How to set a D&D listener on a view ?)
Drag And Drop on a view [message #1729691] Mon, 18 April 2016 07:35 Go to next message
Mehdi Alouache is currently offline Mehdi AlouacheFriend
Messages: 9
Registered: April 2016
Location: France
Junior Member
Hello,

I'm currently trying to register a DragAndDrop Listener on the project explorer (which is a view, isn't it ?), but I'm failing at every attempt.
My main purpose is to be able to know when a file is moved from a folder into another one, and get the source of the file in the original folder + in the destination folder.
I'm quite new in Eclipse Plugin Development, here is how I am currently getting the ProjectExplorer View from my class :
for (IViewPart v : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViews()) {
			System.out.println(v.getTitle());
			if (v.getTitle().equals("Project Explorer")){
				System.out.println("PE View");
                               //Add a listener here ?
			}
		}


If you already faced this kind of problem, I would be glad to read your answers Smile

Thanks for reading.
Re: Drag And Drop on a view [message #1731883 is a reply to message #1729691] Tue, 10 May 2016 15:55 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
I don't think this is a GEF related question. Maybe https://eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html can give you some guidance and there are several SWT examples related to DnD.
Previous Topic:[Zest] How to change color and labeltext of an edge(connection)?
Next Topic:Problem migration from e3 to e4 - GEF and tabitem
Goto Forum:
  


Current Time: Sat Apr 20 03:10:25 GMT 2024

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

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

Back to the top