I am working on a project that uses both graphiti diagrams and various SWT components. Now I am trying to establish a connection between a SWT text widget and a model element in agraphiti diagram using drag and drop. I know how to implement a drag and drop within SWT components and within a graphiti diagram (as connections), but I am not sure how to make it work from SWT to graphiti (or the other way round). Is it even possible?
thanks for your answer, it gave me new ideas for my problems! However, I am not sure whether TutorialPasteEClassFeature is the right class to look at as far as drag and drop is concerned. I dragged an EClass into the diagram in debug mode with a breakpoint set in the paste method, but it did not react. The class seemed to only come to life when actually pasting a EClass into a diagram. Maybe I missed something?
I agree that dragging from graphiti to SWT seems to be more difficult, so I will concentrate on the other direction. The purpose of my intended drag and drop action is not to create a diagram component (such as an EClass in the tutorial) but to deliver an object to an existing diagram component and perform further actions. I could definitely implement copy/paste, but this would not bring too much benefit, since the functionality behind it all already works. It is really "just" about the better usability of being able to drag and drop.