views:

62

answers:

1

In the Java source editor in Eclipse, you could select a block of code, pick it with a mouse click and drop the block of code into another area of the code.

You can't do that for other text editors like XML, HTML, etc. I had to press a key combination before I could use the mouse to move and drop the selected text. I have a new Eclipse set-up now and I can't recall what the key combination is. I tried ctrl-shift, ctrl-alt, alt-shift, and ctrl-shift-alt. None of them work. I had drag-and-drop enabled.

Is there something else on Eclipse that I had installed in my old Eclipse set-up that I forgot to install in my new Eclipse set-up? It shouldn't be because the text editor config has a check box for "enable drag and drop" which I enabled.

Of course, if you are one of those guys who wrote the eclipse text editor, you should also answer this question:

why did you not make the other text editors behave like the Java code editor? Why did you make us into having to do a key-combination to perform drag and drop for the other editors? What's wrong with having all the editors exhibit the same behaviour?

I woogled and googled and could not find any eclipse manual that would tell me what the key combination is. I also could not find it in the local help files. If you required us to use key-combination, why did you not document that in a manual?

My apologies, but I realise I sound a little frustrated now.

+2  A: 

The text DnD (Drag and Drop) feature (initially introduced by bug 11624 in 2007) has been slowly extended to various editors, as reported by the bug 231294:

Tested in EclipsePdt-2.2.0.v20100427
Verified fixed for:

  • PHP files
  • JS files

Still reproducible in:

  • CSS files
  • HTML files
  • XML files (source view)

So it is still "work in progress".
The relevant blocking issues are:

  • bug 178104: [DND] Need to revisit dnd API to allow multiple drop targets
  • bug 173405 Make use of IDragAndDropService (Show Votes)
  • bug 195655 Drag'n'drop selected text
VonC
Does it mean that DnD for non-Java will be intermittently available between updates/releases? And that, in one release, I was lucky enough and then when I did an update .. poof! non-Java DnD went up in smoke? Anyway, what are the keystroke combination that would make it work, if it is available?
Blessed Geek
@Blessed Geek: No, I meant it is a work in progress, and that feature has been progressively extended to different kind of editors, but not the XML one *yet*.
VonC