Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
3cefef03
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3cefef03
编写于
10月 05, 2020
作者:
I
Igor Yakovlev
提交者:
Ilya Kirillov
11月 11, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move refactoring for ifTrue and ifFalse extensions
上级
a42674ef
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
4 deletion
+13
-4
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt
...t/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt
+1
-1
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinReferencesSearcher.kt
...in/idea/search/ideaExtensions/KotlinReferencesSearcher.kt
+1
-0
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/searchUtil.kt
...endent/src/org/jetbrains/kotlin/idea/search/searchUtil.kt
+0
-2
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/operators/OperatorReferenceSearcher.kt
...earch/usagesSearch/operators/OperatorReferenceSearcher.kt
+1
-1
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/util/utilsIndependent.kt
...nt/src/org/jetbrains/kotlin/idea/util/utilsIndependent.kt
+10
-0
未找到文件。
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt
浏览文件 @
3cefef03
...
...
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.asJava.unwrapped
import
org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedIsKtLightClassForDecompiledDeclaration
import
org.jetbrains.kotlin.idea.KotlinIconsIndependent.ACTUAL
import
org.jetbrains.kotlin.idea.KotlinIconsIndependent.EXPECT
import
org.jetbrains.kotlin.idea.
search
.ifTrue
import
org.jetbrains.kotlin.idea.
util
.ifTrue
import
org.jetbrains.kotlin.lexer.KtTokens
import
org.jetbrains.kotlin.psi.*
import
org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
...
...
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinReferencesSearcher.kt
浏览文件 @
3cefef03
...
...
@@ -48,6 +48,7 @@ import org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReferencesSearchOpt
import
org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReferencesSearchOptions.Companion.calculateEffectiveScope
import
org.jetbrains.kotlin.idea.search.usagesSearch.operators.OperatorReferenceSearcher
import
org.jetbrains.kotlin.idea.util.application.runReadAction
import
org.jetbrains.kotlin.idea.util.ifTrue
import
org.jetbrains.kotlin.psi.*
import
org.jetbrains.kotlin.psi.psiUtil.*
import
java.util.*
...
...
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/searchUtil.kt
浏览文件 @
3cefef03
...
...
@@ -148,8 +148,6 @@ fun findScriptsWithUsages(declaration: KtNamedDeclaration): List<KtFile> {
.
toList
()
}
inline
fun
<
T
>
Boolean
.
ifTrue
(
body
:
()
->
T
?):
T
?
=
if
(
this
)
body
()
else
null
data class
ReceiverTypeSearcherInfo
(
val
psiClass
:
PsiClass
?,
val
containsTypeOrDerivedInside
:
((
KtDeclaration
)
->
Boolean
)
...
...
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/operators/OperatorReferenceSearcher.kt
浏览文件 @
3cefef03
...
...
@@ -18,12 +18,12 @@ import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.forc
import
org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.getReceiverTypeSearcherInfo
import
org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReferencesSearchOptions
import
org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinRequestResultProcessor
import
org.jetbrains.kotlin.idea.search.ifTrue
import
org.jetbrains.kotlin.idea.search.restrictToKotlinSources
import
org.jetbrains.kotlin.idea.search.usagesSearch.ExpressionsOfTypeProcessor
import
org.jetbrains.kotlin.idea.search.usagesSearch.ExpressionsOfTypeProcessor.Companion.logPresentation
import
org.jetbrains.kotlin.idea.search.usagesSearch.ExpressionsOfTypeProcessor.Companion.testLog
import
org.jetbrains.kotlin.idea.util.application.runReadAction
import
org.jetbrains.kotlin.idea.util.ifTrue
import
org.jetbrains.kotlin.lexer.KtTokens
import
org.jetbrains.kotlin.name.Name
import
org.jetbrains.kotlin.psi.*
...
...
idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/util/utilsIndependent.kt
0 → 100644
浏览文件 @
3cefef03
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package
org.jetbrains.kotlin.idea.util
inline
fun
<
T
>
Boolean
.
ifTrue
(
body
:
()
->
T
?):
T
?
=
if
(
this
)
body
()
else
null
inline
fun
<
T
>
Boolean
.
ifFalse
(
body
:
()
->
T
?):
T
?
=
if
(!
this
)
body
()
else
null
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录