Merge branch 'master' of git@git.labs.intellij.net:idea/community

This commit is contained in:
Kirill Kalishev
2011-05-19 17:51:34 +04:00
3 changed files with 21 additions and 21 deletions
@@ -74,7 +74,9 @@ public class RelatedItemLineMarkerGotoAdapter extends GotoRelatedProvider {
continue;
}
}
ContainerUtil.addIfNotNull(element.getContainingFile(), addedFiles);
if (element != null) {
ContainerUtil.addIfNotNull(element.getContainingFile(), addedFiles);
}
result.add(item);
}
}
@@ -23,7 +23,6 @@ import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.vfs.InvalidVirtualFileAccessException;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.newvfs.persistent.PersistentFS;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -100,21 +99,19 @@ public class FileContentQueue {
boolean counterUpdated = false;
try {
if (contentLength < PersistentFS.MAX_INTELLISENSE_FILESIZE) {
synchronized (this) {
while (myTotalSize > SIZE_THRESHOLD) {
if (indicator != null) {
indicator.checkCanceled();
}
wait(300);
synchronized (this) {
while (myTotalSize > SIZE_THRESHOLD) {
if (indicator != null) {
indicator.checkCanceled();
}
myTotalSize += contentLength;
counterUpdated = true;
wait(300);
}
content.getBytes(); // Reads the content bytes and caches them.
myTotalSize += contentLength;
counterUpdated = true;
}
content.getBytes(); // Reads the content bytes and caches them.
return true;
}
catch (Throwable e) {
@@ -191,14 +188,12 @@ public class FileContentQueue {
}
return null;
}
if (result.getLength() < PersistentFS.MAX_INTELLISENSE_FILESIZE) {
synchronized (this) {
try {
myTotalSize -= result.getLength();
}
finally {
notifyAll();
}
synchronized (this) {
try {
myTotalSize -= result.getLength();
}
finally {
notifyAll();
}
}
@@ -44,6 +44,9 @@ public class GitResolveConflictsAction extends GitAction {
}
});
for (Change change : ChangeListManager.getInstance(project).getAllChanges()) {
if (change.getFileStatus() != FileStatus.MERGED_WITH_CONFLICTS) {
continue;
}
final ContentRevision before = change.getBeforeRevision();
final ContentRevision after = change.getAfterRevision();
if (before != null) {