Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 132484 - Use highlighting layers registered for embedded languages
Use highlighting layers registered for embedded languages
Status: NEW
Product: editor
Classification: Unclassified
Component: Painting & Printing
6.x
All All
: P2 with 1 vote (vote)
: 6.x
Assigned To: Miloslav Metelka
issues@editor
: API
Depends on:
Blocks: 133906
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo