Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Default structure for new dsl file
Default structure for new dsl file [message #1413105] Wed, 27 August 2014 20:16 Go to next message
Daniele P. is currently offline Daniele P.Friend
Messages: 18
Registered: August 2014
Junior Member
Hi, i would like to know if it's possible to define a default content for a new file of a specific dsl.
At the moment, with a defined grammar, after having launched "Run As -> Eclipse application", when i create a new Java Project with a new file of the dsl (for example test.dmodel), is it possible to insert into this blank sheet some content (for example the main method)?
In detail with a new file, i would like to have the following default content:

[color=crimson]import[/color] java.util.List

[color=crimson]function[/color] main : void
{

}


Thank you, bye
Re: Default structure for new dsl file [message #1413422 is a reply to message #1413105] Thu, 28 August 2014 13:23 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13264
Registered: July 2009
Senior Member
Hi you consider custom new file wizard?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Getting an IXtextDocument without open editor
Next Topic:JVM Crash with Cross-References
Goto Forum:
  


Current Time: Sat Dec 07 18:40:47 GMT 2019

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

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

Back to the top