Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Creating Custom Task Tags
Creating Custom Task Tags [message #1809215] Thu, 11 July 2019 17:31 Go to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 124
Registered: May 2012
Senior Member
Should it be a mystery to me why I can't create custom task tags and have my Xtext editor recognize them?

Xtext 2.12 Neon

Is there something I have to enable in the MWE2 workflow to get this enabled or get it added to my DSL preferences?

It seems simple, so I'm confused that I'm confused about it.
Re: Creating Custom Task Tags [message #1809217 is a reply to message #1809215] Thu, 11 July 2019 17:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
is ths about the preference page what the fragment is for or about the tags themselves? which is done via DefaultTaskTagProvider / PreferenceTaskTagProvider which can be customized using normal bindings

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 11 July 2019 17:54]

Report message to a moderator

Re: Creating Custom Task Tags [message #1809298 is a reply to message #1809217] Fri, 12 July 2019 19:02 Go to previous messageGo to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 124
Registered: May 2012
Senior Member
Christian Dietrich wrote on Thu, 11 July 2019 13:54
is ths about the preference page what the fragment is for or about the tags themselves?


I'm using Neon 4.6.3 and Xtext 2.12 and I don't get any Task Tags preferences pages for my DSL by default. Is there a way to add the preference page in Xtext 2.12?

In general, I'm not having any luck adding task tags and getting them to be detected in my DSL files. Perhaps it's only because xtext is searching for its default set. I've tried to add task tags in the Structural Text Editor preferences, but that's not working.

Quote:

which is done via DefaultTaskTagProvider / PreferenceTaskTagProvider which can be customized using normal bindings


Cool, I've never seen those and can't find them in the docs. Is there a standard way to override them or a blog example somewhere for how to do the bindings/overrides?

I'm not getting any search hits doing a File Search in my workspace for TagProvider - i.e. searching for an existing stub where the binding should occur.

[Updated on: Fri, 12 July 2019 19:02]

Report message to a moderator

Re: Creating Custom Task Tags [message #1809299 is a reply to message #1809298] Fri, 12 July 2019 19:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
As is aid. You can add the fragment and merge plugin.xml_gen to plugin.xml
There is no example maybe a search on GitHub results in something
I doubt you can add simply a binding to the class to the runtime respectively zu module


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Creating Custom Task Tags [message #1809301 is a reply to message #1809299] Fri, 12 July 2019 19:34 Go to previous messageGo to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 124
Registered: May 2012
Senior Member
Christian Dietrich wrote on Fri, 12 July 2019 15:08
As is aid. You can add the fragment and merge plugin.xml_gen to plugin.xml


Okay, I'll try that. Thank you. What fragment do I add in the generator?
Re: Creating Custom Task Tags [message #1809302 is a reply to message #1809301] Fri, 12 July 2019 19:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
TaskTagPreferencePageFragment2

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Creating Custom Task Tags [message #1809307 is a reply to message #1809302] Fri, 12 July 2019 22:20 Go to previous messageGo to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 124
Registered: May 2012
Senior Member
Okay, thanks again. I don't think that class exists in Xtext 2.12. I can't find it with Open Type, File Search, and the MWE2 generator can't find it. I've manually looked through org.eclipse.xtext.xtext.generator packages tried to import org.eclipse.xtext.xtext.generator.ui.* into the MWE2 generator.

Github makes it look like it was there since 2.6. But I can't figure out what qualifier to put in front of it.

fragment = <mystery>..TaskTagPreferencePageFragment2 {}

I might just have to use #FIXME like everyone else. :-)
Re: Creating Custom Task Tags [message #1809313 is a reply to message #1809307] Sat, 13 July 2019 05:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
Which workflow do you use?
The javadoc says it is there since 2.6
Simply use the full qualified name
Also me sure that the plug-in that contains it is on the classpath


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Creating Custom Task Tags [message #1809315 is a reply to message #1809313] Sat, 13 July 2019 05:09 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
PS you can have at the fragment source code and do what it does manually
Or you execute it with 2 18 and copy the generated. Stuff over


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:The feature ..... contains an unresolved proxy
Next Topic:Xtext grammar autocompletion
Goto Forum:
  


Current Time: Thu Aug 22 18:31:27 GMT 2019

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

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

Back to the top