Skip to content

Commit

Permalink
refactor: use constants where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
lppedd committed Nov 10, 2019
1 parent f82363e commit 81ab6ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/com/github/lppedd/highlighter/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ package com.github.lppedd.highlighter
*/
object Constants {
const val APP_NAME = "ReturnHighlighter"
const val PRESENTABLE_APP_NAME = "Return Highlighter"
const val STORAGE_FILE = "returnHighlighter.xml"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.lppedd.highlighter.settings

import com.github.lppedd.highlighter.AbstractReturnAnnotator
import com.github.lppedd.highlighter.Constants
import com.github.lppedd.highlighter.Icons
import com.intellij.openapi.fileTypes.PlainSyntaxHighlighter
import com.intellij.openapi.options.colors.AttributesDescriptor
Expand All @@ -13,7 +14,7 @@ import com.intellij.psi.codeStyle.DisplayPrioritySortable
* @author Edoardo Luppi
*/
class ReturnHighlighterColorSettingsPage : ColorSettingsPage, DisplayPrioritySortable {
override fun getDisplayName() = "Return Highlighter"
override fun getDisplayName() = Constants.PRESENTABLE_APP_NAME
override fun getIcon() = Icons.GUTTER_RETURN
override fun getPriority() = DisplayPriority.COMMON_SETTINGS
override fun getAttributeDescriptors() =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ReturnHighlighterConfigurable : SearchableConfigurable {
}

override fun getId() = "preferences.${Constants.APP_NAME}"
override fun getDisplayName() = "Return Highlighter"
override fun getDisplayName() = Constants.PRESENTABLE_APP_NAME
override fun isModified() = false
override fun apply() = Unit
override fun createComponent() = rootPanel
Expand Down

0 comments on commit 81ab6ee

Please sign in to comment.