HTMLEmbeddedLanguagesHowTo
Embedded Languages How To
This document describes the progress on the embeddeding of following editors:
- html -> javascript, css
- jsp -> html -> javascript, css
- rhtml -> html -> javascript, css
Current state / notes
HTML
- We use the old HTML editor implementation for code completion, coloring, bracket matching, indentation, palette.
- All the features above are based on lexer (html/lexer module).
- The HTML editor is integrated with Schliemann:
- There is an html.nbs file and some other resources in html/editor module - basically the same stuff which is in languages/html - we agreed with Hanz to keep the old one untouched.
- HTML EditorKit extends Schliemann's EK - this needs to be changed later since we do not want to have the EK in public API.
- Schlieman provides a new functionality to the handcoded HTML editor - code navigator.
- Embedding of Javascript and CSS:
- There is HTML parser (not the one in S.) which dynamically creates embeddings of javascript and css using Lexer API. The parser can probably be replaced by the S's one (not sure now).
- Following features of JS and CSS works in HTML - coloring, navigator, code completion, folding, error highlighting
JSP
- embedding of javascript and css works in JSP
- most of the schliemann features doesn't work because of issue 99134
RHTML
tbd
How to get it
- checkout from trunk
- web/css
- languages/css
- scripting/javascript
- scripting/ruby/*
- checkout from embedding_60 branch
- html/editor
- web/jspsyntax
- web/jspsyntax/lexer
- languages/engine
- scripting/ruby/rhtml
- add languages/engine into IDE cluster
- build all the modules
Embedding related issues
Following issuezilla link queries all issues with EMBEDDING status whiteboard: Issuezilla Query
Features which are supposed to work
Note: All pure HTML/JSP features which worked in netbeans 5.5 are supposed to work also in the 'embedded HTML/JSP'
- Fatures Status
html -> javascript, css; jsp -> html -> javascript, css
Feature | JSP | HTML | javas. | css |
---|---|---|---|---|
coloring | o | o | o | o |
semantic coloring | ? | |||
completion | o | o | o | o |
completion javadoc | o | o | ||
folding | o | o | o | o |
formatting/indent. | o | o | * | * |
error highliting | o | o/1 | o | |
hints | o | ? | ||
palette | o | o | o | |
live templates | * | |||
navigator | o | o/2 | o | o |
comment/uncomment | * | * | * | * |
bracked matching | o | o | o | * |
hyperlinking | o | o | * | * |
drag & drop |
Notes:
- 1 - error highlighting - errorneous language constructs, unpaired/unfinished tags, deprecated tags or attributes are underlined and annotation shows signalling the error/warning
- 2 - code navigator - shows html file structure, shows nodes for css rules, javascript variables, methods;
- java features in JSP are not listed here
rhtml -> ruby, html -> javascript, css
Feature | ruby | HTML | javas. | css |
---|---|---|---|---|
coloring | o | o | o | o |
semantic coloring | ? | |||
completion | * | o | o | o |
completion javadoc | * | o | ||
folding | ? | o | o | o |
formatting/indent. | * | o | * | * |
error highliting | * | o/1 | o | |
hints | ? | o | ? | |
palette | ? | o | o | |
live templates | ? | |||
navigator | ? | o/2 | o | o |
comment/uncomment | * | * | * | * |
bracked matching | * | o | o | * |
hyperlinking | ? | o | * | * |
drag & drop |
Legend
o ... we have it already
- ... do not have it, but we want in 6.0
... probably want to have but not to 6.0
- ... doesn't make much sense ? ... not sure about this one