What is Lexer Migration.
Lexer is a new API that allows to build and maintain a list of tokens for a given textual input. It replaces the
editor library APIs that is, module editor/lib. Both these libraries provide support for parsing and tokenization. In its current state, a lot of documents in Netbeans use Lexer. At the same time, (I believe) there are many others who have not migrated and use editor library.
Lexer migration for XML is not as trivial as it sounds. There are plenty of code that relies on XML tokens and hence the migration needs to be carried out in a phased manner.
Here is the status.
Who's impacted?
Almost all features in XML use the old API. Here is a list of features that requires migration.
- XDM (Core to all models in schema/bpel/wsdl).
- XML formatter
- XML folds
- Brace matching
- Syntax coloring
- Old (DTD based) code completion
- New schema aware code completion
- xml comment/uncomment actions (not sure)
- org.netbeans.modules.xml.text.syntax.dom package
Plan
Migration will be carried out in a phased manned and based on project priorities. The priority of various migration depends on the severity of issues in that area. In other words, if there are several issues in one area and the migration is considered beneficial, we should give that more preference.
Both the old API and new Lexer APIs can co-exist, hence we have to prioritize what's important to us.
In 6.1, we migrated XDM, folds and formatter. Click here for status.