Fix 34894 - Suggestions view does not work after IDE restart BLD200307150100
authortor@netbeans.org
Sun, 13 Jul 2003 02:54:00 +0000
changeset 3465c0ff89359607
parent 3464 a455f5245c07
child 3466 d642984d382a
Fix 34894 - Suggestions view does not work after IDE restart
suggestions_framework/manifest.mf
suggestions_framework/src/org/netbeans/modules/tasklist/suggestions/SuggestionManagerImpl.java
tasklist.core/manifest.mf
tasklist.core/src/org/netbeans/modules/tasklist/core/TaskListView.java
     1.1 --- a/suggestions_framework/manifest.mf	Sat Jul 12 23:01:25 2003 +0000
     1.2 +++ b/suggestions_framework/manifest.mf	Sun Jul 13 02:54:00 2003 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  Manifest-Version: 1.0
     1.5 -OpenIDE-Module-Specification-Version: 1.10
     1.6 +OpenIDE-Module-Specification-Version: 1.11
     1.7  OpenIDE-Module: org.netbeans.modules.tasklist.suggestions/1
     1.8  OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tasklist/suggestions/Bundle.properties
     1.9  OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
     2.1 --- a/suggestions_framework/src/org/netbeans/modules/tasklist/suggestions/SuggestionManagerImpl.java	Sat Jul 12 23:01:25 2003 +0000
     2.2 +++ b/suggestions_framework/src/org/netbeans/modules/tasklist/suggestions/SuggestionManagerImpl.java	Sun Jul 13 02:54:00 2003 +0000
     2.3 @@ -217,6 +217,12 @@
     2.4                  provider.notifyPrepare();
     2.5              }
     2.6              prepared = true;
     2.7 +
     2.8 +            // The window system doesn't generate TopComponent.componentShowing
     2.9 +            // when the view is opened (or, it may generate it before the
    2.10 +            // componentOpened call). This will be a no-op in that case,
    2.11 +            // since running=true will already be the case.
    2.12 +            notifyViewShowing();
    2.13          }
    2.14      }
    2.15  
    2.16 @@ -1985,7 +1991,23 @@
    2.17  	workspace.addPropertyChangeListener(this);
    2.18  	*/
    2.19  	
    2.20 -	findCurrentFile(false);
    2.21 +        if (pendingScan) {
    2.22 +            return;
    2.23 +        }
    2.24 +        pendingScan = true;
    2.25 +        SwingUtilities.invokeLater(new Runnable() {
    2.26 +            public void run() {
    2.27 +                // docStop() might have happened
    2.28 +                // in the mean time - make sure we don't do a
    2.29 +                // findCurrentFile(true) when we're not supposed to
    2.30 +                // be processing views
    2.31 +                if (running) {
    2.32 +                    findCurrentFile(false);
    2.33 +                }
    2.34 +                pendingScan = false;
    2.35 +            }
    2.36 +        });
    2.37 +
    2.38      }
    2.39  
    2.40      /** The topcomponent we're currently tracking as the showing
    2.41 @@ -2326,8 +2348,8 @@
    2.42                  // be processing views
    2.43                  if (running) {
    2.44                      findCurrentFile(true);
    2.45 -                    pendingScan = false;
    2.46                  }
    2.47 +                pendingScan = false;
    2.48              }
    2.49          });
    2.50      }
     3.1 --- a/tasklist.core/manifest.mf	Sat Jul 12 23:01:25 2003 +0000
     3.2 +++ b/tasklist.core/manifest.mf	Sun Jul 13 02:54:00 2003 +0000
     3.3 @@ -1,5 +1,5 @@
     3.4  Manifest-Version: 1.0
     3.5 -OpenIDE-Module-Specification-Version: 1.11
     3.6 +OpenIDE-Module-Specification-Version: 1.12
     3.7  OpenIDE-Module: org.netbeans.modules.tasklist.core/1
     3.8  OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tasklist/core/Bundle.properties
     3.9  OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
     4.1 --- a/tasklist.core/src/org/netbeans/modules/tasklist/core/TaskListView.java	Sat Jul 12 23:01:25 2003 +0000
     4.2 +++ b/tasklist.core/src/org/netbeans/modules/tasklist/core/TaskListView.java	Sun Jul 13 02:54:00 2003 +0000
     4.3 @@ -1192,6 +1192,9 @@
     4.4          return nodes;
     4.5      }
     4.6  
     4.7 +    private Class nextActionClz = null;
     4.8 +    private Class prevActionClz = null;
     4.9 +    
    4.10      /** 
    4.11       * Assign the Next/Previous build actions to point to the
    4.12       * task window 
    4.13 @@ -1204,9 +1207,6 @@
    4.14          // In other words, the next action button shouldn't light
    4.15          // up when there are no tasks to move to.
    4.16  
    4.17 -        Class nextActionClz = null;
    4.18 -        Class prevActionClz = null;
    4.19 -        
    4.20          // Make F12 jump to next task
    4.21          if (nextActionClz == null) {
    4.22              if (lookupAttempted) {