Search in sources :

Example 1 with BaseJspFile

use of com.intellij.psi.jsp.BaseJspFile in project intellij-community by JetBrains.

the class JspContextManager method getRootContextFile.

@NotNull
public BaseJspFile getRootContextFile(@NotNull BaseJspFile file) {
    BaseJspFile rootContext = file;
    HashSet<BaseJspFile> recursionPreventer = new HashSet<>();
    do {
        recursionPreventer.add(rootContext);
        BaseJspFile context = getContextFile(rootContext);
        if (context == null || recursionPreventer.contains(context))
            break;
        rootContext = context;
    } while (true);
    return rootContext;
}
Also used : BaseJspFile(com.intellij.psi.jsp.BaseJspFile) HashSet(com.intellij.util.containers.HashSet) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

BaseJspFile (com.intellij.psi.jsp.BaseJspFile)1 HashSet (com.intellij.util.containers.HashSet)1 NotNull (org.jetbrains.annotations.NotNull)1