| Summary: | [Codegen] Load resources by dropping Files or IResources on the editor | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Eike Stepper <stepper> | ||||||
| Component: | Core | Assignee: | Ed Merks <Ed.Merks> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | martin.fluegge, stefan.bosshard.4, vroldanbet | ||||||
| Version: | 2.7.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 177156 [details]
Patch for Editor.javajet
My patch misses the declaration of some additional import statements that are needed (e.g. java.io.File)! The framework itself is enhanced to support LocalSelectionTransfer and FileTransfer. File names and IResources are converted to URIs and are passed to the command framework as normal. The command framework is enhanced to provide specialized support for dragging and dropping of URIs such that, by default, they delegate to the resource set's item provider which loads those as resources into the resource set. The changes are committed to master for 2.9 http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=3a0e4ec101b59d0c6799ceeaee8d9360d478935f The changes are available in Kepler. |
Created attachment 177155 [details] Patch for Editor.javajet I find it quite annoying to go through the "Load Resources..." dialog each time, while already seeing the resources in the Resource Navigator or the Windows Explorer. I propose to change the Editor.javajet template to react to drop events of the types String[] for external files and IResource[] for workspace files. I'm not a DND expert but the attached patch seems to work fine for me...