mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
i18n dialog: doesn't suggest xml-properties files to add new properties
This commit is contained in:
@@ -42,7 +42,7 @@ public abstract class ResourceBundleManager {
|
||||
public abstract PsiClass getResourceBundle();
|
||||
|
||||
public List<String> suggestPropertiesFiles(){
|
||||
return I18nUtil.defaultGetPropertyFiles(myProject);
|
||||
return I18nUtil.defaultSuggestPropertiesFiles(myProject);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
+5
-1
@@ -20,6 +20,7 @@ import com.intellij.lang.properties.IProperty;
|
||||
import com.intellij.lang.properties.PropertiesFileProcessor;
|
||||
import com.intellij.lang.properties.PropertiesReferenceManager;
|
||||
import com.intellij.lang.properties.psi.PropertiesFile;
|
||||
import com.intellij.lang.properties.xml.XmlPropertiesFile;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
@@ -74,7 +75,7 @@ public class I18nUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static List<String> defaultGetPropertyFiles(Project project) {
|
||||
public static List<String> defaultSuggestPropertiesFiles(Project project) {
|
||||
final List<String> paths = new ArrayList<String>();
|
||||
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex();
|
||||
|
||||
@@ -82,6 +83,9 @@ public class I18nUtil {
|
||||
|
||||
@Override
|
||||
public boolean process(String baseName, PropertiesFile propertiesFile) {
|
||||
if (propertiesFile instanceof XmlPropertiesFile) {
|
||||
return true;
|
||||
}
|
||||
VirtualFile virtualFile = propertiesFile.getVirtualFile();
|
||||
if (projectFileIndex.isInContent(virtualFile)) {
|
||||
String path = FileUtil.toSystemDependentName(virtualFile.getPath());
|
||||
|
||||
+1
-1
@@ -359,7 +359,7 @@ public class I18nizeQuickFixDialog extends DialogWrapper implements I18nizeQuick
|
||||
}
|
||||
|
||||
protected List<String> defaultSuggestPropertiesFiles() {
|
||||
return I18nUtil.defaultGetPropertyFiles(myProject);
|
||||
return I18nUtil.defaultSuggestPropertiesFiles(myProject);
|
||||
}
|
||||
|
||||
protected PropertiesFile getPropertiesFile() {
|
||||
|
||||
Reference in New Issue
Block a user