Minor: move property from UnusedSymbolInspection to ktPsiUtil
This commit is contained in:
@@ -428,6 +428,8 @@ val KtStringTemplateExpression.plainContent: String
|
||||
|
||||
fun KtStringTemplateExpression.isSingleQuoted(): Boolean = node.firstChildNode.textLength == 1
|
||||
|
||||
val KtNamedDeclaration.isPrivateNestedClassOrObject: Boolean get() = this is KtClassOrObject && isPrivate() && !isTopLevel()
|
||||
|
||||
fun KtNamedDeclaration.getValueParameters(): List<KtParameter> {
|
||||
return getValueParameterList()?.parameters ?: Collections.emptyList()
|
||||
}
|
||||
|
||||
@@ -518,8 +518,6 @@ class SafeDeleteFix(declaration: KtDeclaration) : LocalQuickFix {
|
||||
}
|
||||
}
|
||||
|
||||
private val KtNamedDeclaration.isPrivateNestedClassOrObject: Boolean get() = this is KtClassOrObject && isPrivate() && !isTopLevel()
|
||||
|
||||
private fun safeDelete(project: Project, declaration: PsiElement) {
|
||||
if (declaration is KtNamedDeclaration && declaration.isPrivateNestedClassOrObject) {
|
||||
runWriteAction {
|
||||
|
||||
Reference in New Issue
Block a user