How to suppress Java warnings for specific directories or files such as generated code

后端 未结 13 1623
太阳男子
太阳男子 2020-12-02 07:13

I\'m using a parser generator that creates somewhat ugly code. As a result my Eclipse project has several dozen warnings emanating from generated source files. I know I can

13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 07:50

    I don't think Eclipse inherently provides a way to do this at the directory level (but I'm not sure).

    You could have the generated files go into a separate Java project, and control warnings for that specific project.

    I generally prefer to place automatically-generated code in a separate project anyway.

提交回复
热议问题