Skip to content

Commit

Permalink
Merge pull request #154 from dinbtechit/bug/Fix-151-150
Browse files Browse the repository at this point in the history
Fix for #150 and #151
  • Loading branch information
dinbtechit committed Oct 16, 2023
2 parents e077c1f + 59a8d89 commit 3b001d0
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
# vscode-theme Changelog

## Unreleased
### Changed
- Removed Enum usage as it is not supported in PyCharm, CLion and RubyMine 2022.x.x
- Upgrading Gradle - `8.1` to `8.3`

### Fixed
- #130 - VScode startup activity error - Specific to PyCharm, CLion and RubyMine.
- #132 - Java -Wrong colors if there is extends or super keyword inside generic of generic.
- #139 - Python Jupyter - Removed black background in Jupyter (Had to make a Temp fix might not be perfect.)
- VSCode Light Theme - Toolbar background was white and hard to see the buttons.
- #150 - Unable to select the default theme DARK_MODERN
- #151 - java.lang.NoClassDefFoundError JupyterPyDialect

## 1.10.4 - 2023-10-15

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pluginGroup = com.github.dinbtechit.vscodetheme
pluginName = VSCode Theme
# SemVer format -> https://semver.org
pluginVersion = 1.10.4
pluginVersion = 1.10.5

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ class VSCodeThemeManager {
fun switchToVSCodeTheme(always: Boolean = false, selectedVSCodeTheme: String = VSCodeTheme.DARK) {
try {
if (isVSCodeThemeReady()) {
val convertedSelectedVSCodeTheme = convertOldToNewTheme(selectedVSCodeTheme)
val vscodeTheme =
LafManager.getInstance().installedLookAndFeels.first { it.name == selectedVSCodeTheme }
LafManager.getInstance().installedLookAndFeels.first { it.name == convertedSelectedVSCodeTheme }
LafManager.getInstance().currentLookAndFeel = vscodeTheme
if (always) {
val settings = VSCodeThemeSettingsStore.instance
Expand All @@ -60,4 +61,13 @@ class VSCodeThemeManager {
throw(Error("Unable to select the default theme $selectedVSCodeTheme", e))
}
}

private fun convertOldToNewTheme(theme: String): String {
return when (theme) {
"DARK_MODERN" -> "VSCode Dark Modern"
"DARK" -> "VSCode Dark"
else -> theme
}

}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.dinbtechit.vscodetheme.annotators


import com.intellij.lang.Language
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.psi.PsiElement
Expand All @@ -10,7 +11,6 @@ import com.jetbrains.python.psi.*
import com.jetbrains.python.psi.impl.PyImportedModule
import com.jetbrains.python.psi.impl.references.PyImportReference
import com.jetbrains.python.psi.impl.stubs.PyClassElementType
import org.jetbrains.plugins.notebooks.jupyter.python.JupyterPyDialect


class PyAnnotator : BaseAnnotator() {
Expand Down Expand Up @@ -110,8 +110,7 @@ class PyAnnotator : BaseAnnotator() {

private fun isJupyterNoteBook(element: PsiElement): Boolean {
return element.containingFile.name.contains(".ipynb")
|| element.containingFile.language.displayName == JupyterPyDialect.displayName

|| element.containingFile.language == Language.findLanguageByID("JupyterPython")
}

}
8 changes: 8 additions & 0 deletions src/main/resources/themes/vscode_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
<option name="VISUAL_INDENT_GUIDE" value="3b3b3b"/>
</colors>
<attributes>
<option name="JUPYTER.CELL_UNDER_CARET_COMMAND_MODE_STRIPE_COLOR" value="FF9800"/>
<option name="JUPYTER.CELL_UNDER_CARET_EDITOR_MODE_STRIPE_COLOR" value="3F3F3F"/>
<option name="JUPYTER.CODE_CELL_BACKGROUND" value="292929"/>
<option name="JUPYTER.GUTTER_INPUT_EXECUTION_COUNT" value="f78c6c"/>
<option name="JUPYTER.GUTTER_OUTPUT_EXECUTION_COUNT" value="80cbc4"/>
<option name="JUPYTER.PROGRESS_STATUS_RUNNING_COLOR" value="FF9800"/>
<option name="JUPYTER.SAUSAGE_BUTTON_BORDER_COLOR" value="292929"/>
<option name="JUPYTER.SAUSAGE_BUTTON_SHORTCUT_COLOR" value="727272"/>
<option name="ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES">
<value>
<option name="FOREGROUND" value="9cdcfe"/>
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/themes/vscode_dark_brighter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
<option name="VISUAL_INDENT_GUIDE" value="3b3b3b"/>
</colors>
<attributes>
<option name="JUPYTER.CELL_UNDER_CARET_COMMAND_MODE_STRIPE_COLOR" value="FF9800"/>
<option name="JUPYTER.CELL_UNDER_CARET_EDITOR_MODE_STRIPE_COLOR" value="3F3F3F"/>
<option name="JUPYTER.CODE_CELL_BACKGROUND" value="292929"/>
<option name="JUPYTER.GUTTER_INPUT_EXECUTION_COUNT" value="f78c6c"/>
<option name="JUPYTER.GUTTER_OUTPUT_EXECUTION_COUNT" value="80cbc4"/>
<option name="JUPYTER.PROGRESS_STATUS_RUNNING_COLOR" value="FF9800"/>
<option name="JUPYTER.SAUSAGE_BUTTON_BORDER_COLOR" value="292929"/>
<option name="JUPYTER.SAUSAGE_BUTTON_SHORTCUT_COLOR" value="727272"/>
<option name="ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES">
<value>
<option name="FOREGROUND" value="8cd7ff"/>
Expand Down

0 comments on commit 3b001d0

Please sign in to comment.