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 22173

Summary: Name of TokenIterator misleading
Product: editor Reporter: Jaroslav Tulach <jtulach>
Component: LexerAssignee: issues@editor <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Patch that shows how the misleading TokenIterator can be replaced by few methods in IncrementalAlgorithm

Description Jaroslav Tulach 2002-04-07 20:52:17 UTC
When I first saw the package javadoc of the lexer
package, I had
     problems to find out what classes are
designed for what. I knew that
     there are two things - the lexer and the
incremental algorithm. But the
     TokenConstants class was totaly unrelated to
anything - now there is a
     comment in Javadoc, but I am still not able
to realize the reason of
     putting this into separate class...

     The second problem I had was with
TokenIterator. It starts with word
     Token, so I immediatelly connected it with
Token, TokenCathegory and
     TokenId - but it is not true, it is connected
with the algorith. Please
     for the sanity of future readers of the API
do something with this. That
     is what I want to emphsize.

     I suggested you to make the TokenIterator
inner class of the algorithm
     or merge it with the algorithm to make the
clear cut between lexer and
     algorithm part.
Comment 1 Jaroslav Tulach 2002-04-08 19:40:37 UTC
Created attachment 5324 [details]
Patch that shows how the misleading TokenIterator can be replaced by few methods in IncrementalAlgorithm
Comment 2 Miloslav Metelka 2002-05-28 11:39:01 UTC
TokenConstants is removed from API. It's now just experimental class
for the swing support part of the lexer module.