Search for commented-out code across files in Eclipse

前端 未结 6 1367
滥情空心
滥情空心 2021-02-08 13:57

Is there a quick way to find all the commented-out code across Java files in Eclipse? Any option in Search, perhaps, or any add-on that can do this?

It should be able to

6条回答
  •  花落未央
    2021-02-08 14:13

    You can mark your own commented code with a task tag. You can create your own task tags in Eclipse.

    From the menu, go to Window -> Preferences. In the Preferences dialog, go to General -> Editors -> Structured Text Editors -> Task Tags.

    Add an appropriate task tag, like COMMENTED. Set the priority to Low.

    Then, any code you comment out, you can mark with the COMMENTED task tag. A list of these task tags, along with their locations, appears in the Tasks view.

提交回复
热议问题