diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/impl/DirectoryIndexImpl.java b/platform/lang-impl/src/com/intellij/openapi/roots/impl/DirectoryIndexImpl.java index c4de04196207..854a29988f6e 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/impl/DirectoryIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/impl/DirectoryIndexImpl.java @@ -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 getDirectoriesByPackageName(@NotNull String packageName, boolean includeLibrarySources) { - return new CollectionQuery(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(); diff --git a/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java b/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java index 3fa080f35111..b7a3736bbbf8 100644 --- a/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java +++ b/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java @@ -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) { diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java index 009f4ef90c18..822552576a62 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java @@ -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); diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryIndex.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryIndex.java index 24e78d882370..635a6f1afc1f 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryIndex.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryIndex.java @@ -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; + } } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryInfo.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryInfo.java index 990d0411f0cb..4f5f1ff46a34 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryInfo.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/DirectoryInfo.java @@ -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;