mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-119439 - ISE: FileContentImpl.createFileFromText
This commit is contained in:
+3
-1
@@ -169,7 +169,8 @@ public class StubViewerPsiBasedTree implements ViewerPsiBasedTree {
|
||||
@Nullable
|
||||
private static Stub buildStubForElement(Project project, PsiElement rootElement, @NotNull String textToParse) {
|
||||
Stub stub = null;
|
||||
StubTree tree = ((PsiFileWithStubSupport)rootElement).getStubTree();
|
||||
PsiFileWithStubSupport psiFile = (PsiFileWithStubSupport)rootElement;
|
||||
StubTree tree = psiFile.getStubTree();
|
||||
if (tree != null) {
|
||||
stub = tree.getRoot();
|
||||
}
|
||||
@@ -183,6 +184,7 @@ public class StubViewerPsiBasedTree implements ViewerPsiBasedTree {
|
||||
try {
|
||||
fc = new FileContentImpl(file, file.contentsToByteArray());
|
||||
fc.putUserData(IndexingDataKeys.PROJECT, project);
|
||||
fc.putUserData(IndexingDataKeys.PSI_FILE, psiFile);
|
||||
stub = StubTreeBuilder.buildStubTree(fc);
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user