Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext support for multiple file extension
Xtext support for multiple file extension [message #1240952] Fri, 07 February 2014 09:06 Go to next message
Davide G is currently offline Davide GFriend
Messages: 31
Registered: October 2013
Member
Hi, i'm trying to add the support for multiple file extensions to my plugin. I modified GenerateMyDsl.mwe2 file in the xtext first project, like this:


var fileExtensions = "xml,ext1,ext2,ext3"


but when
doGenerate()
xtend method is called, and the plugin is there

for(m : resource.allContents.toIterable.filter( typeof(Model) ))
{
	for(element x : m.xmldoc)
		doSomething
}


it doesn't enter the loop with ext1,ext2 and ext3 file extension, while it works with xml, that is the starting plugin file extension. Any idea??
Re: Xtext support for multiple file extension [message #1240957 is a reply to message #1240952] Fri, 07 February 2014 09:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13644
Registered: July 2009
Senior Member
Hi did you make sure to merge (copy) plugin.XML_ gen to plugin.xml

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


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 support for multiple file extension [message #1241020 is a reply to message #1240957] Fri, 07 February 2014 11:01 Go to previous messageGo to next message
Davide G is currently offline Davide GFriend
Messages: 31
Registered: October 2013
Member
Christian Dietrich wrote on Fri, 07 February 2014 04:11
Hi did you make sure to merge (copy) plugin.XML_ gen to plugin.xml

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de



Yesss, it worked Smile

Thanks a lot Very Happy Very Happy Very Happy
Re: Xtext support for multiple file extension [message #1241189 is a reply to message #1240952] Fri, 07 February 2014 16:01 Go to previous message
Davide G is currently offline Davide GFriend
Messages: 31
Registered: October 2013
Member
Ok it worked but now my plugin's behaviour is strange: in my plugin, i use graphiti to create diagrams. Graphiti handles two files: the diagram file that is opened by the graphiti visual editor, and the persistent model file, where the information about the object in the diagrams are stored. For istance, if i create a class diagram with graphiti, the persistence model has these informations (for example):

<class name="class1"/>
<class name="class2"/>
<attribute class="class1" value="..."/>
...

this file is handled automatically by graphiti. Now, if i add the support to xtext to the persistence file extension, graphiti seems to be unable to edit automatically this file. I can't add anything to the visual editor and the persistent model file remains empty. This only happens with the models which i added the support to xtext. For other diagrams graphiti works well.
Any idea? Maybe a synchronization issue between graphiti and xtext...

[Updated on: Fri, 07 February 2014 16:54]

Report message to a moderator

Previous Topic:Using step filters when debugging DSL
Next Topic:Tutorial question: IQualifiedNameProvider needs explicit type
Goto Forum:
  


Current Time: Fri Oct 30 14:36:07 GMT 2020

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

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

Back to the top