Component: Rename classes

This commit is contained in:
zt515
2017-12-26 00:30:32 +08:00
parent b6639cab44
commit 83699de49f
4 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import io.neoterm.App
import io.neoterm.R import io.neoterm.R
import io.neoterm.component.codegen.CodeGenComponent import io.neoterm.component.codegen.CodeGenComponent
import io.neoterm.frontend.component.ComponentManager import io.neoterm.frontend.component.ComponentManager
import io.neoterm.frontend.component.helper.FileBasedComponent import io.neoterm.frontend.component.helper.ConfigFileBasedComponent
import io.neoterm.frontend.config.NeoPreference import io.neoterm.frontend.config.NeoPreference
import io.neoterm.frontend.config.NeoTermPath import io.neoterm.frontend.config.NeoTermPath
import io.neoterm.frontend.logging.NLog import io.neoterm.frontend.logging.NLog
@ -18,7 +18,7 @@ import java.io.File
/** /**
* @author kiva * @author kiva
*/ */
class ColorSchemeComponent : FileBasedComponent<NeoColorScheme>() { class ColorSchemeComponent : ConfigFileBasedComponent<NeoColorScheme>() {
companion object { companion object {
fun colorFile(colorName: String): File { fun colorFile(colorName: String): File {
return File("${NeoTermPath.COLORS_PATH}/$colorName.nl") return File("${NeoTermPath.COLORS_PATH}/$colorName.nl")

View File

@ -9,7 +9,7 @@ import io.neoterm.component.codegen.model.CodeGenObject
import io.neoterm.component.codegen.impl.NeoColorGenerator import io.neoterm.component.codegen.impl.NeoColorGenerator
import io.neoterm.component.config.ConfigureComponent import io.neoterm.component.config.ConfigureComponent
import io.neoterm.frontend.component.ComponentManager import io.neoterm.frontend.component.ComponentManager
import io.neoterm.frontend.component.helper.FileBasedComponentObject import io.neoterm.frontend.component.helper.ConfigFileBasedObject
import io.neoterm.frontend.config.NeoConfigureFile import io.neoterm.frontend.config.NeoConfigureFile
import io.neoterm.frontend.logging.NLog import io.neoterm.frontend.logging.NLog
import io.neoterm.frontend.terminal.TerminalView import io.neoterm.frontend.terminal.TerminalView
@ -20,7 +20,7 @@ import java.io.File
/** /**
* @author kiva * @author kiva
*/ */
open class NeoColorScheme : CodeGenObject, FileBasedComponentObject { open class NeoColorScheme : CodeGenObject, ConfigFileBasedObject {
companion object { companion object {
const val COLOR_PREFIX = "color" const val COLOR_PREFIX = "color"
const val CONTEXT_COLOR_NAME = "colors" const val CONTEXT_COLOR_NAME = "colors"

View File

@ -9,9 +9,9 @@ import java.io.File
/** /**
* @author kiva * @author kiva
*/ */
abstract class FileBasedComponent<out T : FileBasedComponentObject> : NeoComponent { abstract class ConfigFileBasedComponent<out T : ConfigFileBasedObject> : NeoComponent {
companion object { companion object {
private val TAG = FileBasedComponent::class.java.simpleName private val TAG = ConfigFileBasedComponent::class.java.simpleName
} }
open val checkComponentFileWhenObtained = false open val checkComponentFileWhenObtained = false

View File

@ -5,7 +5,7 @@ import io.neolang.visitor.ConfigVisitor
/** /**
* @author kiva * @author kiva
*/ */
interface FileBasedComponentObject { interface ConfigFileBasedObject {
@Throws(RuntimeException::class) @Throws(RuntimeException::class)
fun onConfigLoaded(configVisitor: ConfigVisitor) fun onConfigLoaded(configVisitor: ConfigVisitor)
} }