[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Need meta key info

Randy Hudson wrote:
"CL [dnoyeb] Gilbert" <Lamont_Gilbert@xxxxxxxxxxxxxxxxx> wrote in message news:d1hlhb$hvn$1@xxxxxxxxxxxxxxxxxx

I need to know what keys are being held down during a TemplateDrop action, and also during a paste action. The past action is my own action and command, but how to I know what keys are held down, and at which point would you recommend me capturing that info?


The TemplateDrop seems to be limited to Drop Copy only, but I want a DropLink. Any idea on how I should go about getting that?


See handleDragOperationChanged. COPY is set there. A link would suggest that the created item links back to a single instance of the template. i.e., changing the template would update all dropped instances of that template.


Well a Link would imply dropped instances to be linked. Thats what I am looking to imply, though linking means not necessarily what you specified in the context of my application.


Because their is the idea of 'linking' and my app uses 'linking' I want to stay consistent with the method the user would normally use when dropping something and trying to create a link.

I say the COPY set there. But the listener seems to be completely aware that the only action would be copy. So I fear the change will be more complicated.






Looks like we have a whole new duplicated DropTargetListener here instead of the one used normally by Java.


What does that mean? The drop listener is determined by the windowing toolkit, and java has many such toolkits available. In the case of GEF, we use a jface utility class which is derived from the SWT interface.


I see. I guess I had used the awt system before and was used to it. Now I gotta get a feel for this swt one which is slightly different. Like when dropActionChanged() is called, how do I get an indication of what it was changed to? in the awt system, there is an event object passed into this method and you can tell from that. But here there is no way to know, nor reject the new action if you dont want it, AFAICT!?


perhaps there is a method other than 'handleDragOperationChanged' which is called DragOperationChanged, and in that I can tell what th eoperation is?


CL