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 132484

Summary: Use highlighting layers registered for embedded languages
Product: editor Reporter: Vitezslav Stejskal <vstejskal>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: blocker Keywords: API
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on:    
Bug Blocks: 133906    

Description Vitezslav Stejskal 2008-04-10 09:30:52 UTC
Currently the highlighting infrastructure only looks at a document's mimetype and loads highlighting layers that are
registered for this mimetype. This does not work well when the document contains embedded languages. The infrastructure
should try to discover all the languages embedded in the document and add their highlighting layers as well. As an
example you can think about java embedded in JSP. The java language support registers AST-based highlighting layer for
'text/x-java', which works fine in plain java files, but the layer is not used for JSP documents that contain embedded
java sections.

The implementation will have to track dynamic changes in the document, because a user may add/remove embedded sections
as they edit a document. The layers on the other side will have to be prepared to act on documents where there is no
code in their language (eg no embedded java section). Obviously the contract will havge to be described in the docs and
well tested.
Comment 1 Jiri Prox 2008-04-11 00:44:21 UTC
moving opened issues from TM <= 6.1 to TM=Dev