Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Change the "Xtext Task" in Task Browser
Change the "Xtext Task" in Task Browser [message #1731166] Tue, 03 May 2016 09:51 Go to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Hi,

In all the TODO , FIXME, XXX tasks, I found that the type column un the Task Browser is always "Xtext Task". I need to change it to be "MyLang Task" For example.

I tried to override the extension in the ui plugin.xml to be
<extension
id="org.eclipse.xtext.ui.task"
name="myLang Task"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.marker"/>
<super type="org.eclipse.core.resources.taskmarker"/>
<persistent value="true"/>
</extension>

but it didn't work out.

Any help?!
Re: Change the "Xtext Task" in Task Browser [message #1731172 is a reply to message #1731166] Tue, 03 May 2016 10:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
having marker subtypes and customizing TaskMarkerTypeProvider is not an option for you?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Change the "Xtext Task" in Task Browser [message #1731313 is a reply to message #1731172] Wed, 04 May 2016 09:02 Go to previous messageGo to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
I tried making a subtype for the marker in the ui:
<extension
id="org.eclipse.xtext.ui.Lang.task"
name="Lang Task"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.xtext.ui.task">
</super>
<persistent
value="true">
</persistent>
</extension>

and overriden TaskMarkerTypeProvider to be :
public static final String XTEXT_TASK_TYPE = "org.eclipse.xtext.ui.Lang.task";

@Override
public String getMarkerType(Task task) {
// TODO Auto-generated method stub
return XTEXT_TASK_TYPE;
}

and adding the binding in the UIModule to my TaskMarkerProvider. but now the whole feature is not working! What did I miss?
Re: Change the "Xtext Task" in Task Browser [message #1731315 is a reply to message #1731313] Wed, 04 May 2016 09:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the task marker id is qualfied with the bundle

public class MyDslTaskMarkerTypeProvider extends TaskMarkerTypeProvider{
	
	public static final String XTEXT_TASK_TYPE = "org.eclipse.xtext.ui.Lang.task";

	@Override
	public String getMarkerType(Task task) {
		return "org.xtext.example.mydsl.ui."+XTEXT_TASK_TYPE;
	}

}



//or unqulify in plugin.xml and use "org.xtext.example.mydsl.ui.<unqulified>"


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Change the "Xtext Task" in Task Browser [message #1731321 is a reply to message #1731315] Wed, 04 May 2016 09:26 Go to previous message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Thanks Alot Christian Smile Smile I appreciate your support so much
Previous Topic:Eclipse Plugin Install Error
Next Topic:Xtend error
Goto Forum:
  


Current Time: Sat Apr 20 02:22:12 GMT 2024

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

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

Back to the top