Moved incremental cache API to separate package.
This commit is contained in:
+2
-2
@@ -42,9 +42,9 @@ import org.jetbrains.jet.lang.resolve.BindingTraceContext;
|
||||
import org.jetbrains.jet.lang.resolve.ImportPath;
|
||||
import org.jetbrains.jet.lang.resolve.TopDownAnalysisParameters;
|
||||
import org.jetbrains.jet.lang.resolve.java.mapping.JavaToKotlinClassMap;
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.IncrementalCache;
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.IncrementalPackageFragmentProvider;
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.IncrementalCacheProvider;
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.cache.IncrementalCache;
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.cache.IncrementalCacheProvider;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.ResolveSession;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.declarations.DeclarationProviderFactory;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.declarations.DeclarationProviderFactoryService;
|
||||
|
||||
+2
-9
@@ -16,20 +16,13 @@
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.kotlin.incremental
|
||||
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.cache.IncrementalCache
|
||||
import org.jetbrains.jet.lang.psi.JetFile
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName
|
||||
import org.jetbrains.jet.lang.psi.JetFile
|
||||
import java.util.HashMap
|
||||
import java.io.File
|
||||
|
||||
public trait IncrementalCache {
|
||||
public fun getRemovedPackageParts(moduleId: String, compiledSourceFilesToFqName: Map<File, String>): Collection<String>
|
||||
|
||||
public fun getPackageData(moduleId: String, fqName: String): ByteArray?
|
||||
|
||||
public fun close()
|
||||
}
|
||||
|
||||
public fun IncrementalCache.getPackagesWithRemovedFiles(moduleId: String, compiledSourceFiles: Collection<JetFile>): Collection<FqName> {
|
||||
return getRemovedPackageParts(moduleId, compiledSourceFiles).map { it.getFqNameForClassNameWithoutDollars().parent() }
|
||||
}
|
||||
+1
@@ -37,6 +37,7 @@ import org.jetbrains.jet.descriptors.serialization.JavaProtoBuf
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName
|
||||
import org.jetbrains.jet.descriptors.serialization.PackageData
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.DeserializationGlobalContextForJava
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.incremental.cache.IncrementalCache
|
||||
|
||||
public class IncrementalPackageFragmentProvider(
|
||||
sourceFiles: Collection<JetFile>,
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2010-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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.kotlin.incremental.cache
|
||||
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName
|
||||
import org.jetbrains.jet.lang.psi.JetFile
|
||||
import java.util.HashMap
|
||||
import java.io.File
|
||||
|
||||
public trait IncrementalCache {
|
||||
public fun getRemovedPackageParts(moduleId: String, compiledSourceFilesToFqName: Map<File, String>): Collection<String>
|
||||
|
||||
public fun getPackageData(moduleId: String, fqName: String): ByteArray?
|
||||
|
||||
public fun close()
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.kotlin.incremental
|
||||
package org.jetbrains.jet.lang.resolve.kotlin.incremental.cache
|
||||
|
||||
public trait IncrementalCacheProvider {
|
||||
public fun getIncrementalCache(moduleId: String): IncrementalCache
|
||||
Reference in New Issue
Block a user