ParsingAPI
Contents |
Quick Links to Turorials and Docs
How_to_create_support_for_a_new_language
Netbeans_Rcp_Antlr_Integration_Index
Motivation
NetBeans IDE is no longer just Java IDE. We support many various languages: Java, Ruby, PHP, JSP, Javascript and so on. Each language support module implements its own parsing framework. We have Retouche for Java, GSF for Ruby, Schliemann. Now is the right time to consiladate those framworks in order to avoid code duplication, improve performance, solve threading issues, consolidate features and allow language embedding.
Description
We want to create Parsing API to:
- Unify registration of parsers
- Allow language embedding
- Allow file indexing
- Unify threading, starting/canceling parser tasks
- Avoid code duplication
- Simplify implementation of language supports
Current Status
Plugin | Go/No Go | Status |
---|---|---|
CSS | Done. | |
Groovy | Done, bugfixing. | |
GSP | Done, bugfixing. | |
HTML | Done, bugfixing. | |
Javascript | Done, bugfixing. | |
JSP | Done, bugfixing. | |
PHP | Done, bugfixing. | |
Python | In progress. | |
RHTML | Done, bugfixing. | |
Ruby | Done, bugfixing. | |
YAML | Done, bugfixing. | |
JavaFX | Done | |
Ada | Done, bugfixing. (contrib) | |
EJS | Not planned for 6.7 (contrib) | |
Erlang | Rewrite done (?) -- Status | |
Fortress | Not planned for 6.7 (contrib) | |
Scala | Done, bugfixing. (contrib) | |
Tcl/Tk | Not planned for 6.7 (contrib) |
Impacts
Architecture
API
We have experience with Retouche, GSF and Schliemann and we want to make an API, which will rise from our experience with those frameworks. The API is not intend to be revolutionary. It is evolutionary development.
The API will have several parts:
- Parsing
- Defines registration of parsers
- Defines threading
- Concept of Virtual Source (support for language embedding)
- No support for phases
- No ordering of parsers
- Indexing
- Provides scanning infrastructure
- Allows registration of Index providers
- RepositoryUpdater - listening on file and document changes
- "Generic ClassPath"
- Provides something like ClassPath to specify source roots (folders, archives)
- UserAction & Modification tasks
- Change represented by ModificationResult (in fact textual diff)
- Need source position translators for embedded languages
Documentation
API must be well documented. Developer documentation is a must.
Migrating GSF-based language plugins to Parsing & Indexing API
Testing
- Unit testing.
- Functional testing through language support modules.
Performance
- Well defined threading and starting/canceling parser tasks could improve performance of code completion and features in various Editors
- Startup scanning will be slower because of scanning and indexing not only Java, but possibly all files
Tasks
We have been tracking all tasks related to Parsing API in IssueZilla under Editor / Parsing & Indexing category. Please use the following query to see all unresolved issues sorted by their priority.