ParsingAPI

Contents


Quick Links to Turorials and Docs

How_to_create_support_for_a_new_language

Netbeans_Rcp_Antlr_Integration_Index

Official Doc (JavaDoc)

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 Not migrated.
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:

  1. Parsing
  • Defines registration of parsers
  • Defines threading
  • Concept of Virtual Source (support for language embedding)
  • No support for phases
  • No ordering of parsers
  1. Indexing
  • Provides scanning infrastructure
  • Allows registration of Index providers
  • RepositoryUpdater - listening on file and document changes
  1. "Generic ClassPath"
  • Provides something like ClassPath to specify source roots (folders, archives)
  1. 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.

Bugs

Additional information

Not logged in. Log in, Register

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