mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
'already disposed' in tests for ages
This commit is contained in:
@@ -1174,7 +1174,7 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
|
||||
myRevisionsCache.minus(correctedPair);
|
||||
}
|
||||
});
|
||||
myRevisionsCache.minus(correctedPair);
|
||||
//myRevisionsCache.minus(correctedPair);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<AbstractVcs>() {
|
||||
@Nullable
|
||||
public AbstractVcs compute() {
|
||||
if ((!ApplicationManager.getApplication().isUnitTestMode()) && (!myProject.isInitialized())) return null;
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode() && !myProject.isInitialized()) return null;
|
||||
if (myProject.isDisposed()) throw new ProcessCanceledException();
|
||||
VirtualFile vFile = ChangesUtil.findValidParent(file);
|
||||
if (vFile != null) {
|
||||
@@ -270,6 +270,7 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile>() {
|
||||
@Nullable
|
||||
public VirtualFile compute() {
|
||||
if (myProject.isDisposed()) return null;
|
||||
VirtualFile vFile = ChangesUtil.findValidParent(file);
|
||||
if (vFile != null) {
|
||||
return getVcsRootFor(vFile);
|
||||
@@ -294,7 +295,7 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme
|
||||
}
|
||||
|
||||
public void unregisterVcs(AbstractVcs vcs) {
|
||||
if ((! ApplicationManager.getApplication().isUnitTestMode()) && (myMappings.haveActiveVcs(vcs.getName()))) {
|
||||
if (! ApplicationManager.getApplication().isUnitTestMode() && myMappings.haveActiveVcs(vcs.getName())) {
|
||||
// unlikely
|
||||
LOG.warn("Active vcs '" + vcs.getName() + "' is being unregistered. Remove from mappings first.");
|
||||
}
|
||||
@@ -398,7 +399,7 @@ public void addMessageToConsoleWindow(final String message, final TextAttributes
|
||||
}
|
||||
|
||||
public UpdateInfoTree showUpdateProjectInfo(UpdatedFiles updatedFiles, String displayActionName, ActionInfo actionInfo) {
|
||||
if ((! myProject.isOpen()) || myProject.isDisposed()) return null;
|
||||
if (! myProject.isOpen() || myProject.isDisposed()) return null;
|
||||
ContentManager contentManager = getContentManager();
|
||||
if (contentManager == null) {
|
||||
return null; // content manager is made null during dispose; flag is set later
|
||||
@@ -447,7 +448,7 @@ public void addMessageToConsoleWindow(final String message, final TextAttributes
|
||||
|
||||
public boolean hasExplicitMapping(final VirtualFile vFile) {
|
||||
final VcsDirectoryMapping mapping = myMappings.getMappingFor(vFile);
|
||||
return mapping != null && (! mapping.isDefaultMapping());
|
||||
return mapping != null && ! mapping.isDefaultMapping();
|
||||
}
|
||||
|
||||
public void setDirectoryMapping(final String path, final String activeVcsName) {
|
||||
@@ -688,7 +689,7 @@ public void addMessageToConsoleWindow(final String message, final TextAttributes
|
||||
}
|
||||
|
||||
public void fireDirectoryMappingsChanged() {
|
||||
if (myProject.isOpen() && (! myProject.isDisposed())) {
|
||||
if (myProject.isOpen() && ! myProject.isDisposed()) {
|
||||
myMappings.mappingsChanged();
|
||||
}
|
||||
}
|
||||
@@ -723,8 +724,8 @@ public void addMessageToConsoleWindow(final String message, final TextAttributes
|
||||
|
||||
public boolean isFileInContent(final VirtualFile vf) {
|
||||
final ExcludedFileIndex excludedIndex = ExcludedFileIndex.getInstance(myProject);
|
||||
return (vf != null) && (excludedIndex.isInContent(vf) || isFileInBaseDir(vf) || vf.equals(myProject.getBaseDir()) ||
|
||||
hasExplicitMapping(vf) || isInDirectoryBasedRoot(vf)) && (! excludedIndex.isExcludedFile(vf));
|
||||
return vf != null && (excludedIndex.isInContent(vf) || isFileInBaseDir(vf) || vf.equals(myProject.getBaseDir()) ||
|
||||
hasExplicitMapping(vf) || isInDirectoryBasedRoot(vf)) && ! excludedIndex.isExcludedFile(vf);
|
||||
}
|
||||
|
||||
private boolean isInDirectoryBasedRoot(final VirtualFile file) {
|
||||
@@ -734,7 +735,7 @@ public void addMessageToConsoleWindow(final String message, final TextAttributes
|
||||
final VirtualFile baseDir = myProject.getBaseDir();
|
||||
if (baseDir == null) return false;
|
||||
final VirtualFile ideaDir = baseDir.findChild(Project.DIRECTORY_STORE_FOLDER);
|
||||
return (ideaDir != null && ideaDir.isValid() && ideaDir.isDirectory() && VfsUtil.isAncestor(ideaDir, file, false));
|
||||
return ideaDir != null && ideaDir.isValid() && ideaDir.isDirectory() && VfsUtil.isAncestor(ideaDir, file, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user