do not search for prefixed properties without JSPs: persistent option
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Wed, 1 Feb 2012 09:02:51 +0000 (13:02 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Wed, 1 Feb 2012 09:04:57 +0000 (13:04 +0400)
plugins/properties/src/com/intellij/lang/properties/UnusedPropertyInspection.java
plugins/properties/src/com/intellij/lang/properties/findUsages/PropertySearcher.java

index 4089e6ca5f3b44303daa8e68c1e167c1165c8ee0..0166a7c989f0addbba049eb8605aa19dd5a0d544 100644 (file)
@@ -78,7 +78,7 @@ public class UnusedPropertyInspection extends PropertySuppressableInspectionBase
         String name = property.getName();
         if (name == null) return;
         if (searcher != null) {
-          name = searcher.getKeyToSearch(name);
+          name = searcher.getKeyToSearch(name, element.getProject());
           if (name == null) return;
         }
 
index b433826ba557600863381905c06072d598941e12..0239356a7a177bc1adb45e4a94ea54c6689d03fb 100644 (file)
@@ -15,6 +15,7 @@
  */
 package com.intellij.lang.properties.findUsages;
 
+import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -24,5 +25,5 @@ import org.jetbrains.annotations.Nullable;
 public interface PropertySearcher {
   
   @Nullable
-  String getKeyToSearch(String propertyName);
+  String getKeyToSearch(String propertyName, Project project);
 }