* non null pattern for all matching .class file names
* @return modified classNamePattern, if there are more then one type
* defined in the java file
*/
private String addSecondaryTypesToPattern(IFile file, String fileName, String classNamePattern) {
ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
if (cu == null) {
FindbugsPlugin.getDefault().logError(
"NULL compilation unit for " + file + ", FB analysis might be incomplete for included types");
return classNamePattern;
}
try {
IType[] types = cu.getTypes();
if (types.length > 1) {
for (IType type : types) {
if (fileName.equals(type.getElementName())) {
// "usual" type with the same name: we have it already
continue;