diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/FileAssociationsManager.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/FileAssociationsManager.java index 48fd91a19285..1caf5ad70f71 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/FileAssociationsManager.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/FileAssociationsManager.java @@ -27,8 +27,10 @@ import java.util.List; import java.util.Map; public abstract class FileAssociationsManager extends SimpleModificationTracker { - public static final FileType[] XML_FILES = new FileType[]{ StdFileTypes.XML, StdFileTypes.XHTML }; - public static final List XML_FILES_LIST = Arrays.asList(XML_FILES); + public static class Holder { + public static final FileType[] XML_FILES = {StdFileTypes.XML, StdFileTypes.XHTML}; + public static final List XML_FILES_LIST = Arrays.asList(XML_FILES); + } public abstract void removeAssociations(PsiFile file); diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AnyXMLDescriptor.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AnyXMLDescriptor.java index 7be52c61489a..51c509d68df4 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AnyXMLDescriptor.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AnyXMLDescriptor.java @@ -15,12 +15,11 @@ */ package org.intellij.lang.xpath.xslt.associations.impl; -import org.intellij.lang.xpath.xslt.associations.FileAssociationsManager; - import com.intellij.openapi.fileChooser.FileChooserDescriptor; -import com.intellij.openapi.fileTypes.FileTypeManager; import com.intellij.openapi.fileTypes.FileType; +import com.intellij.openapi.fileTypes.FileTypeManager; import com.intellij.openapi.vfs.VirtualFile; +import org.intellij.lang.xpath.xslt.associations.FileAssociationsManager; public class AnyXMLDescriptor extends FileChooserDescriptor { final FileTypeManager myFileTypeManager; @@ -33,6 +32,6 @@ public class AnyXMLDescriptor extends FileChooserDescriptor { public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) { final FileType fileType = file.getFileType(); return file.isDirectory() || (super.isFileVisible(file, showHiddenFiles) - && FileAssociationsManager.XML_FILES_LIST.contains(fileType)); + && FileAssociationsManager.Holder.XML_FILES_LIST.contains(fileType)); } } diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AssociationsGroup.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AssociationsGroup.java index 42c0ff89e5f5..ff150c1c684b 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AssociationsGroup.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/associations/impl/AssociationsGroup.java @@ -41,7 +41,7 @@ public class AssociationsGroup extends ActionGroup { if (psiFile == null) return AnAction.EMPTY_ARRAY; final FileAssociationsManager fileAssociationsManager = FileAssociationsManager.getInstance(project); - final PsiFile[] associationsFor = fileAssociationsManager.getAssociationsFor(psiFile, FileAssociationsManager.XML_FILES); + final PsiFile[] associationsFor = fileAssociationsManager.getAssociationsFor(psiFile, FileAssociationsManager.Holder.XML_FILES); final AnAction[] children; if (associationsFor.length == 0) { children = new AnAction[2]; diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/context/XsltContextProviderBase.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/context/XsltContextProviderBase.java index 58241bdf66dd..f70c4f82ccab 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/context/XsltContextProviderBase.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/context/XsltContextProviderBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -326,7 +326,7 @@ public abstract class XsltContextProviderBase extends ContextProvider { return CachedValuesManager.getManager(file.getProject()).createCachedValue(new CachedValueProvider() { public Result compute() { final ElementNames names = new ElementNames(); - final PsiFile[] associations = myFileAssociationsManager.getAssociationsFor(file, FileAssociationsManager.XML_FILES); + final PsiFile[] associations = myFileAssociationsManager.getAssociationsFor(file, FileAssociationsManager.Holder.XML_FILES); if (associations.length == 0) { fillFromSchema(file, names);