File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/main/java/com/shuzijun/leetcode/plugin/timer Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 11package com .shuzijun .leetcode .plugin .timer ;
22
33import com .intellij .openapi .project .Project ;
4- import com .intellij .openapi .util .Disposer ;
54import com .intellij .openapi .wm .StatusBar ;
65import com .intellij .openapi .wm .StatusBarWidget ;
76import com .intellij .openapi .wm .StatusBarWidgetFactory ;
1615 */
1716public class TimerStatusBarWidgetProvider implements StatusBarWidgetFactory {
1817
19- private TimerBarWidget timerBarWidget ;
2018
2119 @ Override
2220 public @ NonNls @ NotNull String getId () {
@@ -35,21 +33,15 @@ public boolean isAvailable(@NotNull Project project) {
3533
3634 @ Override
3735 public @ NotNull StatusBarWidget createWidget (@ NotNull Project project ) {
38- if (timerBarWidget == null ) {
39- timerBarWidget = new TimerBarWidget (project );
40- }
41- return timerBarWidget ;
36+ return new TimerBarWidget (project );
4237 }
4338
4439 @ Override
4540 public void disposeWidget (@ NotNull StatusBarWidget widget ) {
46- if (timerBarWidget != null ) {
47- Disposer .dispose (timerBarWidget );
48- }
4941 }
5042
5143 @ Override
5244 public boolean canBeEnabledOn (@ NotNull StatusBar statusBar ) {
53- return false ;
45+ return true ;
5446 }
5547}
You can’t perform that action at this time.
0 commit comments