本文整理匯總了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;
}