File tree Expand file tree Collapse file tree 3 files changed +3
-30
lines changed
java/com/demonwav/mcdev/util
kotlin/com/demonwav/mcdev
platform/mixin/inspection/shadow Expand file tree Collapse file tree 3 files changed +3
-30
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ package com.demonwav.mcdev.platform.mixin.inspection.shadow
1313import com.demonwav.mcdev.platform.mixin.inspection.MixinInspection
1414import com.demonwav.mcdev.platform.mixin.util.MixinConstants.Annotations.SHADOW
1515import com.demonwav.mcdev.platform.mixin.util.MixinConstants.DEFAULT_SHADOW_PREFIX
16- import com.demonwav.mcdev.util.KotlinIsBroken
1716import com.demonwav.mcdev.util.annotationFromValue
1817import com.demonwav.mcdev.util.constantStringValue
1918import com.demonwav.mcdev.util.findAnnotation
@@ -68,7 +67,7 @@ class ShadowFieldPrefixInspection : MixinInspection() {
6867 // Delete prefix
6968 val shadow = element.annotationFromValue!!
7069 runWriteAction {
71- KotlinIsBroken .removeAnnotationAttribute(shadow, " prefix" )
70+ shadow.setDeclaredAttributeValue< PsiAnnotationMemberValue >( " prefix" , null )
7271 }
7372
7473 // Rename field (if necessary)
Original file line number Diff line number Diff line change 1010
1111package com.demonwav.mcdev.util.quickfix
1212
13- import com.demonwav.mcdev.util.KotlinIsBroken
1413import com.demonwav.mcdev.util.annotationFromValue
1514import com.intellij.codeInspection.LocalQuickFix
1615import com.intellij.codeInspection.ProblemDescriptor
1716import com.intellij.openapi.project.Project
17+ import com.intellij.psi.PsiAnnotationMemberValue
1818
1919class RemoveAnnotationAttributeQuickFix (val annotation : String , val attribute : String ) : LocalQuickFix {
2020 override fun getFamilyName () = " Remove $attribute from $annotation "
2121
2222 override fun applyFix (project : Project , descriptor : ProblemDescriptor ) {
23- KotlinIsBroken .removeAnnotationAttribute( descriptor.psiElement.annotationFromValue!! , attribute )
23+ descriptor.psiElement.annotationFromValue?.setDeclaredAttributeValue< PsiAnnotationMemberValue ?>(attribute, null )
2424 }
25-
2625}
You can’t perform that action at this time.
0 commit comments