Skip to content

Commit

Permalink
Cleanup code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ris58h committed Jul 18, 2023
1 parent 4ece215 commit 8ef96cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/ris58h/webcalm/css/CssNames.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions src/main/kotlin/ris58h/webcalm/css/CssStructureViewFactory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8ef96cc

Please sign in to comment.