Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AM3 » [AM3] [ATL] [TCS] "atl" language absent in LanguageRegistry
[AM3] [ATL] [TCS] "atl" language absent in LanguageRegistry [message #374306] Tue, 10 March 2009 14:13
Skander TURKI is currently offline Skander TURKIFriend
Messages: 130
Registered: July 2009
Senior Member
Hi,
It is about the InjectAction class of the package
org.eclipse.gmt.tcs.actions
I tried to execute the code of the run method independently from the
plugin to inject an atl file into an atl model programmatically :

public void inject(){
//public void run(IAction action) {
IFile file = getSelectedElement();
Language language = LanguageRegistry.getDefault().getLanguage("atl"); //
only "tcs" or "KM3" can be selected, putting "atl" returns null!!
AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
Map params = new HashMap();
ASMModel model = (ASMModel)language.inject(ASMModelFactory.getDefault(),
null, new IFileTextSource(file), params);
amh.saveModel(model, file.getProjectRelativePath().toString() + ".xmi",
file.getProject());
// }
}

The problem is that LaunguageRegistry.getDefault() returns two langages
"KM3" or "tcs", i tried with "tcs" but this generates erros and generates
an ampty tcs model, so normally i should find a third language in the
result of LanguageRegistry.getDefault() that must be (atl) to do the
injection with this code.

Do anybody have an idea?
thanks
Previous Topic:[AM3] Is there any doc on AM3?
Next Topic:[AM3] [ATL] [TCS] "atl" language absent in LanguageRegistry
Goto Forum:
  


Current Time: Sun Sep 23 07:12:54 GMT 2018

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

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

Back to the top