This proposal has been approved and the Eclipse TM4E - TextMate support in the Eclipse IDE project has been created.
Visit the project page for the latest information and development.

TM4E - TextMate support in Eclipse IDE

Wednesday, November 23, 2016 - 07:42 by Angelo ZERR
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope. We solicit additional participation and input from the community. Please login and add your feedback in the comments section.
Parent Project
Proposal State
Created
Background

TextMate grammars are a very popular format to process (tokenize) code files. They can be used in order to provide some basic edition features (such as checking conformance to grammar and report error, get some basic code completion according to grammar, but there are mostly known for being a very powerful way to implement syntax highlighting on code files.

TextMate grammars already exists for almost all programming languages, and many tools simply reuse them to provide very rich syntax highlighting.

Scope

The scope of the Eclipse TM4E project is to provide a TextMate grammar processor as a Java API, and to leverage this API in the Eclipse IDE to provide syntax highlighting in Eclipse IDE editors simply by referencing a TextMate grammar.

The project distributes a  “gallery” of TextMate grammars as plugins available for easy installation and consumption into Eclipse IDE.

The project doesn’t aim at hosting directly the development of TextMate grammars. Those TextMate grammars are so far considered to be external artifacts, that the project might repackage.

Description

The project includes the necessary code to easily set up syntax highlighting for a wide diversity of languages in the Eclipse IDE, but reusing TextMate grammars.

The default integration is to provide features into the Platform's Generic and Extensible editor, but some code may be used as API to let integration be done with other Eclipse-based editors.

A piece of the project would be a plain Java (non Eclipse IDE specific) API to easily manipulate TextMate grammars. This API will be used by the Eclipse IDE integration, but might be useful in some other plain Java use-cases. Hence, although it’s not the main goal, some care will be taken in order to keep this part independent of Eclipse IDE and working in a Java environment.

Why Here?

This project targets mostly the Eclipse IDE. It is likely to provide a lot of value to easily add support for new languages into the Eclipse IDE. The Eclipse IDE -extenders and users- can take a big advantage of such integration.

On the other hand, the project would benefit from being inside the Eclipse.org community by attracting more experienced Eclipse developers who're already contributing to some related projects.

Future Work

The following possible areas of work are identified:

  • Continuous optimization: As the syntax highlighting is a recurring operations and as user expect very fast reactivity, optimization of the code will be a continuous concern and effort for the project
  • Registry of grammars: both extenders and users need to be offered a way to register a new TextMate grammar in the Eclipse IDE to immediately take advantage of it. This will require addition of some extension points and preferences.
Project Scheduling

To bootstrap good practices, the project will attempt a first incubation release as soon as it is provisioned at Eclipse.org and the CQs for the dependencies are approved.

Then the target is to have multiple incubation releases, about once a month if there have been changes, to include improvements, bugfixes and new features.

Then, if some other Eclipse IDE projects need it and if the quality is sufficient, the Eclipse TextMate project would be released as 1.0.0 as part of the Oxygen release train. If no other project do require a release of Eclipse TextMate, the development will continue as incubating, until some other project states graduating to 1.0.0 would be helpful.

Project Leads
Committers
Angelo ZERR
Mentors
Interested Parties

Corporate

  • Red Hat Inc.

Individuals:

  •  

Related projects:

  • Eclipse Platform Text, providing the (generic) editor framework

  • Eclipse LSP4E, providing other features for code editon, both projects are complementary

  • Typescript.java (on GitHub) will take advantage of the current integration to provide good syntax highlighting for TypeScript files in Eclipse IDE. See https://github.com/angelozerr/typescript.java/issues/114
Initial Contribution

The initial contrbution is a functional code, currently stored on GitHub, with active contributors: https://github.com/angelozerr/textmate.java/ . The code provides the necessary code to parse TextMate grammars and themes and to use them in order to provide code coloration in the Eclipse Generic Editor.

The copyright mostly belongs to Angelo Zerr., contributions that were made by non-Red Hat contributors were done on files that show the Copyright and license headers, without any concern from contributors. So it's assumed that all contributors have contributed approving the EPL license.

The namespace/package of the project would be org.eclipse.tm4e.

Source Repository Type