feat: 功能更新

This commit is contained in:
cirry 2024-01-07 14:16:07 +08:00
parent 50a42227b6
commit ee26516928
3 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
<!-- Plugin description -->
A WeChat Reading plugin supporting IDEA.
A WeChat Reading plugin support IDEA.
Full WeChat Reading functionality is available, allowing navigation using the arrow keys for reading. Please adjust the window to a suitable size before use.
<!-- Plugin description end -->
@ -26,7 +26,7 @@ Full WeChat Reading functionality is available, allowing navigation using the ar
- Using the IDE built-in plugin system:
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "wxreader-Jetbrains-Plugin"</kbd> >
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "WeRead-Jetbrains-Plugin"</kbd> >
<kbd>Install</kbd>
- Manually:

View File

@ -5,7 +5,7 @@ pluginGroup = com.github.cirry.wereadjetbrainsplugin
pluginName = Weread
pluginRepositoryUrl = https://github.com/cirry/wxreader-Jetbrains-Plugin
# SemVer format -> https://semver.org
pluginVersion = 0.0.1
pluginVersion = 0.0.2
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223

View File

@ -20,14 +20,14 @@ class MyToolWindowFactory : ToolWindowFactory {
}
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
val myToolWindow = MyToolWindow(toolWindow)
val myToolWindow = MyToolWindow()
val content = ContentFactory.getInstance().createContent(myToolWindow.getContent(), "", false)
toolWindow.contentManager.addContent(content)
}
override fun shouldBeAvailable(project: Project) = true
class MyToolWindow(toolWindow: ToolWindow) {
class MyToolWindow() {
fun getContent() = JBPanel<JBPanel<*>>().apply {
val noSupportLabel = JBLabel(MyBundle.message("noSupport"))
if (JBCefApp.isSupported()) {