Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Rich text styling in a Xtext-generated editor
Rich text styling in a Xtext-generated editor [message #51351] Sun, 14 June 2009 19:57 Go to next message
Lauri Svan is currently offline Lauri SvanFriend
Messages: 1
Registered: July 2009
Junior Member
Hi,

I am building a structured text editor, but with similar formatting
capabilities as wikitext permits. The formatting can be implied from the
grammar (e.g. no need to mix two languages), but it needs to be displayed
in a rich fashion (syntax highlighting won't do). I also need bind to
other EMF models, hence I am investigating whether to use Xtext. I know
the domain is somewhat apart from Xtext (e.g. Mylyn Wikitext might be
closer), but I would still like to hear your opinion & tips.

I know StyledText component can display rich text display, such as
bulleted lists, different fonts etc. Is this possible with Xtext-derived
editors?

Furthermore, I would like to hide some tokens from display. I have
understood that it could not be done by projection document (as I were
able to hide full lines only, not a few words) - do you have any solution
for this in Xtext (e.g. exclude some tokens from the viewer)?

Thanks in advance,
Lauri
Re: Rich text styling in a Xtext-generated editor [message #51613 is a reply to message #51351] Mon, 15 June 2009 22:19 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
You can use different fonts in Xtext, but I don't know how to do bullet
lists. Also the standard Xtext editor displays the chars of the
resource, not a textual projection of an in-memory model.
However, as Xtext supports bi-directional mapping between text and model
(hence we have a parser as well as a serializer) it should be possible
to do this. Don't know how good it would "feel" in the end.

Sven

Lauri Svan schrieb:
> Hi,
>
> I am building a structured text editor, but with similar formatting
> capabilities as wikitext permits. The formatting can be implied from the
> grammar (e.g. no need to mix two languages), but it needs to be
> displayed in a rich fashion (syntax highlighting won't do). I also need
> bind to other EMF models, hence I am investigating whether to use Xtext.
> I know the domain is somewhat apart from Xtext (e.g. Mylyn Wikitext
> might be closer), but I would still like to hear your opinion & tips.
>
> I know StyledText component can display rich text display, such as
> bulleted lists, different fonts etc. Is this possible with Xtext-derived
> editors?
> Furthermore, I would like to hide some tokens from display. I have
> understood that it could not be done by projection document (as I were
> able to hide full lines only, not a few words) - do you have any
> solution for this in Xtext (e.g. exclude some tokens from the viewer)?
>
> Thanks in advance,
> Lauri
>
Previous Topic:Workflow Problem
Next Topic:Importing a grammar which inturn has imported a Metamodel
Goto Forum:
  


Current Time: Sun Oct 06 12:30:00 GMT 2024

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

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

Back to the top