Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » How to Interface Diagram Editor Drag and Drop(Tech Question)
How to Interface Diagram Editor Drag and Drop [message #1790165] Wed, 06 June 2018 11:35
Tom Strong is currently offline Tom StrongFriend
Messages: 1
Registered: June 2018
Junior Member
I work on OpenCPI producing a UI for framework operation. We're using sapphire to create XML editors using both the forms and Diagram capability.

I have produced our own view for framework assets and I want to be able to drag and drop elements from that view into the diagram. We've implemented the ability to do so using the Eclipse Project Explore view.

Doing a little more digging. Revising post.

I've now seen an example that does the drag source event processing. In it I see the LocalSelectionTransfer singleton carries the selection information. This information is an ISelection[]. ISelection is a base interface of a structured viewer item. I am using a Tree in my presentation. It looks like I need to implement it as a TreeViewer. Am I correct?

Now I need to know how a file selection in Project Explorer is setup. I assume one of the following 3 is carried in the selection data (get/setData()): IFile, IPath, or the path to the file as a string.

Previous notes:
- I need to know what the needs to be done in setting up my dragSource and DragSourceListener.

- I've found that LocalSelectionTransfer is used and I've gotten the ObjectsTransferDropTargetListener handleDragOver method to be called. I discovered this when I set my DragSource to use the LocalSelectionTransfer in the types array.

- I see that in my (current) DragAndDropService that a Context is passed in and an IFile is pulled off. Prior Event processing is obscured.


Thanks for your help,
Tom

[Updated on: Mon, 11 June 2018 19:37]

Report message to a moderator

Previous Topic:Sapphire in RAP (Remote Application Platform) possible
Goto Forum:
  


Current Time: Wed Sep 19 06:40:31 GMT 2018

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

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

Back to the top