Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop Eclipse from trying to run XML files?

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!

like image 488
Sterling Avatar asked Jan 31 '10 08:01

Sterling


People also ask

Why XML file is not opening in eclipse?

To open XML files in the default editor: In the DITA CMS Eclipse Client, click Window > Preferences. In the left pane, click DITA CMS > General Behavior. Clear the Open unlocked document in Read-only Editor checkbox.

What is Eclipse XML?

Intelligent XML Editor. Oxygen XML Developer is the class leading tool dedicated to XML development, focusing on XML source editing, Schema design and XSLT editing/debugging. It offers powerful ... Eclipse XML Editors and Tools.


1 Answers

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.

like image 71
JesperE Avatar answered Oct 10 '22 16:10

JesperE