mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
html reparse fix
This commit is contained in:
@@ -118,11 +118,12 @@ public class PomModelImpl extends UserDataHolderBase implements PomModel {
|
||||
PomModelAspect aspect) throws IncorrectOperationException{
|
||||
final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
if(progressIndicator != null) progressIndicator.startNonCancelableSection();
|
||||
final PsiDocumentManagerImpl manager = (PsiDocumentManagerImpl)PsiDocumentManager.getInstance(myPomProject.getPsiProject());
|
||||
final PsiToDocumentSynchronizer synchronizer = manager.getSynchronizer();
|
||||
Document document = null;
|
||||
|
||||
try{
|
||||
synchronized(PsiLock.LOCK){
|
||||
final PsiDocumentManagerImpl manager = (PsiDocumentManagerImpl)PsiDocumentManager.getInstance(myPomProject.getPsiProject());
|
||||
final PsiToDocumentSynchronizer synchronizer = manager.getSynchronizer();
|
||||
Document document = null;
|
||||
if(transaction.getChangeScope().getContainingFile() != null) {
|
||||
document = manager.getDocument(transaction.getChangeScope().getContainingFile());
|
||||
}
|
||||
@@ -137,7 +138,6 @@ public class PomModelImpl extends UserDataHolderBase implements PomModel {
|
||||
return;
|
||||
}
|
||||
finally{
|
||||
if(document != null) synchronizer.commitTransaction(document);
|
||||
myBlockedAspects.pop();
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ public class PomModelImpl extends UserDataHolderBase implements PomModel {
|
||||
}
|
||||
}
|
||||
finally{
|
||||
if(document != null) synchronizer.commitTransaction(document);
|
||||
if(progressIndicator != null) progressIndicator.finishNonCancelableSection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,14 @@ public class PsiToDocumentSynchronizer extends PsiTreeChangeAdapter {
|
||||
boolean isOriginal = isOriginal(event.getParent(), psiFile, document);
|
||||
|
||||
if (isOriginal) {
|
||||
final boolean insideTransaction = myTransactionsMap.containsKey(document);
|
||||
|
||||
myPsiDocumentManager.setProcessDocumentEvents(false);
|
||||
syncAction.syncDocument(document, (PsiTreeChangeEventImpl)event);
|
||||
if(!insideTransaction) document.setModificationStamp(psiFile.getModificationStamp());
|
||||
myPsiDocumentManager.setProcessDocumentEvents(true);
|
||||
|
||||
if(!myTransactionsMap.containsKey(document)){
|
||||
document.setModificationStamp(psiFile.getModificationStamp());
|
||||
if(!insideTransaction){
|
||||
mySmartPointerManager.synchronizePointers(psiFile);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
PsiDocumentManagerImpl.checkConsistency(psiFile, document);
|
||||
|
||||
Reference in New Issue
Block a user