views:

184

answers:

1

I'm mostly using Eclipse for Android development these days, and have developed good muscle memory for Ctrl-F11 to run my app. Problem is, if I happen to be editing an XML file (like manifest or layout) when I hit that key combination, Eclipse does something that I find inscrutable... It attempts to "run" my XML file, creating an erroneous output file (called something like layout.out.xml) that I then have to delete, adding a useless XML launch configuration to my history, and generally being a pain in my butt.

It's no big deal, but it is an ongoing annoyance. Does anyone know how to disable "run" for XML in Eclipse? I've tried to find a config item for it, but Eclipse's options are such a rabbit hole that I haven't had any luck there myself.

Thanks!

+7  A: 

You can tell Eclipse to launch your latest launch configuration, instead of attempting to create a launch configuration for the current document/selection. Under Preferences -> Run/Debug -> Launching, you can select "Always launch the previously launched application".

EDIT: You probably have a plugin which defines a launch shortcut which triggers on XML-files. This sounds like a pretty dumb thing to do.

JesperE
Thanks, that seems to work. FWIW, I've had trouble with incompatible Eclipse plugins in the past, so this is a clean install with only the Android SDK added. So presumably that launch shortcut is defined in the Android plugin itself.
String