This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 38262

Summary: JavaParserGlue triggers parser on closing editor
Product: java Reporter: _ pkuzel <pkuzel>
Component: UnsupportedAssignee: Jan Pokorsky <jpokorsky>
Status: RESOLVED FIXED    
Severity: blocker CC: thurka
Priority: P3 Keywords: PERFORMANCE
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 38273    

Description _ pkuzel 2003-12-22 09:39:50 UTC
In TODOs I use EditorCookie to access dataobject
documents (without opening editor component). It
touches all java files in search context and
suffers slow down partialy caused by background
java file parsing triggered by calling close() on
the editor cookie.

Close event on dataobject without opened editor
component should not trigger reparsing.

Thread "Default RequestProcessor"@2 in group
"system" status: RUNNING
parse():233,
org.netbeans.modules.java.parser.ParsingSupport
parse():224,
org.netbeans.modules.java.parser.ParsingSupport
stateChanged():565,
org.netbeans.modules.java.JavaParserGlue$SiblingListener
fireStateChangeEvent():1544,
org.openide.text.CloneableEditorSupport
fireDocumentChange():1528,
org.openide.text.CloneableEditorSupport
doCloseDocument():1439,
org.openide.text.CloneableEditorSupport
closeDocument():1412,
org.openide.text.CloneableEditorSupport
notifyClosed():1260,
org.openide.text.CloneableEditorSupport
notifyClosed():218, org.openide.text.DataEditorSupport
superNotifyClosed():551,
org.openide.text.EditorSupport$Del
notifyClosed():426, org.openide.text.EditorSupport
notifyClosed():307,
org.netbeans.modules.java.JavaEditor
notifyClosed():536, org.openide.text.EditorSupport$Del
close():1392, org.openide.text.CloneableEditorSupport
superClose():626, org.openide.text.EditorSupport$Del
close():172, org.openide.text.EditorSupport
close():622, org.openide.text.EditorSupport$Del
close():99, org.openide.windows.CloneableOpenSupport
close():164, org.openide.text.EditorSupport
scanFolder():178,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scanFolder():133,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scanFolder():133,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scanFolder():133,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scanFolder():133,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scan():101,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scan():85,
org.netbeans.modules.tasklist.suggestions.SuggestionsScanner
scanProjectSuggestions():109,
org.netbeans.modules.tasklist.docscan.SourceTasksScanner
run():73,
org.netbeans.modules.tasklist.docscan.SourceTasksScanner$1
run():136, org.openide.util.Task
run():330, org.openide.util.RequestProcessor$Task
run():678, org.openide.util.RequestProcessor$Processor
Comment 1 _ pkuzel 2003-12-22 09:46:21 UTC
Another triggering event:

Thread "AWT-EventQueue-1"@9 status: RUNNING
addRequest():825, org.netbeans.modules.java.parser.ParsingSupport
access$000():69, org.netbeans.modules.java.parser.ParsingSupport
setPriority():569,
org.netbeans.modules.java.parser.ParsingSupport$Processor
parse():250, org.netbeans.modules.java.parser.ParsingSupport
parseSource():246, org.netbeans.modules.java.JavaEditor
access$400():75, org.netbeans.modules.java.JavaEditor
run():382, org.netbeans.modules.java.JavaEditor$3
dispatch():178, java.awt.event.InvocationEvent
dispatchEvent():454, java.awt.EventQueue
pumpOneEventForHierarchy():201, java.awt.EventDispatchThread
pumpEventsForHierarchy():151, java.awt.EventDispatchThread
pumpEvents():145, java.awt.EventDispatchThread
pumpEvents():137, java.awt.EventDispatchThread
run():100, java.awt.EventDispatchThread


I have not opened any Java file nor selected any Java node.
Comment 2 Jan Pokorsky 2004-01-08 16:14:57 UTC
fixed in

/cvs/java/src/org/netbeans/modules/java/JavaEditor.java
new revision: 1.147; previous revision: 1.146
/cvs/java/src/org/netbeans/modules/java/JavaParserGlue.java
new revision: 1.44; previous revision: 1.43