Menu

#18 Drag & Drop of elements should be limited to Escripts files

open
None
3
2008-10-05
2008-10-05
Mirko Raner
No

From the "Escripts Elements" view, drag & drop is possible to any drop target that supports the TextTransfer transfer mode. It is even possible to drag an Escripts element into a Java source file, which is literally guaranteed to be a mistake.
It is not trivial to get the actual IEditorPart that is associated with a given drop target widget. However, the widget's text content can be analyzed and dropping could be forbidden if the widget does not contain valid Escripts XML (i.e., at least a standard <?xml ... ?> header and a top-level <escript> element).
As a further convenience, completely empty text files could be automatically turned into Escripts files by adding the XML header and top-level <escript> element.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.