Skip to content

Commit b061a8d

Browse files
committed
Minor improvement
1 parent 8a6be7a commit b061a8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/org/netbeans/modules/php/phpcsfixer/options/PhpCsFixerPanel.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.netbeans.modules.php.phpcsfixer.options;
1717

18+
import java.awt.EventQueue;
1819
import java.awt.event.ActionEvent;
1920
import java.awt.event.ActionListener;
2021
import java.io.File;
@@ -446,12 +447,17 @@ private void selfUpdate(String filePath) {
446447
});
447448
}
448449

450+
@NbBundle.Messages("PhpCsFixerPanel.loading.version=Loading...")
449451
private void reloadVersion(String path) {
452+
if (!EventQueue.isDispatchThread()) {
453+
SwingUtilities.invokeLater(() -> setVersion(Bundle.PhpCsFixerPanel_loading_version()));
454+
}
450455
RP.post(() -> {
451456
try {
452457
String ver = PhpCsFixer.newInstance(path).getVersion();
453458
SwingUtilities.invokeLater(() -> setVersion(ver));
454459
} catch (InvalidPhpExecutableException ex) {
460+
SwingUtilities.invokeLater(() -> setVersion("")); // NOI18N
455461
LOGGER.log(WARNING, ex.getMessage());
456462
}
457463
});

0 commit comments

Comments
 (0)