From 17292ad9709368d8700fd8fe46bc3d2b98c0cddf Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Fri, 8 Apr 2016 10:52:21 +0300 Subject: [PATCH] resource bundle editor: vfs listener merges events (IDEA-154188) --- .../com/intellij/lang/properties/PropertiesImplUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesImplUtil.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesImplUtil.java index 41ea9dcdaab1..9a5145b7ea62 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesImplUtil.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesImplUtil.java @@ -122,13 +122,18 @@ public class PropertiesImplUtil extends PropertiesUtil { } public static boolean isPropertiesFile(@NotNull VirtualFile file, @NotNull Project project) { - return getPropertiesFile(PsiManager.getInstance(project).findFile(file)) != null; + return getPropertiesFile(file, project) != null; } public static boolean isPropertiesFile(@Nullable PsiFile file) { return getPropertiesFile(file) != null; } + @Nullable + public static PropertiesFile getPropertiesFile(@NotNull VirtualFile file, @NotNull Project project) { + return getPropertiesFile(PsiManager.getInstance(project).findFile(file)); + } + @Nullable public static PropertiesFile getPropertiesFile(@Nullable PsiFile file) { if (!canBePropertyFile(file)) return null;