Skip to content

Commit

Permalink
Merge pull request #63 from doki-theme/mnemonicBookmark
Browse files Browse the repository at this point in the history
Added Better Mnemonic Bookmarks
  • Loading branch information
Unthrottled authored Mar 15, 2023
2 parents be9455d + 6afae6b commit 17d5562
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## [Unreleased]

## 88.5-1.0.12 [Mnemonic Bookmarks]

### Added
- Mnemonic Bookmarks

## 88.3-1.0.11 [Maintenance]

### Fixed
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- CSS Icon
- Initial 2023.1 build support
- dll, so, dylib, java.class files, & .iml file icons.
- Mnemonic Bookmarks


### Fixed
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/BuildThemes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ data class DokiTheme(

data class IconPathMapping(
val iconName: String,
val isOddBall: Boolean?,
)

open class BuildThemes : DefaultTask() {
Expand Down Expand Up @@ -129,6 +130,7 @@ open class BuildThemes : DefaultTask() {
object : TypeToken<List<IconPathMapping>>() {}
)
}
.filter { it.isOddBall != true }
.map { it.iconName }
.toMutableSet()

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pluginGroup = io.unthrottled.doki.icons
pluginName = Doki Theme Icons
pluginVersion = 88.3-1.0.11
pluginVersion = 88.5-1.0.12

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 222
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ object Constants {
const val PLUGIN_ID = "io.unthrottled.doki.icons"
const val PLUGIN_NAME = "Doki Theme Icons"
const val DOKI_ICONS_BASE_PATH = "doki/icons"
const val DOKI_ODD_BALLS_ICONS_BASE_PATH = "doki/oddBalls"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import io.unthrottled.doki.icons.jetbrains.tools.logger

data class PathMapping(
val originalPath: String,
val iconName: String
val iconName: String,
val isOddBall: Boolean?
)

class DokiIconPathPatcher(private val mappingFile: String) : IconPathPatcher(), Logging {
Expand All @@ -22,7 +23,9 @@ class DokiIconPathPatcher(private val mappingFile: String) : IconPathPatcher(),
)
.map { def ->
def.associate {
it.originalPath to "${Constants.DOKI_ICONS_BASE_PATH}/${it.iconName}"
val dokiIconsBasePath =
if (it.isOddBall == true) Constants.DOKI_ODD_BALLS_ICONS_BASE_PATH else Constants.DOKI_ICONS_BASE_PATH
it.originalPath to "$dokiIconsBasePath/${it.iconName}"
}
}.orElseGet {
logger().warn("Unable to read path mappings")
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/doki/oddBalls/gutter/mnemonic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/doki/oddBalls/gutter/mnemonic_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/doki/oddBalls/nodes/mnemonic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/doki/oddBalls/nodes/mnemonic_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/main/resources/doki/oddBalls/plugins/vim.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion src/main/resources/ui-icons.path.mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@
},
{
"originalPath": "/icons/ideavim.svg",
"iconName": "vim.svg"
"iconName": "plugins/vim.svg",
"isOddBall": true
},
{
"originalPath": "/nodes/plugin.svg",
Expand Down Expand Up @@ -894,5 +895,25 @@
{
"originalPath": "/actions/searchWithHistory.svg",
"iconName": "search_right_chevron_down.svg"
},
{
"originalPath": "/gutter/mnemonic.svg",
"iconName": "gutter/mnemonic.svg",
"isOddBall": true
},
{
"originalPath": "/gutter/mnemonic_dark.svg",
"iconName": "gutter/mnemonic_dark.svg",
"isOddBall": true
},
{
"originalPath": "/nodes/mnemonic.svg",
"iconName": "nodes/mnemonic.svg",
"isOddBall": true
},
{
"originalPath": "/nodes/mnemonic_dark.svg",
"iconName": "nodes/mnemonic_dark.svg",
"isOddBall": true
}
]

0 comments on commit 17d5562

Please sign in to comment.