- This topic has 3 replies, 3 voices, and was last updated 20 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
sidereanMemberI am using Eclipse 3.0.1 (fresh install) with MyEclipse 3.8.2 (fresh install) on Windows XP with Sun’s JDK 1.4.2_3.
When I use the sample XML file below, select all the text, right click and select Format -> Document, the file formats but ignores my settings in Windows -> Preferences -> MyEclipse -> Editors -> Common Editor Preferences ->Display tab width. I have specified 2 and it uses 4.
Another problem is if I take the same sample XML file, right click on the filename is Package Explorer (using the MyEclipse Perspective), and select MyEclipse -> Format Document, only the first element after the root gets moved over, the formatting also ignores my Displayed tab width setting and what I see on my screen is for the formatted line is:
<testtesting>this is a test</testing>
When I place my cursor on that line, it corrects to:
<testing>this is a test</testing>SAMPLE XML:
<?xml version=”1.0″ encoding=”UTF-8″?><foo>
<testing>this is a test</testing>
<test />
</foo>
Riyad KallaMemberWhen I use the sample XML file below, select all the text, right click and select Format -> Document, the file formats but ignores my settings in Windows -> Preferences -> MyEclipse -> Editors -> Common Editor Preferences ->Display tab width. I have specified 2 and it uses 4.
I could not reproduce this, I made my changes, closed the editor and reopened it and formatted… it used 2 spaces.
Another problem is if I take the same sample XML file, right click on the filename is Package Explorer (using the MyEclipse Perspective), and select MyEclipse -> Format Document, only the first element after the root gets moved over, the formatting also ignores my Displayed tab width setting and what I see on my screen is for the formatted line is:
I could not reproduce either of these two problems… the entire document formatted according to my settings and displayed correctly.
I’m using Eclipse 3.0.1/MyEclipse 3.8.2/JDK 1.4.2_04 and your sample file as well as a web.xml file I was testing on.
dvh71MemberI am experiencing the same problem as the OP.
To clarify, I see the correct tab width displayed (as set on the “Common Editor Preferences” page) when the “XML Source” page has the “Indent using tabs” option checked. However, when the option is /not/ checked (spaces are used instead of tabs), then the file is formatted with 4 spaces regardless of the settings in “Common Editor Preferences” or the “Text Editor” preferences under “Workbench”.
I’m on Eclipse 3.0.0/MyEclipse 3.8.2/JDK 1.4.2_05, FWIW.
Riyad KallaMemberThis is different, he was having a problem with the ‘display width’, you are actually having a problem with hwo many spaces used. This was a bug that was fixed in CVS and should be available in our 3.8.3 release, thank you you for your patience.
-
AuthorPosts