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 - Use highlighting layers registered for embedded languages
Summary: Use highlighting layers registered for embedded languages
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Miloslav Metelka
URL:
Keywords: API
Depends on:
Blocks: 133906
  Show dependency tree
 
Reported: 2008-04-10 09:30 UTC by Vitezslav Stejskal
Modified: 2010-09-23 07:59 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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