diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheService.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheService.kt index 03fdff9fc35..044f708a0f6 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheService.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheService.kt @@ -37,31 +37,31 @@ import org.jetbrains.jet.plugin.stubindex.JetSourceFilterScope private val LOG = Logger.getInstance(javaClass()) -fun JetElement.getLazyResolveSession(): ResolveSessionForBodies { +public fun JetElement.getLazyResolveSession(): ResolveSessionForBodies { return KotlinCacheService.getInstance(getProject()).getLazyResolveSession(this) } -fun Project.getLazyResolveSession(platform: TargetPlatform): ResolveSessionForBodies { +public fun Project.getLazyResolveSession(platform: TargetPlatform): ResolveSessionForBodies { return KotlinCacheService.getInstance(this).getGlobalLazyResolveSession(platform) } -fun JetElement.getAnalysisResults(): AnalyzeExhaust { +public fun JetElement.getAnalysisResults(): AnalyzeExhaust { return KotlinCacheService.getInstance(getProject()).getAnalysisResults(listOf(this)) } -fun JetElement.getBindingContext(): BindingContext { +public fun JetElement.getBindingContext(): BindingContext { return getAnalysisResults().getBindingContext() } -fun getAnalysisResultsForElements(elements: Collection): AnalyzeExhaust { +public fun getAnalysisResultsForElements(elements: Collection): AnalyzeExhaust { if (elements.isEmpty()) return AnalyzeExhaust.EMPTY val element = elements.first() return KotlinCacheService.getInstance(element.getProject()).getAnalysisResults(elements) } -class KotlinCacheService(val project: Project) { +public class KotlinCacheService(val project: Project) { class object { - fun getInstance(project: Project) = ServiceManager.getService(project, javaClass())!! + public fun getInstance(project: Project): KotlinCacheService = ServiceManager.getService(project, javaClass())!! } private fun globalResolveSessionProvider(platform: TargetPlatform, syntheticFiles: Collection = listOf()) = { diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinResolveCache.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinResolveCache.kt index e1afdddfcde..15dd8210d6f 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinResolveCache.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/caches/resolve/KotlinResolveCache.kt @@ -66,8 +66,8 @@ import org.jetbrains.jet.lang.types.TypeUtils import org.jetbrains.jet.lang.resolve.scopes.ChainedScope public trait CacheExtension { - val platform: TargetPlatform - fun getData(setup: AnalyzerFacade.Setup): T + public val platform: TargetPlatform + public fun getData(setup: AnalyzerFacade.Setup): T } private class SessionAndSetup( diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/JetSelfTargetingIntention.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/JetSelfTargetingIntention.kt index df17baff3d4..a3f266e1b17 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/JetSelfTargetingIntention.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/intentions/JetSelfTargetingIntention.kt @@ -24,16 +24,16 @@ import org.jetbrains.jet.plugin.JetBundle import org.jetbrains.jet.lang.psi.psiUtil.getParentByTypesAndPredicate import com.intellij.codeInsight.intention.IntentionAction -public abstract class JetSelfTargetingIntention(val key: String, val elementType: Class) : IntentionAction { +public abstract class JetSelfTargetingIntention(protected val key: String, val elementType: Class) : IntentionAction { private var myText:String = JetBundle.message(key); protected fun setText(text: String) { myText = text } override fun getText(): String = myText - abstract fun isApplicableTo(element: T): Boolean - open fun isApplicableTo(element: T, editor: Editor): Boolean = isApplicableTo(element) - abstract fun applyTo(element: T, editor: Editor) + public abstract fun isApplicableTo(element: T): Boolean + public open fun isApplicableTo(element: T, editor: Editor): Boolean = isApplicableTo(element) + public abstract fun applyTo(element: T, editor: Editor) protected fun getTarget(editor: Editor, file: PsiFile): T? { val offset = editor.getCaretModel().getOffset() diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/DecompiledTextFactory.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/DecompiledTextFactory.kt index f6aaf6128d5..14438bbf958 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/DecompiledTextFactory.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/DecompiledTextFactory.kt @@ -63,7 +63,7 @@ public fun descriptorToKey(descriptor: DeclarationDescriptor): String { return descriptorRendererForDecompiler.render(descriptor) } -private data class DecompiledText(val text: String, val renderedDescriptorsToRange: Map) +public data class DecompiledText(public val text: String, public val renderedDescriptorsToRange: Map) private fun buildDecompiledText(packageFqName: FqName, descriptors: List): DecompiledText { val builder = StringBuilder() diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/JetDecompilerForWrongAbiVersion.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/JetDecompilerForWrongAbiVersion.kt index 0b242824979..9c09dad4e05 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/JetDecompilerForWrongAbiVersion.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/JetDecompilerForWrongAbiVersion.kt @@ -26,4 +26,4 @@ public class JetDecompilerForWrongAbiVersion : ClassFileDecompilers.Light() { override fun getText(file: VirtualFile) = "$INCOMPATIBLE_ABI_VERSION_COMMENT\n${ClsFileImpl.decompile(file)}" } -val INCOMPATIBLE_ABI_VERSION_COMMENT = " // This Kotlin file has an incompatible ABI version and is displayed as Java class" +public val INCOMPATIBLE_ABI_VERSION_COMMENT: String = " // This Kotlin file has an incompatible ABI version and is displayed as Java class" diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/ResolverForDecompiler.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/ResolverForDecompiler.kt index 997d605f43d..8c8f046c725 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/ResolverForDecompiler.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/libraries/ResolverForDecompiler.kt @@ -20,7 +20,7 @@ import org.jetbrains.jet.lang.resolve.name.FqName import org.jetbrains.jet.lang.descriptors.ClassDescriptor import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor -trait ResolverForDecompiler { - fun resolveTopLevelClass(classFqName: FqName): ClassDescriptor? - fun resolveDeclarationsInPackage(packageFqName: FqName): Collection +public trait ResolverForDecompiler { + public fun resolveTopLevelClass(classFqName: FqName): ClassDescriptor? + public fun resolveDeclarationsInPackage(packageFqName: FqName): Collection } \ No newline at end of file diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/JetReference.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/JetReference.kt index 0f21abdb81a..f5397a8743b 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/JetReference.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/JetReference.kt @@ -46,7 +46,7 @@ public trait JetReference : PsiPolyVariantReference { public abstract class AbstractJetReference(element: T) : PsiPolyVariantReferenceBase(element), JetReference { - val expression: T + public val expression: T get() = getElement() override fun multiResolve(incompleteCode: Boolean): Array { @@ -67,7 +67,7 @@ public abstract class AbstractJetReference(element: T) override fun getCanonicalText(): String = "" - open fun canRename(): Boolean = false + public open fun canRename(): Boolean = false override fun handleElementRename(newElementName: String?): PsiElement? = throw IncorrectOperationException() override fun bindToElement(element: PsiElement): PsiElement = throw IncorrectOperationException() diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/referenceUtil.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/referenceUtil.kt index 77d6a8b2442..48a334795e9 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/referenceUtil.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/references/referenceUtil.kt @@ -33,7 +33,7 @@ import com.intellij.psi.util.PsiTreeUtil // Navigation element of the resolved reference // For property accessor return enclosing property -val PsiReference.unwrappedTargets: Set +public val PsiReference.unwrappedTargets: Set get() { fun PsiElement.adjust(): PsiElement? { val target = unwrapped @@ -46,7 +46,7 @@ val PsiReference.unwrappedTargets: Set } } -fun PsiReference.matchesTarget(target: PsiElement): Boolean { +public fun PsiReference.matchesTarget(target: PsiElement): Boolean { val unwrapped = target.unwrapped return when { unwrapped in unwrappedTargets -> diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/search/searchUtil.kt b/idea/idea-analysis/src/org/jetbrains/jet/plugin/search/searchUtil.kt index 89023d9cf0e..44707dac608 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/search/searchUtil.kt +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/search/searchUtil.kt @@ -21,13 +21,13 @@ import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import com.intellij.psi.search.SearchScope -fun SearchScope.and(otherScope: SearchScope): SearchScope = intersectWith(otherScope) -fun SearchScope.or(otherScope: SearchScope): SearchScope = union(otherScope) -fun SearchScope.minus(otherScope: GlobalSearchScope) = this and !otherScope -fun GlobalSearchScope.not(): GlobalSearchScope = GlobalSearchScope.notScope(this) +public fun SearchScope.and(otherScope: SearchScope): SearchScope = intersectWith(otherScope) +public fun SearchScope.or(otherScope: SearchScope): SearchScope = union(otherScope) +public fun SearchScope.minus(otherScope: GlobalSearchScope): SearchScope = this and !otherScope +public fun GlobalSearchScope.not(): GlobalSearchScope = GlobalSearchScope.notScope(this) -fun Project.allScope(): GlobalSearchScope = GlobalSearchScope.allScope(this) +public fun Project.allScope(): GlobalSearchScope = GlobalSearchScope.allScope(this) -fun Project.projectScope(): GlobalSearchScope = GlobalSearchScope.projectScope(this) +public fun Project.projectScope(): GlobalSearchScope = GlobalSearchScope.projectScope(this) -fun PsiFile.fileScope(): GlobalSearchScope = GlobalSearchScope.fileScope(this) +public fun PsiFile.fileScope(): GlobalSearchScope = GlobalSearchScope.fileScope(this)