当前位置: 首页>>代码示例>>Java>>正文


Java Constants.LANGUAGE_NAME属性代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:18,代码来源:ValidatorTester.java

示例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);
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:17,代码来源:AbstractValidPreferencePage.java

示例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);
  }
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:13,代码来源:ConfigurableTemplateStore.java

示例4: GrammarProvider

@Inject
public GrammarProvider(@Named(Constants.LANGUAGE_NAME) String languageName, Provider<XtextResourceSet> resourceSetProvider) {
	this.languageName = languageName;
	this.resourceSetProvider = resourceSetProvider;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:GrammarProvider.java


注:本文中的org.eclipse.xtext.Constants.LANGUAGE_NAME属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。