mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 13:11:39 +07:00
EA-49472 - assert: SmartPointerManagerImpl.createSmartPsiElementPointer
This commit is contained in:
-3
@@ -24,8 +24,6 @@ import com.intellij.openapi.editor.ex.MarkupModelEx;
|
||||
import com.intellij.openapi.editor.impl.DocumentMarkupModel;
|
||||
import com.intellij.openapi.editor.impl.EditorMarkupModelImpl;
|
||||
import com.intellij.openapi.editor.markup.MarkupModel;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.ProperTextRange;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
@@ -128,7 +126,6 @@ public class DefaultHighlightInfoProcessor extends HighlightInfoProcessor {
|
||||
final Project project = psiFile.getProject();
|
||||
final Document document = PsiDocumentManager.getInstance(project).getDocument(psiFile);
|
||||
if (document == null) return;
|
||||
final ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator();
|
||||
DaemonCodeAnalyzerEx
|
||||
.processHighlights(document, project, null, range.getStartOffset(), range.getEndOffset(), new Processor<HighlightInfo>() {
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -257,7 +257,7 @@ class DocumentFoldingInfo implements JDOMExternalizable, CodeFoldingState {
|
||||
continue;
|
||||
}
|
||||
PsiElement restoredElement = FoldingPolicy.restoreBySignature(psiFile, signature);
|
||||
if (restoredElement != null) {
|
||||
if (restoredElement != null && restoredElement.isValid()) {
|
||||
myPsiElements.add(SmartPointerManager.getInstance(myProject).createSmartPsiElementPointer(restoredElement));
|
||||
FoldingInfo fi = new FoldingInfo(DEFAULT_PLACEHOLDER, expanded);
|
||||
restoredElement.putUserData(FOLDING_INFO_KEY, fi);
|
||||
|
||||
Reference in New Issue
Block a user