mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't commit documents synchronously in dom ui (EA-90158 - assert: PsiDocumentManagerBase.commitDocument)
This commit is contained in:
@@ -31,7 +31,6 @@ import java.util.Set;
|
||||
* @author peter
|
||||
*/
|
||||
public class UndoHelper {
|
||||
private final Project myProject;
|
||||
private boolean myShowing;
|
||||
private final Set<Document> myCurrentDocuments = new HashSet<>();
|
||||
private boolean myDirty;
|
||||
@@ -45,7 +44,6 @@ public class UndoHelper {
|
||||
};
|
||||
|
||||
public UndoHelper(final Project project, final Committable committable) {
|
||||
myProject = project;
|
||||
final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
|
||||
CommandProcessor.getInstance().addCommandListener(new CommandAdapter() {
|
||||
@Override
|
||||
@@ -86,7 +84,6 @@ public class UndoHelper {
|
||||
}
|
||||
|
||||
public final void setShowing(final boolean showing) {
|
||||
commitAllDocuments();
|
||||
myShowing = showing;
|
||||
}
|
||||
|
||||
@@ -94,17 +91,6 @@ public class UndoHelper {
|
||||
return myShowing;
|
||||
}
|
||||
|
||||
public final void commitAllDocuments() {
|
||||
final PsiDocumentManager manager = getDocumentManager();
|
||||
for (final Document document : myCurrentDocuments) {
|
||||
manager.commitDocument(document);
|
||||
}
|
||||
}
|
||||
|
||||
private PsiDocumentManager getDocumentManager() {
|
||||
return PsiDocumentManager.getInstance(myProject);
|
||||
}
|
||||
|
||||
public final void addWatchedDocument(final Document document) {
|
||||
stopListeningDocuments();
|
||||
myCurrentDocuments.add(document);
|
||||
|
||||
Reference in New Issue
Block a user