Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Problems with formatting rules
Problems with formatting rules [message #872621] Wed, 16 May 2012 09:31 Go to next message
Eclipse UserFriend
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 09:31 Go to previous message
Eclipse UserFriend
Hi,

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

~Christian
Previous Topic:Spell checking for Strings
Next Topic:java.lang.OutOfMemoryError: PermGen space
Goto Forum:
  


Current Time: Tue Jul 08 17:31:26 EDT 2025

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

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

Back to the top