How to avoid space after separator in cell list

Hi,

-- Sorry for cross posting, put I first posted this in the JetBrains Forum –

I like to model XPath path expressions. A path expression has the following BNF:

PathExpr ::= Step ('/' Step)*

I use a CellModel_RefNodeList in the editor for PathExpr which looks like this:

(- % step % /empty cell: <default> -)

I added the char '/' to the separator property of the CellModel_RefNodeList.

The resulting XPath expressions look like this in the editor:

labels/ name

The space after the '/' is what I like to avoid.

The code of the project where I have the XPath expressions in available at GitHub:

https://github.com/alexanderkiel/RestApiTest

Thanks
Alex
8 comments
Comment actions Permalink
To remove the extra-space after separator you have to add separator-style property and specify "punctuation-right : true" there like:

list element:
seprator /
separator constraint none
separator style <no parentClass> { punctuation-right:true }
0
Comment actions Permalink
Thanks Alex.

I tried that already but it doesn't work for me in MPS 2.0 M5. If you like to have a look, you can find the addition of punctuation-right in the following commit:

https://github.com/alexanderkiel/RestApiTest/commit/224a0d1

It's in the XPath language and there in the PathExpr.

Should I file an issue?
0
Comment actions Permalink
That's really strange - I downloaded latest sources, made XPath rootable, regenerated editor and got it working:
SeparatorStyle.png
0
Comment actions Permalink
I had problems with punctuation in M5, too. I could not edit the cell when it had punctuation set. Perhaps this got fixed...
0
Comment actions Permalink
Can you file a request for it so I'll be able to check your project with latest MPS sources. There can be a chance we simply don't have such an editor in MPS, so we don't see this problem...
0
Comment actions Permalink
Hi Alex,

I did the same and it doesn't work for me:

Space_after_separator_1.png


I have MPS 2.0 M5 #72.7347 running. The OS is Ubuntu 9.10. Java is Sun JDK 1.6.0_24.

Did you use M5?
0
Comment actions Permalink
Hi!

No, I used latest sources of MPS from git repository... I double-checked git history and found recent commit most probably fixing this problem:

commit f0f31dd0d966eba57c051378886a6c89eee55df7
Author: Alexander Shatalin <Alexander.Shatalin@jetbrains.com>
Date:   Wed Jun 1 12:25:52 2011 +0200

    Correcting editor generator: separator style should be used for separators (not general style from the surrounding collection)

So, this problem will be corrected in an upcoming M6 (hopefully in the end of this week).
0
Comment actions Permalink
Hi Alex,

ok thanks. I will wait for the M6.
0

Please sign in to leave a comment.