This commit is contained in:
Alexey Kudravtsev
2014-04-10 12:32:51 +04:00
parent 004ae7b9b4
commit 944bdb4fc2
5 changed files with 16 additions and 16 deletions
@@ -34,7 +34,6 @@ import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.openapi.vfs.newvfs.BulkFileListener;
import com.intellij.openapi.vfs.newvfs.NewVirtualFile;
import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
import com.intellij.util.CollectionQuery;
import com.intellij.util.Query;
import com.intellij.util.messages.MessageBusConnection;
import org.jetbrains.annotations.NotNull;
@@ -116,7 +115,7 @@ public class DirectoryIndexImpl extends DirectoryIndex {
@Override
@NotNull
public Query<VirtualFile> getDirectoriesByPackageName(@NotNull String packageName, boolean includeLibrarySources) {
return new CollectionQuery<VirtualFile>(getRootIndex().getDirectoriesByPackageName(packageName, includeLibrarySources));
return getRootIndex().getDirectoriesByPackageName(packageName, includeLibrarySources);
}
@NotNull
@@ -134,11 +133,6 @@ public class DirectoryIndexImpl extends DirectoryIndex {
getRootIndex().checkConsistency();
}
@Override
public boolean isInitialized() {
return true;
}
@Override
public DirectoryInfo getInfoForDirectory(@NotNull VirtualFile dir) {
checkAvailability();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 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.
@@ -32,10 +32,12 @@ public abstract class RefreshQueue {
return ServiceManager.getService(RefreshQueue.class);
}
@NotNull
public final RefreshSession createSession(boolean async, boolean recursive, @Nullable Runnable finishRunnable) {
return createSession(async, recursive, finishRunnable, getDefaultModalityState());
}
@NotNull
public abstract RefreshSession createSession(boolean async, boolean recursive, @Nullable Runnable finishRunnable, @NotNull ModalityState state);
public final void refresh(boolean async, boolean recursive, @Nullable Runnable finishRunnable, @NotNull VirtualFile... files) {
@@ -131,6 +131,7 @@ public class RefreshQueueImpl extends RefreshQueue {
}
}
@NotNull
@Override
public RefreshSession createSession(boolean async, boolean recursively, @Nullable Runnable finishRunnable, @NotNull ModalityState state) {
return new RefreshSessionImpl(async, recursively, finishRunnable, state);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2014 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.
@@ -53,5 +53,7 @@ public abstract class DirectoryIndex {
* @return true
*/
@Deprecated
public abstract boolean isInitialized();
public boolean isInitialized() {
return true;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2014 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.
@@ -48,6 +48,7 @@ public class DirectoryInfo {
* orderEntry to (classes of) which a directory belongs
* MUST BE SORTED WITH {@link #BY_OWNER_MODULE}
*/
@Nullable
private final OrderEntry[] orderEntries;
public static DirectoryInfo createNew() {
@@ -55,11 +56,11 @@ public class DirectoryInfo {
}
DirectoryInfo(Module module,
VirtualFile contentRoot,
VirtualFile sourceRoot,
VirtualFile libraryClassRoot,
byte sourceRootTypeData,
OrderEntry[] orderEntries) {
VirtualFile contentRoot,
VirtualFile sourceRoot,
VirtualFile libraryClassRoot,
byte sourceRootTypeData,
@Nullable OrderEntry[] orderEntries) {
this.module = module;
this.libraryClassRoot = libraryClassRoot;
this.contentRoot = contentRoot;