View on GitHub

Cnd-editor

JCR (JSR-283) Compact Namespace and Node Type Definition (CND) Editor

Download this project as a .zip file Download this project as a tar.gz file

cnd-editor

JCR (JSR-283) Compact Namespace and Node Type Definition (CND) Editor.

The editor is built as eclipse plugin and supports code completion, validation, navigation, basic refactoring, syntax highlighting, auto formatting, code templates, outline and code generation.

The editor is based on Xtext and can be used to build other DSL which need to reference CND. For example one can reuse CND grammar to build jcr content descriptor DSL. It can be also used for java code generation using xtend language (for example POJO classes generation based on node type definitions).

Visit users and developers discussion group if you have any questions or suggestions.

Installation

This is an eclipse plugin and requires eclipse 4.3 (Kepler).

You can use our eclipse update site http://dl.bintray.com/evra/eclipse.

Alternatively you can install the package manually from github:

Development

See project page how to start contributing to the project

Main features

Syntax highlighting, formatting, outline highlighting, formatting, outline

Navigation in CND file. You can follow any valid node type reference, for example parent node type or primary node. You can also lookup node type documentation defined as comments before node type definition. navigation

Content assist. CND editor provides you a list of possible references to node types which can be inserted as parent types, primary types etc. content-assist

Validation. The editor marks invalid (not existing) node type references. validation

Refactoring. You can change the node type name and all references will be updated automatically. refactoring

Linked resources. The editor automatically descovers all CND files in the referenced projects and in the java project classpath and adds find resources to project index. You can also add standard JSR283 node types provided as path variable for linked resources, alternatively you can add them in project properties dialog under Cnd category. linked-resources

Code templates. You can define your own CND code templates and apply them from the content assist popup. Some usefull templates are already provided by the editor plugin-in. templates