简体   繁体   中英

New Editor in Eclipse: Xtext vs. Plugin Development

I am trying to create a new editor plugin for Eclipse that I can distribute to others to help edit input files for a scientific computing program.

Features I would like in the program include:

  • Syntax Highlighting
  • Error Parsing
  • Content Assist

In general these files contain a set of related objects of the format:

ObjectType,
  Field 1,  !- Comment describing Field 1
  Field 2,  !- Comment describing Field 2
  ...
  Field N;  !- Comment describing Field N

! more
! comments

Where fields can be strings, numeric values or references to other objects depending on the object type.

Error parsing would check to make sure that each field is of the correct type, that referenced objects exist, and that each object ends in a semi-colon, etc. Content assist would provide a list of valid references for a field, provide defaults where available, etc.

Background

So far I've done a little bit of exploring in Xtext, and it seems to be able to handle most of what I'd like to do and much more, but I'm wondering if the Xtext plugin for our input file syntax would be distributed and used by other users.

I am looking for something that will be easy for users to install and use who are not already familiar with Eclipse and/or programming. Maybe there is an even better solution than Eclipse, but I would like it to be cross-platform and free (in both senses).

Question 1:

Do plugins created with Xtext require Xtext to generate the language artifacts on every machine that wants to use my editor and its features?

Question 2:

If so, what alternatives are there to create an editor with these features?

Regarding Question 1:

Do plugins created with Xtext require Xtext to generate the language artifacts on every machine that wants to use my editor and its features?

Nooooo. Simply put: You as a "toolsmith" forge the tool "Eclipse Editor Plugin". You deliver your tool to the users of the tool. You do NOT deliver the steps to reproduce the tool to the users.

Back to technical terms: You write the grammar, generates the Xtext artefacts, flesh out a few hooks and then you export the UI project as an Eclipse Plugin and/or as a "deployable feature". This will generate a few files (<10) which other users can install using the standard SW installation procedures of Eclipse.

Regarding Question 2:

If so, what alternatives are there to create an editor with these features?

Obsolete.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM