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.
Summary: | Create language embedding through Lexer API | ||
---|---|---|---|
Product: | editor | Reporter: | Miloslav Metelka <mmetelka> |
Component: | Lexer | Assignee: | apireviews <apireviews> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | mstevens, pjiricka |
Priority: | P2 | Keywords: | API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 89324 | ||
Attachments: |
Diff of the change
List of committed files |
Description
Miloslav Metelka
2006-10-04 15:16:19 UTC
The following attached diff contains implementation of this request. There are the following changes: 1. Extracted TokenHierarchyEvent.Type inner enum into TokenHierarchyEventType top-level enum for better readability. 2. Adding TokenSequence.createEmbedding() method was added for creation of a custom embedding. New TokenHierarchyEventType.EMBEDDING value fired after the custom embedding creation. 3. Affected offset area information affectedStartOffset() and affectedEndOffset() extracted from TokenChange to TokenHierarchyEvent because it's more useful and clear for the clients of these methods - e.g. the syntax coloring will just query these offsets without digging into the (possibly embedded) token change(s). 4. Removed tokenComplete parameter from LanguageHierarchy.embedding() because it's currently unused and the token incompletness will be handled in a different way in the future (see also issue 87014). 5. Swapped order of <code>token</code> and languagePath parameters in LanguageProvider to be in sync with LanguageHierarchy.embedding(). 6. LanguageEmbedding is now a final class (instead of abstract class) with private constructor and static create() method. That allows better control over the evolution of the class and it also allows to cache the created embeddings to save memory. 7. LanguageEmbedding is now generified with the LanguageEmbedding<T extends TokenId> which is a generification of the language which it contains. 8. TokenHierarchy.languagePaths() set contains all language paths used in the particular token hierarchy. TokenHierarchyEventType.LANGUAGE_PATHS is fired after change of the language paths set. Created attachment 36320 [details]
Diff of the change
Marking for fasttrack review. BTW "diff -u" is generally more readable than "diff -c", especially in an enormous patch like this one. Easiest to append "diff -u" to your ~/.cvsrc file. Created attachment 36454 [details]
List of committed files
Committed into trunk. Uh, did you mean M6? Sorry, I've meant M6. Thanks, Jesse. |