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
|
fun KtStringTemplateExpression.isSingleQuoted(): Boolean = node.firstChildNode.textLength == 1
|
||||||
|
|
||||||
|
val KtNamedDeclaration.isPrivateNestedClassOrObject: Boolean get() = this is KtClassOrObject && isPrivate() && !isTopLevel()
|
||||||
|
|
||||||
fun KtNamedDeclaration.getValueParameters(): List<KtParameter> {
|
fun KtNamedDeclaration.getValueParameters(): List<KtParameter> {
|
||||||
return getValueParameterList()?.parameters ?: Collections.emptyList()
|
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) {
|
private fun safeDelete(project: Project, declaration: PsiElement) {
|
||||||
if (declaration is KtNamedDeclaration && declaration.isPrivateNestedClassOrObject) {
|
if (declaration is KtNamedDeclaration && declaration.isPrivateNestedClassOrObject) {
|
||||||
runWriteAction {
|
runWriteAction {
|
||||||
|
|||||||
Reference in New Issue
Block a user