IDEA-61662 (Inspection "Class is a singleton" - false positive)
[idea/community.git] / plugins / InspectionGadgets / src / com / siyeh / ig / classlayout / SingletonInspection.java
index ef73360935f9f28850ea0a53ef7196d8e67d2242..683f9bbe4092a2f8c4db8621f10d1f61f5f6eac7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Dave Griffith, Bas Leijdekkers
+ * Copyright 2003-2010 Dave Griffith, Bas Leijdekkers
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,16 +24,24 @@ import org.jetbrains.annotations.NotNull;
 
 public class SingletonInspection extends BaseInspection {
 
+    @Override
     @NotNull
     public String getDisplayName() {
         return InspectionGadgetsBundle.message("singleton.display.name");
     }
 
+    @Override
     @NotNull
     protected String buildErrorString(Object... infos) {
         return InspectionGadgetsBundle.message("singleton.problem.descriptor");
     }
 
+    @Override
+    public boolean runForWholeFile() {
+        return true;
+    }
+
+    @Override
     public BaseInspectionVisitor buildVisitor() {
         return new SingletonVisitor();
     }