Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problems with formatting rules
Problems with formatting rules [message #872621] Wed, 16 May 2012 13:31 Go to next message
Alex Vette is currently offline Alex VetteFriend
Messages: 1
Registered: May 2012
Junior Member
Hi!

I have been starting with implementing an XText Plugin for a Script Language.

Some basic lines would look like:

on init
    declare $FOO
end on

function BAR
   <do stuff>
end function


I first wanted to have a look after the formatting possibilities of the editor because this language doesn't need and package structures, inheritances or even a compiler, basically editing purposes are needed...

I wanted to overwrite the "AbstractDeclarativeFormatter" for my own rules but I don't know how I can format the displayed function.

SCRIPTFILE:
	'on' 'init'
	    (declarations+=DECLARATIONS)*
	'end' 'on'
	
	('function' funcName+=ID
	    (assignments+=ASSIGNMENTS)*	  
	 'end' 'function')*
;


is my basic attempt to layout the grammar, by calling getSCRIPTFILEAccess() I can get the feature name of the function "BAR" but not the value which I could need to make an .after(pair.getSecond()) call.

Does anyone have any solution for me?

Thanks in advance,
A



Re: Problems with formatting rules [message #873086 is a reply to message #872621] Thu, 17 May 2012 13:31 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i did not understand what your actuall problem is. could you please elaborate a bit.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Spell checking for Strings
Next Topic:java.lang.OutOfMemoryError: PermGen space
Goto Forum:
  


Current Time: Thu Apr 25 11:08:05 GMT 2024

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

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

Back to the top