Xtext support for multiple file extension [message #1240952] |
Fri, 07 February 2014 09:06 |
Davide G Messages: 36 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 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 #1241189 is a reply to message #1240952] |
Fri, 07 February 2014 16:01 |
Davide G Messages: 36 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
|
|
|
Powered by
FUDForum. Page generated in 0.03254 seconds