- This topic has 3 replies, 3 voices, and was last updated 13 years, 8 months ago by Brian Fernandes.
-
AuthorPosts
-
Florian FischerMemberHi,
I am integrating in my project code generated by Axis WSDL2Java. The trouble is that it produces 2 types of warnings: unused variables and dead code. Lots of them. I take warnings seriously and I don’t want genuine warnings lost in a heap of junk warnings. So I want them to go away.
This code is generated in its own package, so I tried to exclude that from validation. The warnings don’t go away. It seems java compiler warnings are something different from validator warnings.
So how can I ignore java warnings from one specific directory? I don’t want to move that code to another project. But I can move it to another source folder.
Thanks in advance.
support-swapnaModeratorflorianfj ,
Can you please check if the solution discussed in this thread helps you?
Attached is a screen shot for your reference.
Let me know how this helps you.
Attachments:
You must be logged in to view attached files.
Florian FischerMemberConfiguring the content of the problems pane doesn’t work because I cannot exclude a directory.
I cannot exclude all Java Problems. The best I could do is to exclude some messages by matching on the error message. But I can only exclude one pattern, so I cannot ignore both types of warnings.
Anyway, that would suppress these 2 warnings from all my java code, and not all warnings from generated code.
Deleting the messages works, but only as long as I don’t clean it. This is the best solution so far.
What I really need is that the “exclude from validation” also excludes compiler warnings from these folders.
Brian FernandesModeratorflorianfj,
I’m afraid we cannot control the Java compiler settings on a directory basis.
The only solution I can think of, is for you to create another project which you use only for generated code and disable the warnings/errors in this project – have your project depend on this one.
You may also want to vote on this bug, which, when fixed, will allow you to apply the settings to a specific source folder in your project:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=220928Hope this helps.
-
AuthorPosts