Skip to content

Commit

Permalink
(#421) Previewer: do not use IDE read/write lock for primitive actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Sep 19, 2024
1 parent d47baf7 commit 2dedfab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

When considering version compatibility (and thus incrementing the major version), we only consider the configuration file major user experience changes. The host IDE version is not considered a version compatibility factor (since otherwise we'd have to increase the major version pretty often and that would make no sense).

## [1.5.1] - 2024-09-19
### Fixed
- [#421: Publish Action Triggers Undo Command](https://github.com/ForNeVeR/AvaloniaRider/issues/421).

## [1.5.0] - 2024-09-01
### Changed
- **(Requirement update!)** Update the minimally supported Rider version to 2024.2.
Expand Down Expand Up @@ -105,4 +109,5 @@ The initial plugin release. The plugin provides the following features for JetBr
[1.3.2]: https://github.com/ForNeVeR/AvaloniaRider/compare/v1.3.1...v1.3.2
[1.4.0]: https://github.com/ForNeVeR/AvaloniaRider/compare/v1.3.2...v1.4.0
[1.5.0]: https://github.com/ForNeVeR/AvaloniaRider/compare/v1.4.0...v1.5.0
[Unreleased]: https://github.com/ForNeVeR/AvaloniaRider/compare/v1.5.0...HEAD
[1.5.1]: https://github.com/ForNeVeR/AvaloniaRider/compare/v1.5.0...v1.5.1
[Unreleased]: https://github.com/ForNeVeR/AvaloniaRider/compare/v1.5.1...HEAD
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kotlin.stdlib.default.dependency=false

pluginVersionBase=1.5.0
pluginVersionBase=1.5.1

untilBuildVersion=243.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package me.fornever.avaloniarider.previewer

import com.intellij.execution.ui.ConsoleView
import com.intellij.openapi.application.EDT
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.diagnostic.debug
import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Computable
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.platform.backend.workspace.WorkspaceModel
import com.intellij.ui.scale.JBUIScale
Expand Down Expand Up @@ -124,10 +122,8 @@ class AvaloniaPreviewerSessionController(

private val inFlightUpdate = Property(false)

private var _session: AvaloniaPreviewerSession? = null
private var session: AvaloniaPreviewerSession?
get() = application.runReadAction(Computable { _session })
set(value) = WriteCommandAction.runWriteCommandAction(project) { _session = value }
@Volatile
private var session: AvaloniaPreviewerSession? = null

private val sessionLifetimeSource = SequentialLifetimes(controllerLifetime)
private var currentSessionLifetime: LifetimeDefinition? = null
Expand Down

0 comments on commit 2dedfab

Please sign in to comment.