Skip to content

Commit

Permalink
Fix the threads certain actions run in (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
groboclown committed Aug 1, 2019
1 parent 945c9cd commit aac9b67
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# IDEA Community VCS Integration for Perforce


## ::v0.10.8::

### Overview

* Bug fixes

### Details

* Bug fixes:
* Fix for IDE 2019.2 releases, which altered the expectations for which
thread different tasks should run in. (#199)


## ::v0.10.7::

### Overview
Expand All @@ -11,7 +24,8 @@

* Bug fixes:
* "Revert unchanged" was unconditionally reverting (#181 again).
* Added additional logging to the rollback calls to better catch the source of these issues.
* Added additional logging to the rollback calls to better catch the
source of these issues.


## ::v0.10.6::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ public void onSuccess() {
if (listener != null) {
// "directoryCheckedOut" can run an AWT event, which is not allowed from within
// this write action. Need to run this on a separate thread. #196
ApplicationManager.getApplication().invokeLater(() -> {
// And #199
ApplicationManager.getApplication().executeOnPooledThread(() -> {
listener.directoryCheckedOut(rootPath.getIOFile(), P4Vcs.getKey());
listener.checkoutCompleted();
}, ModalityState.any());
});
}
}
}.queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,12 @@ public JComponent getRoot() {

public void refresh() {
if (root != null) {
runner.requestRun();
connectionTree.getEmptyText().setText(P4Bundle.getString("connection.tree.empty"));
// #199 - As of IntelliJ 19.2, this needs to be done in the EDT.
// This isn't the most optimal code, but it works.
ApplicationManager.getApplication().invokeLater(() -> {
runner.requestRun();
connectionTree.getEmptyText().setText(P4Bundle.getString("connection.tree.empty"));
});
}
}

Expand Down
10 changes: 4 additions & 6 deletions plugin-v3/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
<category>VCS Integration</category>
<change-notes><![CDATA[
<ul>
<li><em>0.10.8</em><ul>
<li>Fixed the thread that some operations run in to better support
IDE versions 2019.2 and above.</li>
</ul></li>
<li><em>0.10.7</em><ul>
<li>Fixed "revert unchanged" incorrectly and unconditionally reverting files.</li>
<li>Increased logging around what initiates the rollback.</li>
</ul></li>
<li><em>0.10.6</em><ul>
<li>"Environment" configuration on Windows and JDK 11 can now inspect the Registry for information.</li>
<li>Fixed an issue where 0 files could be requested in an `fstat` call.</li>
<li>Fixed an issue where, in some cases, fstat was not limiting the number of results.</li>
<li>Changed reporting on a successful sync; it must happen from within the EDT.</li>
</ul></li>
</ul>
]]></change-notes>
<description><![CDATA[
Expand Down

0 comments on commit aac9b67

Please sign in to comment.