Bug 280309 - [EditorMgmt] Allow Drag and Drop of File Tabs to External Editors
Summary: [EditorMgmt] Allow Drag and Drop of File Tabs to External Editors
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 14:04 EDT by Old Hamlet CLA
Modified: 2019-09-06 16:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Old Hamlet CLA 2009-06-15 14:04:21 EDT
 
Comment 1 Old Hamlet CLA 2009-06-15 14:12:29 EDT
Sorry, hit the Enter button at the most inopportune time :-(.

I find myself using Emacs and Eclipse together a lot.  While I usually write most of my code in Eclipse, for certain repetitive tasks, I like to use Eclipse's macro functionality.  I find myself trying to drag the file's tab over into my Emacs window in hopes that the file will open there.

While I'm not certain that that sort of functionality is completely in the JDT team's control, one of the following two solutions would work quite nicely:

- When dragging and dropping a file out of Eclipse into an unknown third-party editor, set the "text representation" of the file to the whole path of the file, such that the copied filename can easily be copied and pasted into an "Open File" dialog.

- Provide a context menu item on the file tab titled "Copy full path to clipboard".

Thank you!
Comment 2 Markus Keller CLA 2009-06-16 05:56:32 EDT
If you have the breadcrumb visible in Java editors, then bug 213339 would allow you to drag to the main type from there (I verified that dragging the main type from the Outline view to e.g. Notepad already opens the file).

Currently, the fastest way is probably to use 'Navigate (or context menu) > Show In > Package Explorer' and then drag the file. Or you could copy the file system path by pressing Alt+Enter, Alt+L, Ctrl+A, Ctrl+C, Esc.

Moving to Platform/UI for the original request, since the editor tab is out of control for JDT and Text editors. Since dragging an editor tab already has a different meaning inside the Eclipse workbench window, dragging the file would only apply for drag operations that go outside the window.

IMO, a better approach would be to turn only the icon of the editor tab into a file handle proxy that behaves as if the corresponding file is dragged from e.g. the Navigator view. That's actually a common behavior on the Mac, but it would also make sense to support it on other platforms.
Comment 3 Old Hamlet CLA 2009-06-16 11:03:37 EDT
(In reply to comment #2)
> If you have the breadcrumb visible in Java editors, then bug 213339 would allow
> you to drag to the main type from there (I verified that dragging the main type
> from the Outline view to e.g. Notepad already opens the file).

Hmm, I don't seem to have this functionality.  I am using 3.4.0.  Perhaps there is a maintenance release that provides this functionality?

> Currently, the fastest way is probably to use 'Navigate (or context menu) >
> Show In > Package Explorer' and then drag the file. Or you could copy the file
> system path by pressing Alt+Enter, Alt+L, Ctrl+A, Ctrl+C, Esc.

I didn't think to drag that file.  I also didn't realize that you can navigate so nearly completely with the keyboard.  Wonderful feature!  Great work, guys!
Comment 4 Markus Keller CLA 2009-06-16 11:46:05 EDT
The breadcrumb is available in 3.4.0, but only in Java editors (toggle with the toolbar button or use 'Navigate > Show in Breadcrumb' to show it). But as I said, you would need a fix for bug 213339 to be able to drag from there.

An even better solution is to register Emacs as external editor (on the 'File Associations' preference page) and then open the context menu on the file and choose Open With > Emacs. That doesn't work directly from the editor (bug 69681), but it *does* work on the type in the breadcrumb.
Comment 5 Boris Bokowski CLA 2009-11-17 13:04:24 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:13:39 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.