0

I configure my task lists to be shown by some standard words (TODO, FIXme...).
Now I see some task in my project R.java.
It's an auto-generated file and I do not see any option to exclude this file from tasks:

    ...
    public static int fbrowse_item_text_color=0x7f070056;
    public static int header_color=0x7f07006d;
    /**  TODO: This is 40% alpha on the default accent color. 
     */
    public static int highlighted_text_material_dark=0x7f070020;
    ...

It annoys me.
I don't want to see in tasks this 'dead' TODO.

Is there any way to exclude R.java files from the TODO lists?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Yura Shinkarev
  • 5,134
  • 7
  • 34
  • 57

1 Answers1

1

Although it is not a good practice in general, you could remove these contents from the Android SDK code. It looks like the comments are in $ANDROID_HOME/platforms/android-21/data/res/values/colors_material.xml

<!-- TODO: This is 40% alpha on the default accent color. -->
<color name="highlighted_text_material_dark">#6680cbc4</color>
<!-- TODO: This is 40% alpha on the default accent color. -->
<color name="highlighted_text_material_light">#66009688</color>

So if you remove these XML comments from the SDK code, they will then be omitted from the generated R.java code.

Again, it is not a good practice to edit Android SDK code, although in this case the removal of comments is safe (i.e. it wont hurt anything).

EJK
  • 12,332
  • 3
  • 38
  • 55
  • No. I find strings with color todo in foders -21 / -22 / -L. Update here xmls. Delete bin/gen, clean project. Have no success. Close Eclipse. Run with -clean arg. Still see: "TODO: This is 40% alpha on the default accent color." and "TODO. Needs updating for Material". I do not know where second TODO is placed... – Yura Shinkarev Nov 25 '15 at 08:13
  • The Android XML files are the only place that the comments could come from. Is it possible that you did not track down the right XML file? Your IDE might be pointing at a different SDK directory than the one you modified. It might be a pain, but I suggest a more expansive search of your system to see if the XML is coming from elsewhere. Also, be sure to delete the generated R.java file (which it sounds like you did, but it doesnt hurt to double check). – EJK Nov 25 '15 at 19:30
  • I have only one folder with sdk. I start search in android-sdk, eclipse, my docs/.eclipse, workspace folders by string "TODO. Needs updating for Material". Result: find strings in R.java (gen folder) / .markers (in workspace\.metadata\.plugins\org.eclipse.core.resources\.projects\project folder). But important moment - we use as java library support-library, it have in one of xml - this TODO. Remove from this xml, remove .markers. Close / clean eclipse - this TODO disappear – Yura Shinkarev Nov 26 '15 at 10:16
  • Second TODO also present at suppot libray, remove it too. Now task lists is clean. Thanks. – Yura Shinkarev Nov 26 '15 at 11:51