use of org.talend.designer.mapper.language.java.JavaLanguage in project tdi-studio-se by Talend.
the class LanguageProvider method getCurrentLanguage.
public static ILanguage getCurrentLanguage() {
ECodeLanguage codeLanguage = null;
if (!MapperMain.isStandAloneMode()) {
RepositoryContext repositoryContext = (RepositoryContext) CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
codeLanguage = repositoryContext.getProject().getLanguage();
} else {
codeLanguage = ECodeLanguage.PERL;
}
switch(codeLanguage) {
case JAVA:
if (!(language instanceof JavaLanguage) || LanguageProvider.language == null) {
LanguageProvider.language = getJavaLanguage();
}
break;
default:
if (!(language instanceof PerlLanguage) || LanguageProvider.language == null) {
LanguageProvider.language = getPerlLanguage();
}
}
return LanguageProvider.language;
}
Aggregations