Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to edit xml files but can edit .java?

Tags:

xml

eclipse

Hi I have a strange problem.

I'm working on an existing project which I have imported into eclipse. I can view all files. There are no errors being indicated. I can run the project and it will show on the emulator.

When I attempt to change the code in the xml file, in fact, all xml files, nothing gets typed in, no characters, no space, no new line. nothing. I even tried making a new xml files, and I couldn't edit it.

Surprisingly, I can edit the .java files.

I hope this is just something stupid on my behalf but anyone help would be appreciated.

Thanks.

like image 800
Pete Avatar asked Jan 20 '11 14:01

Pete


2 Answers

Do you have the XML editor/perspective available in Eclipse? I recall that this package was missing from the version of Eclipse available on Ubuntu 9.10 and had to be installed manually.

To see if you have it, either: check if "XML" is in the list of perspectives from "Window"->"Open Perspective"->"Other...". Or else go to "Help"->"Install New Software" and then click the "What is already installed?" link in the resulting dialog - you're looking for something like "Eclipse XML Editors & Tools".

If you can't find it then you could try installing it from the appropriate software site for your version of Eclipse (for example I'm using 3.5.1 aka Galileo so the site is http://download.eclipse.org/releases/galileo/), via the "Help"->"Install New Software" dialog.

like image 148
Peter Briggs Avatar answered Nov 15 '22 09:11

Peter Briggs


Right click on any XML file and select Open With menu. What do you see checked there? It should either be "XML Editor" or "Text Editor". If it's anything else, some plugin has taken over editor association for XML files. You can fix that in the Open With menu.

If association looks correct, the next thing to try is to open the Error Log view and watch it as you attempt to type into the editor. It could be that you are running into some bug and capturing the stack trace will help. Make sure you clear the error log first.

like image 25
Konstantin Komissarchik Avatar answered Nov 15 '22 08:11

Konstantin Komissarchik