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 190934 - API review of a new Parser.cancel method
Summary: API review of a new Parser.cancel method
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 190933
  Show dependency tree
 
Reported: 2010-10-12 08:07 UTC by Tomas Zezula
Modified: 2010-10-18 13:17 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
diff file (20.80 KB, patch)
2010-10-12 08:24 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2010-10-12 08:07:06 UTC
The parsing api does not cancel parser when a new ParserResultTask with higher priority or UserTask is scheduled. This causes several slownesses in the editor and affects responsiveness of the editor.

This API change deprecates the Parser.cancel() method, the deprecated method behaves as before the change, and adds a new cancel method with parameters describing the cancel reason. This method is called even in case when a new task was added. The parser can use the provided information to determine if it should stop and which data are obsolete.
Comment 1 Tomas Zezula 2010-10-12 08:24:35 UTC
Created attachment 102360 [details]
diff file
Comment 2 Jan Lahoda 2010-10-13 11:42:21 UTC
Overall seems fine to me, except that SourceModificationEvent might need another constructor for compatibility:
     @Deprecated
     protected SourceModificationEvent (Object source) {
         this(source, true);
     }
Comment 3 Tomas Zezula 2010-10-13 12:00:08 UTC
Thanks Honzo, I've overlooked that the constructor is protected.
Comment 4 Petr Pisl 2010-10-13 12:57:16 UTC
I think, it's fine to me.
Comment 5 Tomas Zezula 2010-10-13 17:39:59 UTC
I will integrate it tomorrow.
Comment 6 Tomas Zezula 2010-10-18 13:17:03 UTC
Fixed jet-main d1171e687187