Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext support to ProjectionDocument
Xtext support to ProjectionDocument [message #892336] Wed, 27 June 2012 19:01
Sergio Otero is currently offline Sergio OteroFriend
Messages: 37
Registered: June 2012
Member
Hi

I've been working for a week to build support to a legacy DSL, and it's really easy to do it thanks to Xtext !!

One thing that i don't know how to do is that i would like to add support to edit subfragments of a file and preserve syntax validation, code completion, etc.

I know that adding support to c-like preprocessor intructions (#include, #define) is very difficult, but i think that my case is easier.

For example (this is not the language):

class MyClass

// **--COMMON VARIABLES--**
var v1,v2,v3,v4;
// **--COMMON VARIABLES--**

main() {
  code();
  moreCode();

// **--COMMON ENDING--**
  doCommonStuff();
// **--COMMON ENDING--**
}


I would like a view with the "COMMON VARIABLES" and a view with "COMMON ENDING"
I know it doesn't make sense, but the original DSL uses some kind of templates and i need to add support to them ...

I've seen examples outside Xtext to add support to projections of the master documents using ProjectionDocument, but i dont' know if it could fit with xtext.

Any suggestions?

Thanks

Sergio
Previous Topic:resolving links in tests
Next Topic:Change sorting behavior of Quick Outline
Goto Forum:
  


Current Time: Sat Apr 04 09:54:42 GMT 2020

Powered by FUDForum. Page generated in 0.02130 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top