Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [xtext 1.0->2.0 migration] DefaultBracketMatcher missing - alternative?
[xtext 1.0->2.0 migration] DefaultBracketMatcher missing - alternative? [message #696754] Thu, 14 July 2011 19:03 Go to next message
Timotei D is currently offline Timotei DFriend
Messages: 89
Registered: March 2010
Member
Hi!

I'm in the process of migrating my xtext 1.0 project to xtext 2.0. Wow, there are so many changes Razz.

However, there are a some (many) things I see they are missing from the new xtext. I've read 2 times the migration guide, but couldn't find any answer. Maybe you could help me.

I've used before "DefaultBracketMatcher". But now it's not available. How can I re-implement the functionality? For example, I've used that, to highlight corresponding tag:

[tag]
..
[/tag]

So when clicking on , the [/tag] end would be highlighted.

Consequent with that the "IBracketPairAcceptor" doesn't exist either.

Timo
Re: [xtext 1.0->2.0 migration] DefaultBracketMatcher missing - alternative? [message #696763 is a reply to message #696754] Thu, 14 July 2011 19:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13614
Registered: July 2009
Senior Member
Hi,

i guess Xtext now uses Jfaces org.eclipse.jface.text.source.DefaultCharacterPairMatcher
but i don't know if this is easily adopable since you want to match string not characters.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [xtext 1.0->2.0 migration] DefaultBracketMatcher missing - alternative? [message #697118 is a reply to message #696763] Fri, 15 July 2011 15:06 Go to previous message
Timotei D is currently offline Timotei DFriend
Messages: 89
Registered: March 2010
Member
Christian,

You are right. According to commit: https://github.com/eclipse/xtext/commit/0208e87e49268f5fcce9a1a76d10be1cd7ff6d2d the jface thingy should be used.

Even though, if I am honest, my old "bracket" (wannabe tag) matching was a bit ugly, which broke encapsulation. That is, I used some magic, and set the node to have a special value based on how I color it. I guess I'll should ... rework that. Razz

Do you have any ideas how you would implement the highlighting of the matching tag? That is, the *whole* tag ([/tag] or [tag]) to be highlighted, not just a character. Even if it's a small idea maybe it will help me Smile

Thanks.,
Timo
Previous Topic:Beginner problem
Next Topic:Adding implicitly created objects to model
Goto Forum:
  


Current Time: Tue Sep 29 12:16:52 GMT 2020

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

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

Back to the top