IDEA, JavaBean development, and Inspect

Hi,
I am using IDEA 4.0. Virtually all of my code is JavaBean. Two things:
1. BeanInfo files. Inspect tells me that problem synopsis is the "class is not instantiated". How can I tell IDEA that this is not a problem with classes that end in the name "BeanInfo"?
2. Bean accessors. These guys are get/set methods. The set methods are normally used in a property editor. However, IDEA says that they can be removed since they are "never accessed".

I get the feeling I must be missing some project configuration (it is a normal Java project).

Thank you.

-- rich

1 comment


There's two ways to go about this: The easy way and the right way.

The easy way: when the inspection panel shows a class or method as unused, you can tell IDEA to add it to the entry points it uses to determine reachability. Just right click on the inspection result and select "Add to entry points".

The right way: write test cases that instantiate the classes and exercise the methods. If it was worth coding, it's worth testing.

--Dave Griffith

0

Please sign in to leave a comment.