本文整理汇总了Java中org.eclipse.xtext.Constants.LANGUAGE_NAME属性的典型用法代码示例。如果您正苦于以下问题:Java Constants.LANGUAGE_NAME属性的具体用法?Java Constants.LANGUAGE_NAME怎么用?Java Constants.LANGUAGE_NAME使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.xtext.Constants
的用法示例。
在下文中一共展示了Constants.LANGUAGE_NAME属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ValidatorTester
@Inject
public ValidatorTester(T validator, EValidatorRegistrar registrar, @Named(Constants.LANGUAGE_NAME) final String languageName) {
this.validator = validator;
EValidator.Registry originalRegistry = registrar.getRegistry();
EValidatorRegistryImpl newRegistry = new EValidatorRegistryImpl();
registrar.setRegistry(newRegistry);
this.validator.register(registrar);
diagnostician = new Diagnostician(newRegistry) {
@Override
public java.util.Map<Object,Object> createDefaultContext() {
java.util.Map<Object,Object> map = super.createDefaultContext();
map.put(AbstractInjectableValidator.CURRENT_LANGUAGE_NAME, languageName);
return map;
}
};
registrar.setRegistry(originalRegistry);
validatorCalled = false;
}
示例2: AbstractValidPreferencePage
/**
* Instantiates a new valid preference page for a given Xtext language.
*
* @param languageName
* the language name
* @param fileExtensions
* the file extensions
*/
@Inject
public AbstractValidPreferencePage(@Named(Constants.LANGUAGE_NAME) final String languageName, @Named(Constants.FILE_EXTENSIONS) final String fileExtensions) {
super();
this.languageName = languageName;
this.fileExtensions = fileExtensions;
preferences = new ScopedPreferenceStore(InstanceScope.INSTANCE, getPreferenceStoreName());
setPreferenceStore(preferences);
}
示例3: ConfigurableTemplateStore
@SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
@Inject
public ConfigurableTemplateStore(final ContextTypeRegistry registry, final IPreferenceStore store, @Named(Constants.LANGUAGE_NAME) final String key, final AbstractUIPlugin plugin) {
super(registry, store, key + ".templates"); //$NON-NLS-1$
this.res = getTemplateFileURL(plugin);
this.preferenceStore = store;
this.key = key + ".sharedTemplates"; //$NON-NLS-1$
try {
load();
} catch (IOException e) {
LOG.error(e.getMessage(), e);
}
}
示例4: GrammarProvider
@Inject
public GrammarProvider(@Named(Constants.LANGUAGE_NAME) String languageName, Provider<XtextResourceSet> resourceSetProvider) {
this.languageName = languageName;
this.resourceSetProvider = resourceSetProvider;
}