Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error running workflow : Couldn't find extension
Error running workflow : Couldn't find extension [message #1018575] Thu, 14 March 2013 05:22 Go to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
Hi, i have a code generator workflow, but when trying to generate the code i am getting the following error :
4468 [main] ERROR org.eclipse.xtend.XtendComponent - Error in Component normalize of type org.eclipse.xtend.XtendComponent:
EvaluationException : Couldn't find extension 'normalize(List)'!
nofile[0,16] on line 1 'normalize(model)'

- [ERROR]: Couldn't find extension 'normalize(List)'!(Element: normalize(model);

My Workflow looks like :


<component class="com.a.b.FilePathBasedReader" uri="${modelFile}">
<register class="XXXXXXX.MyStandaloneSetup"/>
<load slot="model" type="Model"/>
</component>


<component class="org.eclipse.xtend.XtendComponent" id="normalize">

<metaModel id="emfRegistryMM" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<invoke value="x::x::x::x::x::Normalizer::normalize(model)"/>
<outputSlot value="model"/>
</component>

The extend file looks like

normalize(x::Model this) :
{this}.addAll(getImportedModels()).normalizeModels()-> this
;
Re: Error running workflow : Couldn't find extension [message #1018604 is a reply to message #1018575] Thu, 14 March 2013 07:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13357
Registered: July 2009
Senior Member
Hi the error message should be clear. The extension is defined for
model but you call it with a list

--
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/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error running workflow : Couldn't find extension [message #1018610 is a reply to message #1018604] Thu, 14 March 2013 07:29 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
No afaik i am passing Model and that is not a list
Re: Error running workflow : Couldn't find extension [message #1018614 is a reply to message #1018610] Thu, 14 March 2013 07:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13357
Registered: July 2009
Senior Member
I don't know your reader. So I cannot help at this point. So what
about defining the extension for List[x::Model] too and see what
happens

--
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/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error running workflow : Couldn't find extension [message #1018635 is a reply to message #1018614] Thu, 14 March 2013 08:39 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
My Reader is like this

public class FilePathBasedReader extends UriBasedReader {

private List<String> paths = new ArrayList<String>();

@Override
public void addUri(String path) {
paths.clear();
paths.add(path);

};


@Override
protected void checkConfigurationInternal(Issues issues) {

for (String path : paths) {
try {
File fl = new File(path);
if (fl.isFile()) {
String uri;
uri = URI.createFileURI(
fl.getAbsoluteFile().getCanonicalPath()).toString();
super.addUri(uri);
}
} catch (Exception e) {
issues.addError(e.getMessage(), e);
return;
}
}
super.checkConfigurationInternal(issues);
}
Re: Error running workflow : Couldn't find extension [message #1018641 is a reply to message #1018635] Thu, 14 March 2013 08:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13357
Registered: July 2009
Senior Member
did you try a list or not it will cost you 30 seconds to do it

--
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/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error running workflow : Couldn't find extension [message #1018655 is a reply to message #1018641] Thu, 14 March 2013 09:06 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
Ya i tried with that..and it seems to be working with that.
The actaul problem is that i am migrating from xtext 1 to xtext 2.3. Earlier the ext file was working fine that means earlier it was only Model and not list. Then how come it has changed to list now?
My reader was earlier extending mwereader and now it is extending Urireader. Does that has an effect?
Re: Error running workflow : Couldn't find extension [message #1018657 is a reply to message #1018641] Thu, 14 March 2013 09:08 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
Ya i tried with that..and it seems to be working with that.
The actaul problem is that i am migrating from xtext 1 to xtext 2.3. Earlier the ext file was working fine that means earlier it was only Model and not list. Then how come it has changed to list now?
My reader was earlier extending mwereader and now it is extending Urireader. Does that has an effect?
Re: Error running workflow : Couldn't find extension [message #1018683 is a reply to message #1018655] Thu, 14 March 2013 10:02 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13357
Registered: July 2009
Senior Member
Hi the behaviour of the new reader is different

--
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/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Referring to existing Java methods using Xbase
Next Topic:How obtain EMF element of certain type up in the AST
Goto Forum:
  


Current Time: Wed Feb 19 19:20:22 GMT 2020

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

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

Back to the top