Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How can I change the DnDManager behaviour when d'n'd' the parts(Changing Stack/Trim/Split Drop Agents behaviour)
How can I change the DnDManager behaviour when d'n'd' the parts [message #1803569] Mon, 04 March 2019 12:03 Go to next message
Onisa Alexandru is currently offline Onisa AlexandruFriend
Messages: 1
Registered: March 2019
Junior Member
Hi I have a problem when trying to modify the behaviour when dragging a part to a certain partStack to be forbidden or dragging the part outside the window detaching the part.
I've tried copying the whole package and classes and then modifying the behaviour in canDrop() in the drop agents and then specify explicitly to use my DnDManager copied but it stil runs the classes from the original jar.

It works I could modify the behaviour but when leaving the drag it enters in the compiled code from eclipse not in mine. Is there other way to do that?
I've tried doing it using reflection and using javaassist to intercept the methods but it's to complex and I would need the whole variables from the specficic drop agent.
Re: How can I change the DnDManager behaviour when d'n'd' the parts [message #1803615 is a reply to message #1803569] Tue, 05 March 2019 14:10 Go to previous message
Eclipse UserFriend
So you should be able to use a feature patch and replace the provided bundle with your fork. What would be even more useful is to figure out how to make the current DND more pluggable so that different drag policies can be provided, and then propose it as a patch.

One idea is to have a DND policy service that is provided as an OSGi service. That would allow the policy service to be replaced entirely. During DND, you'd resolve the policy service from the active part, allowing the policy to be over-ridden on a per-part, -perspective, -window, or -application basis and thus allowing very fine-grained policies.

Brian.
Previous Topic:Package explorer not work fine
Next Topic:Can not change Workspace after upgrade from 4.7 -> 4.9
Goto Forum:
  


Current Time: Sat Apr 27 04:28:47 GMT 2024

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

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

Back to the top