-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished implementing all the settings, mapping menu, trident list me…
…nu, and fixed all the bugs/issues. Added more index actions for a total of 10 actions (compared to the original 4). Updated README.md and TODO.md. Changed version to 2.0.0. Versions now follow the semver standard. which means that for each major version there will be backwards incompatible changes. for minor versions there will be new features and bug fixes. and for patch versions there will be bug fixes only.
- Loading branch information
Showing
16 changed files
with
265 additions
and
329 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
30 changes: 12 additions & 18 deletions
30
...me/kyren223/trident/data/SettingsState.kt → ...tlin/me/kyren223/trident/data/Settings.kt
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,33 +1,27 @@ | ||
package me.kyren223.trident.data | ||
|
||
import com.intellij.openapi.application.ApplicationManager | ||
import com.intellij.openapi.components.PersistentStateComponent | ||
import com.intellij.openapi.components.State | ||
import com.intellij.openapi.components.Storage | ||
import com.intellij.util.xmlb.XmlSerializerUtil | ||
import com.intellij.openapi.components.* | ||
|
||
// Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
@Service | ||
@State(name = "me.kyren223.trident.data.SettingsState", storages = [Storage("SdkSettingsPlugin.xml")]) | ||
class SettingsState : PersistentStateComponent<SettingsState?> { | ||
class Settings : SimplePersistentStateComponent<SettingsState>(SettingsState()) { | ||
companion object { | ||
val instance: Settings | ||
get() = ApplicationManager.getApplication().getService(Settings::class.java) | ||
val state: SettingsState | ||
get() = instance.state | ||
} | ||
} | ||
|
||
class SettingsState : BaseState() { | ||
var width = 800 | ||
var height = 400 | ||
var fontSize = 20 | ||
var enterToSelect = true | ||
var automaticMapping = false | ||
var recursiveMapping = false | ||
var rememberLine = false | ||
|
||
override fun getState(): SettingsState { | ||
return this | ||
} | ||
|
||
override fun loadState(state: SettingsState) { | ||
XmlSerializerUtil.copyBean(state, this) | ||
} | ||
|
||
companion object { | ||
val instance: SettingsState | ||
get() = ApplicationManager.getApplication().getService(SettingsState::class.java) | ||
} | ||
var indexCycling = false | ||
} |
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.