Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Formatting with range: Does this also apply to everything within that range?
Formatting with range: Does this also apply to everything within that range? [message #988476] Fri, 30 November 2012 06:48 Go to next message
Barrie Treloar is currently offline Barrie Treloar
Messages: 52
Registered: July 2009
Member
I'm trying to force everything between my PropertyRule and the EndAssignment (within that rule) to be on a single line.

I tried using .range() to do that but it is not working as I would expect.

Instead I am having to select each component of the rule and configure line wrapping accordingly, including things that start new blocks and indent like {} (via BeginAssignment/EndAssignment).

Is my guess undertsanding of range wrong?
And I need to do this the long way?

//        c.setNoLinewrap().range(grammar.getPropertyRule(), grammar.getPropertyAccess().getEndAssignment_5());

        c.setNoLinewrap().before(grammar.getPropertyAccess().getBeginAssignment_2());
        c.setNoLinewrap().after(grammar.getPropertyAccess().getBeginAssignment_2());
        c.setNoLinewrap().before(grammar.getEditRule());
        c.setNoLinewrap().after(grammar.getEditRule());
        c.setNoLinewrap().before(grammar.getPropertyAccess().getOptionsPropertyOptionParserRuleCall_4_0());
        c.setNoLinewrap().after(grammar.getPropertyAccess().getOptionsPropertyOptionParserRuleCall_4_0());
        c.setNoLinewrap().before(grammar.getDisplayAccess().getBeginAssignment_1());
        c.setNoLinewrap().after(grammar.getDisplayAccess().getBeginAssignment_1());
        c.setNoLinewrap().before(grammar.getDisplayAccess().getEndAssignment_6());
        c.setNoLinewrap().before(grammar.getPropertyAccess().getEndAssignment_5());
Re: Formatting with range: Does this also apply to everything within that range? [message #990738 is a reply to message #988476] Thu, 13 December 2012 23:33 Go to previous message
Barrie Treloar is currently offline Barrie Treloar
Messages: 52
Registered: July 2009
Member
+bump
Previous Topic:Hidden fields in the grammar?
Next Topic:Syntax Highlight of disconnected rules
Goto Forum:
  


Current Time: Tue Oct 21 05:43:58 GMT 2014

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

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