當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。