File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
src/org/netbeans/modules/php/cake3/ui Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,23 @@ public Dimension getPreferredSize() {
116116 return panel ;
117117 }
118118
119- private void setVersion (String version ) {
120- assert SwingUtilities .isEventDispatchThread ();
119+ private void setVersion (final String version ) {
120+ Runnable runnable = new Runnable () {
121+ @ Override
122+ public void run () {
123+ versionLabel .setText (version );
124+ versionLabel .setIcon (CAKE_ICON );
125+ }
126+ };
121127 if (CakeVersion .UNNKOWN .equals (version )) {
122128 clearLabel ();
129+ return ;
130+ }
131+
132+ if (SwingUtilities .isEventDispatchThread ()) {
133+ runnable .run ();
123134 } else {
124- versionLabel .setText (version );
125- versionLabel .setIcon (CAKE_ICON );
135+ SwingUtilities .invokeLater (runnable );
126136 }
127137 }
128138
You can’t perform that action at this time.
0 commit comments