facebook

XML editor not replacing tabs with spaces

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #288575 Reply

    John-N
    Member

    I’m using 6.5.1-GA-20080715 and eclipse 3.3.2 M20080221-1800

    I’ve changed the global preferences for editors to use spaces rather than tabs

    General > Editors > Text Editors

    Displayed tab width: 3
    [x] Insert spaces for tabs

    However, when I reformat an XML file using MyEclipse, it replaces all of the spaces with tabs.

    I have also enabled this option to visually see the tabs:

    [x] Show whitespace characters.

    #288604 Reply

    Loyal Water
    Member

    John-N,
    This is an eclipse bug that the eclipse team is working on:-
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=54940

    You should add you comments to this bug to it higher on their priority list. Im sorry you ran into this issue.

    #288629 Reply

    John-N
    Member

    Here is a response from the eclipse bugzilla forum:

    — Comment #17 from Daniel Megert <daniel_megert@ch.ibm.com> 2008-08-27 06:39:53 -0400 —
    John, your problem is either wrong XML formatter preferences in your workspace
    or a bug in the XML formatter but definitely unrelated to the compare editor.

    #288712 Reply

    Loyal Water
    Member

    John-N,
    I just got a feedback from the dev team and they were able to reproduce that issue with plain Ganymede. This looks like a bug in the core XML editor. I tried looking for this bug in the Eclipse bugzilla system but I was unable to find it. You can go ahead and file this bug. We would stay on top of this issue and the bug fix would be reflected in MyEclipse as soon as the Eclipse team fixes it.
    https://bugs.eclipse.org/bugs/

    #300538 Reply

    Matt Passell
    Member

    Any update on this? It’s a source of irritation for me as well.

    –Matt

    #300555 Reply

    Matt,
    Can you select “Indent Using Spaces” under Windows > Preferences > MyEclipse > XML > XML Source
    and verify if that works?

    #300559 Reply

    Matt Passell
    Member

    Hi Shalini,

    Yes, it’s set to “Indent Using Spaces” with an “Indentation Size” of 2, but still inserts tabs. I’m running MyEclipse 7.1.0 on top of an installation of Eclipse 3.4.1. Is this something that’s been fixed in MyEclipse 7.5? If so, that would be another reason for me to upgrade.

    (By the way, in my environment it’s Windows > Preferences > MyEclipse > Files and Editors > XML > XML Source)

    Thanks,
    Matt

    #300571 Reply

    Matt,
    Can you un-check the settings “Insert spaces for tabs” under General > Editors > Text Editors, click apply and set the option “Indent using spaces” under Windows > Preferences > MyEclipse > Files and Editors > XML > XML Source as shown and click apply. I have tested this using ME7.5 and I have attached the screen shots of xml files before and after formatting. Please let me know if this works for you.

    Attachments:
    You must be logged in to view attached files.
Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: XML editor not replacing tabs with spaces

You must be logged in to post in the forum log in