From 8ef96ccddcd9b33c758405f4d673a794e226845b Mon Sep 17 00:00:00 2001 From: Ilya Rodionov Date: Wed, 19 Jul 2023 00:05:24 +0300 Subject: [PATCH] Cleanup code. --- src/main/kotlin/ris58h/webcalm/css/CssNames.kt | 4 ++-- src/main/kotlin/ris58h/webcalm/css/CssStructureViewFactory.kt | 4 ++-- .../webcalm/javascript/JavaScriptStructureViewFactory.kt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/ris58h/webcalm/css/CssNames.kt b/src/main/kotlin/ris58h/webcalm/css/CssNames.kt index 3d0a2ea..8dbd6da 100644 --- a/src/main/kotlin/ris58h/webcalm/css/CssNames.kt +++ b/src/main/kotlin/ris58h/webcalm/css/CssNames.kt @@ -26,7 +26,7 @@ class CssRenameInputValidator : RenameInputValidator { } class CssNamesValidator : NamesValidator { - override fun isKeyword(name: String, project: Project?): Boolean = false + override fun isKeyword(name: String, project: Project?) = false - override fun isIdentifier(name: String, project: Project?): Boolean = isVariableName(name) + override fun isIdentifier(name: String, project: Project?) = isVariableName(name) } \ No newline at end of file diff --git a/src/main/kotlin/ris58h/webcalm/css/CssStructureViewFactory.kt b/src/main/kotlin/ris58h/webcalm/css/CssStructureViewFactory.kt index a8511bc..61b83ea 100644 --- a/src/main/kotlin/ris58h/webcalm/css/CssStructureViewFactory.kt +++ b/src/main/kotlin/ris58h/webcalm/css/CssStructureViewFactory.kt @@ -21,8 +21,8 @@ class CssStructureViewFactory : PsiStructureViewFactory { private fun createModel(psiFile: PsiFile, editor: Editor?): StructureViewModel { return object : StructureViewModelBase(psiFile, editor, CssStructureViewElement(psiFile)), StructureViewModel.ElementInfoProvider { - override fun isAlwaysShowsPlus(element: StructureViewTreeElement?): Boolean = false - override fun isAlwaysLeaf(element: StructureViewTreeElement): Boolean = false + override fun isAlwaysShowsPlus(element: StructureViewTreeElement?) = false + override fun isAlwaysLeaf(element: StructureViewTreeElement) = false }.withSuitableClasses( CssNestedStatement::class.java, CssKeyframeBlock::class.java, diff --git a/src/main/kotlin/ris58h/webcalm/javascript/JavaScriptStructureViewFactory.kt b/src/main/kotlin/ris58h/webcalm/javascript/JavaScriptStructureViewFactory.kt index 68fac77..cdfecd3 100644 --- a/src/main/kotlin/ris58h/webcalm/javascript/JavaScriptStructureViewFactory.kt +++ b/src/main/kotlin/ris58h/webcalm/javascript/JavaScriptStructureViewFactory.kt @@ -21,8 +21,8 @@ class JavaScriptStructureViewFactory : PsiStructureViewFactory { private fun createModel(psiFile: PsiFile, editor: Editor?): StructureViewModel { return object : StructureViewModelBase(psiFile, editor, JavaScriptStructureViewElement(psiFile)), StructureViewModel.ElementInfoProvider { - override fun isAlwaysShowsPlus(element: StructureViewTreeElement?): Boolean = false - override fun isAlwaysLeaf(element: StructureViewTreeElement): Boolean = false + override fun isAlwaysShowsPlus(element: StructureViewTreeElement?) = false + override fun isAlwaysLeaf(element: StructureViewTreeElement) = false }.withSuitableClasses( JavaScriptFunctionDeclaration::class.java, JavaScriptClassDeclaration::class.java,