Java tag in comment

Answered

This could be a double post but I don't see the one I posted earlier today.

I have a tag '@sample' that I need to generate an xml file using my own plugin.

Unfortunately it generates warnings all over the place that makes it very hard to interpret the rest of the code.

Is there a way to disable this one warning or can I do this using my plugin (and if that is the case how can I do that)?

 

Thanks, Marcel

0
6 comments

Can you share the full source code? Does this tag render the Java syntax invalid? Can javac still build your code?

0

Yes, building still works as expected it is just that I have to disable all warnings for tags if I use this (and other 'unknown' tags). 

It looks something like below.

Basically I receive warnings for this tag but also, for instance, that the @param tag is not complete.

For Java this may be the case but in my case I have other use for it and I can have hundreds of warning and errors in each .java file :(

 

/**
* Clear the data associated with the specified record and...
*
* @sample
* // Clear the media column
* ...
*
* @param primaryKey
* @param primaryColumnName
* @param tableName
* @param mediaColumnName
* @param mediaSizeColumnName
* @param mimeTypeColumnName
* @param displayColumnName
* @param background
* @param serverName
* @param method optional
* @param arguments optional
*/
0

I guess you can only disable javadoc inspections.

0

And there is no way that I can make override the check for specific tags with a plugin?

0

Position the caret on the tag, then press Alt-Enter and choose "Add to custom tags" option.

The list is configurable via File | Settings | Editor | Inspections | Java | Javadoc issues | Declaration has Javadoc problems | Additional Javadoc Tags.

0

Alt-Enter did not do it for me (maybe because I am on a mac?).

Going through the preferences worked well though.

 

Thank you Roman!

0

Please sign in to leave a comment.