Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
5f7d7ff9
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,发现更多精彩内容 >>
提交
5f7d7ff9
编写于
11月 11, 2020
作者:
Y
Yan Zhulanow
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Parcelize: Activate checkers only when the plugin is enabled for module (KT-43291)
上级
9d207c2c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
71 addition
and
3 deletion
+71
-3
idea/resources/META-INF/parcelize.xml
idea/resources/META-INF/parcelize.xml
+1
-1
plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeAnnotationChecker.kt
.../jetbrains/kotlin/parcelize/ParcelizeAnnotationChecker.kt
+1
-1
plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt
...jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt
+1
-1
plugins/parcelize/parcelize-ide/src/org/jetbrains/kotlin/parcelize/ide/IdeParcelizeAnnotationChecker.kt
...ins/kotlin/parcelize/ide/IdeParcelizeAnnotationChecker.kt
+21
-0
plugins/parcelize/parcelize-ide/src/org/jetbrains/kotlin/parcelize/ide/IdeParcelizeDeclarationChecker.kt
...ns/kotlin/parcelize/ide/IdeParcelizeDeclarationChecker.kt
+21
-0
plugins/parcelize/parcelize-ide/src/org/jetbrains/kotlin/parcelize/ide/IdeParcelizeDeclarationCheckerComponentContainerContributor.kt
...rcelizeDeclarationCheckerComponentContainerContributor.kt
+26
-0
未找到文件。
idea/resources/META-INF/parcelize.xml
浏览文件 @
5f7d7ff9
...
...
@@ -4,7 +4,7 @@
<irGenerationExtension
implementation=
"org.jetbrains.kotlin.parcelize.ParcelizeIrGeneratorExtension"
/>
<syntheticResolveExtension
implementation=
"org.jetbrains.kotlin.parcelize.ide.IdeParcelizeResolveExtension"
/>
<classBuilderFactoryInterceptorExtension
implementation=
"org.jetbrains.kotlin.parcelize.ParcelizeClinitClassBuilderInterceptorExtension"
/>
<storageComponentContainerContributor
implementation=
"org.jetbrains.kotlin.parcelize.ParcelizeDeclarationCheckerComponentContainerContributor"
/>
<storageComponentContainerContributor
implementation=
"org.jetbrains.kotlin.parcelize.
ide.Ide
ParcelizeDeclarationCheckerComponentContainerContributor"
/>
<ultraLightClassModifierExtension
implementation=
"org.jetbrains.kotlin.parcelize.ide.ParcelizeUltraLightClassModifierExtension"
/>
<quickFixContributor
implementation=
"org.jetbrains.kotlin.parcelize.ide.quickfixes.ParcelizeQuickFixContributor"
/>
...
...
plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeAnnotationChecker.kt
浏览文件 @
5f7d7ff9
...
...
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf
import
org.jetbrains.kotlin.types.typeUtil.replaceAnnotations
import
org.jetbrains.kotlin.types.typeUtil.supertypes
class
ParcelizeAnnotationChecker
:
CallChecker
{
open
class
ParcelizeAnnotationChecker
:
CallChecker
{
@Suppress
(
"DEPRECATION"
)
companion
object
{
val
DEPRECATED_RUNTIME_PACKAGE
=
FqName
(
"kotlinx.android.parcel"
)
...
...
plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt
浏览文件 @
5f7d7ff9
...
...
@@ -37,7 +37,7 @@ val ANDROID_PARCELABLE_CLASS_FQNAME = FqName("android.os.Parcelable")
val
ANDROID_PARCELABLE_CREATOR_CLASS_FQNAME
=
FqName
(
"android.os.Parcelable.Creator"
)
val
ANDROID_PARCEL_CLASS_FQNAME
=
FqName
(
"android.os.Parcel"
)
class
ParcelizeDeclarationChecker
:
DeclarationChecker
{
open
class
ParcelizeDeclarationChecker
:
DeclarationChecker
{
private
companion
object
{
private
val
IGNORED_ON_PARCEL_FQ_NAMES
=
listOf
(
FqName
(
kotlinx
.
parcelize
.
IgnoredOnParcel
::
class
.
java
.
canonicalName
),
...
...
plugins/parcelize/parcelize-ide/src/org/jetbrains/kotlin/parcelize/ide/IdeParcelizeAnnotationChecker.kt
0 → 100644
浏览文件 @
5f7d7ff9
/*
* 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.parcelize.ide
import
com.intellij.psi.PsiElement
import
org.jetbrains.kotlin.parcelize.ParcelizeAnnotationChecker
import
org.jetbrains.kotlin.resolve.calls.checkers.CallCheckerContext
import
org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
class
IdeParcelizeAnnotationChecker
:
ParcelizeAnnotationChecker
()
{
override
fun
check
(
resolvedCall
:
ResolvedCall
<
*
>,
reportOn
:
PsiElement
,
context
:
CallCheckerContext
)
{
if
(!
ParcelizeAvailability
.
isAvailable
(
resolvedCall
.
call
.
callElement
))
{
return
}
super
.
check
(
resolvedCall
,
reportOn
,
context
)
}
}
\ No newline at end of file
plugins/parcelize/parcelize-ide/src/org/jetbrains/kotlin/parcelize/ide/IdeParcelizeDeclarationChecker.kt
0 → 100644
浏览文件 @
5f7d7ff9
/*
* 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.parcelize.ide
import
org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import
org.jetbrains.kotlin.parcelize.ParcelizeDeclarationChecker
import
org.jetbrains.kotlin.psi.KtDeclaration
import
org.jetbrains.kotlin.resolve.checkers.DeclarationCheckerContext
class
IdeParcelizeDeclarationChecker
:
ParcelizeDeclarationChecker
()
{
override
fun
check
(
declaration
:
KtDeclaration
,
descriptor
:
DeclarationDescriptor
,
context
:
DeclarationCheckerContext
)
{
if
(!
ParcelizeAvailability
.
isAvailable
(
declaration
))
{
return
}
super
.
check
(
declaration
,
descriptor
,
context
)
}
}
\ No newline at end of file
plugins/parcelize/parcelize-ide/src/org/jetbrains/kotlin/parcelize/ide/IdeParcelizeDeclarationCheckerComponentContainerContributor.kt
0 → 100644
浏览文件 @
5f7d7ff9
/*
* 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.parcelize.ide
import
org.jetbrains.kotlin.container.StorageComponentContainer
import
org.jetbrains.kotlin.container.useInstance
import
org.jetbrains.kotlin.descriptors.ModuleDescriptor
import
org.jetbrains.kotlin.extensions.StorageComponentContainerContributor
import
org.jetbrains.kotlin.platform.TargetPlatform
import
org.jetbrains.kotlin.platform.jvm.isJvm
class
IdeParcelizeDeclarationCheckerComponentContainerContributor
:
StorageComponentContainerContributor
{
override
fun
registerModuleComponents
(
container
:
StorageComponentContainer
,
platform
:
TargetPlatform
,
moduleDescriptor
:
ModuleDescriptor
,
)
{
if
(
platform
.
isJvm
())
{
container
.
useInstance
(
IdeParcelizeDeclarationChecker
())
container
.
useInstance
(
IdeParcelizeAnnotationChecker
())
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录