Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADT eclipse xml layout text editor - often broken until file closed and reopened [duplicate]

Possible Duplicate:
Moving and vanishing lines of code; trouble with Eclipse's XML Editor

I'm new to Eclipse and ADT but have set up my environment on two different machines, and both are displaying the same oddities (both are Windows 7 64 bit).

When changing tabs between the graphical layout and the main.xml views, the lines of code in the main.xml view will start disappearing or moving around. It's hard to display this without a video or animated gif, but I'll attempt with these screenshots:

Note that all I've done is highlight a block of text, and suddenly all these artifacts shwo up. It makes development a bit less than pleasant.

Any thoughts? Please Help me to solve this problem.

images :

Image1Image2

like image 760
user1089679 Avatar asked May 31 '12 02:05

user1089679


3 Answers

FOUND AN EASY WAY TO DISABLE THE BUG!! (WORKAROUND)

Window > Preferences > Android > Editors > Untick "Format XML files using the standard..." (1st option)

Then, just do Ctrl + Shift + F to Auto-format your XML to Eclipse Built-In convention. You should not be getting the bug at all.

like image 70
tom_mai78101 Avatar answered Nov 13 '22 14:11

tom_mai78101


I had this problem my self, when the xml editor does this "thing" go to source->cleanup document, I kept the checkboxes on the dialog at their default (all checked except "convert line delimiters to...") and press ok.

that solved it for me. hope it helps.

like image 35
eleonzx Avatar answered Nov 13 '22 14:11

eleonzx


I had the same problem. What I did was deleted Eclipse and ADT. Then upgraded to Juno. The new combination seemd to fix it for me. I think its a problem with the new ADT and Indigo.

like image 1
Shaun Avatar answered Nov 13 '22 14:11

Shaun