Skip to main content



      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 07:03 Go to next message
Eclipse UserFriend
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 09: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: Wed Jul 23 09:48:23 EDT 2025

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

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

Back to the top