No line numbers in Eclipse or Android Studio XML editor

前端 未结 9 1462
南方客
南方客 2021-02-01 12:35

When editing XML files in the editor for Eclipse, line numbers are not displayed.

Use case:

I create a layout with many views, one of these lacks android:layout_

相关标签:
9条回答
  • 2021-02-01 12:59

    Dec 2013: Starting with Eclipse 4.4, you won't have to look for an option to see line numbers, because they will be visible by default.

    Regarding Android Studio, this is another story: since May 2013, Android Studio 0.3.x+ is based on IntelliJ IDEA.
    See "How can I permanently have line numbers in IntelliJ?".


    Lars Vogel just published on his blog:

    Line numbers are default in Eclipse SDK Luna (4.4) as of today

    (December 10, 2013)

    We conducted a user survey if users want to have line numbers activated in text editors in the Eclipse IDE by default.
    The response was very clear:

    YES : 80.07% (1852 responses)
    NO  : 19.93% (461 responses)
    Total  : 2313
    Skipped:   15
    

    With Bug 421313, Review - Line number should be activated by default, we enabled it for the Eclipse SDK build, I assume other Eclipse packages will follow.

    0 讨论(0)
  • 2021-02-01 13:05

    If you're using Android Studio, you can show the line numbers by going to File > Settings > Editor > General > Appearance, then check the "Show line numbers" box.

    UPDATE: Android Studio v1.5+

    1) Click inside the editor, Command + Shift + A, and type "show line numbers"

    2) Select the second option in Preferences and it will take you to the screen that used to exist in General > Appearance

    3) Check the "Show Line Numbers" box

    0 讨论(0)
  • 2021-02-01 13:08

    I know this is an old question but I just came across the problem so I had to find a solution for my self. I assume the menu has changed a bit based on the previous answers that I am reading. So here is how to do it on Android Studio 1.5 on MAC.

    You first click on the window "editor" that you want to see the numbers and then simply choose one of the two proposed solutions under.

    The easiest way is simply right click on the grey bar as owen-gerig shows, which I think is the easiest, but if you want to set it through the menu you can via View -> Active Editor -> Show Line Numbers. Hope this helps.

    0 讨论(0)
提交回复
热议问题