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 #563791] Tue, 10 March 2009 14:13
Skander TURKI is currently offline Skander TURKIFriend
Messages: 130
Registered: July 2009
Senior Member
It is about the InjectAction class of the package
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",
// }

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?
Previous Topic:[AM3] [ATL] [TCS] "atl" language absent in LanguageRegistry
Next Topic:[AM3] Is there any doc on AM3?
Goto Forum:

Current Time: Mon Oct 18 18:20:30 GMT 2021

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

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

Back to the top