forked from unshare/hybris-integration-intellij-idea-plugin
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#866 | Incorrect
companion
object usage
- Loading branch information
Showing
80 changed files
with
431 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA. | ||
* Copyright (C) 2019 EPAM Systems <[email protected]> | ||
* Copyright (C) 2019-2023 EPAM Systems <[email protected]> and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
|
@@ -20,4 +20,4 @@ package com.intellij.idea.plugin.hybris.flexibleSearch | |
import com.intellij.psi.tree.IElementType | ||
import org.jetbrains.annotations.NonNls | ||
|
||
class FlexibleSearchElementType(debugName: @NonNls String) : IElementType(debugName, FlexibleSearchLanguage.INSTANCE) | ||
class FlexibleSearchElementType(debugName: @NonNls String) : IElementType(debugName, FlexibleSearchLanguage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* | ||
* This file is part of "hybris integration" plugin for Intellij IDEA. | ||
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA. | ||
* Copyright (C) 2014-2016 Alexander Bartash <[email protected]> | ||
* Copyright (C) 2019-2023 EPAM Systems <[email protected]> and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
|
@@ -20,12 +21,10 @@ package com.intellij.idea.plugin.hybris.flexibleSearch | |
import com.intellij.lang.Language | ||
import java.io.Serial | ||
|
||
class FlexibleSearchLanguage : Language("FlexibleSearch") { | ||
object FlexibleSearchLanguage : Language("FlexibleSearch") { | ||
|
||
companion object { | ||
@Serial | ||
private const val serialVersionUID: Long = 1870292616506709017L | ||
private fun readResolve(): Any = FlexibleSearchLanguage | ||
|
||
val INSTANCE: FlexibleSearchLanguage = FlexibleSearchLanguage() | ||
} | ||
@Serial | ||
private const val serialVersionUID: Long = 1870292616506709017L | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* | ||
* This file is part of "hybris integration" plugin for Intellij IDEA. | ||
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA. | ||
* Copyright (C) 2014-2016 Alexander Bartash <[email protected]> | ||
* Copyright (C) 2019-2023 EPAM Systems <[email protected]> and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
|
@@ -17,14 +18,14 @@ | |
*/ | ||
package com.intellij.idea.plugin.hybris.flexibleSearch | ||
|
||
import com.intellij.idea.plugin.hybris.common.HybrisConstants | ||
import com.intellij.idea.plugin.hybris.flexibleSearch.file.FlexibleSearchFile | ||
import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes | ||
import com.intellij.lang.ASTNode | ||
import com.intellij.lang.ParserDefinition | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.psi.FileViewProvider | ||
import com.intellij.psi.PsiElement | ||
import com.intellij.psi.TokenType | ||
import com.intellij.psi.tree.IFileElementType | ||
import com.intellij.psi.tree.TokenSet | ||
|
||
|
@@ -35,19 +36,14 @@ class FlexibleSearchParserDefinition : ParserDefinition { | |
override fun createElement(node: ASTNode): PsiElement = FlexibleSearchTypes.Factory.createElement(node) | ||
override fun createFile(viewProvider: FileViewProvider) = FlexibleSearchFile(viewProvider) | ||
|
||
override fun getFileNodeType(): IFileElementType = FILE_NODE_TYPE | ||
override fun getWhitespaceTokens() = WHITE_SPACES | ||
override fun getCommentTokens() = COMMENTS | ||
override fun getStringLiteralElements(): TokenSet = STRING_LITERALS | ||
override fun getFileNodeType(): IFileElementType = HybrisConstants.FXS_FILE_NODE_TYPE | ||
override fun getWhitespaceTokens(): TokenSet = TokenSet.WHITE_SPACE | ||
override fun getCommentTokens() = TokenSet.create(FlexibleSearchTypes.COMMENT, FlexibleSearchTypes.LINE_COMMENT) | ||
override fun getStringLiteralElements(): TokenSet = TokenSet.create( | ||
FlexibleSearchTypes.SINGLE_QUOTE_STRING_LITERAL, | ||
FlexibleSearchTypes.DOUBLE_QUOTE_STRING_LITERAL | ||
) | ||
|
||
override fun spaceExistenceTypeBetweenTokens(left: ASTNode, right: ASTNode) = ParserDefinition.SpaceRequirements.MAY | ||
|
||
companion object { | ||
val FILE_NODE_TYPE = IFileElementType(FlexibleSearchLanguage.INSTANCE) | ||
val WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE) | ||
val COMMENTS = TokenSet.create(FlexibleSearchTypes.COMMENT, FlexibleSearchTypes.LINE_COMMENT) | ||
val STRING_LITERALS = TokenSet.create( | ||
FlexibleSearchTypes.SINGLE_QUOTE_STRING_LITERAL, | ||
FlexibleSearchTypes.DOUBLE_QUOTE_STRING_LITERAL | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.