本文整理匯總了Java中org.eclipse.xtext.Constants.FILE_EXTENSIONS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Constants.FILE_EXTENSIONS屬性的具體用法?Java Constants.FILE_EXTENSIONS怎麽用?Java Constants.FILE_EXTENSIONS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.xtext.Constants
的用法示例。
在下文中一共展示了Constants.FILE_EXTENSIONS屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setExtensions
@Inject
protected void setExtensions(@Named(Constants.FILE_EXTENSIONS)String extensions) {
String[] split = extensions.split(",");
this.fileExtensions = Sets.newLinkedHashSet();
for (String string : split) {
this.fileExtensions.add(string);
}
}
示例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: setFileExtension
@Inject
public void setFileExtension(@Named(Constants.FILE_EXTENSIONS) String fileExtension) {
this.fileExtension = fileExtension.split(",")[0];
}
示例4: setFileExtensions
/**
* Set the file extensions of our own language.
*
* @param fileExtensions
* The file extensions
*/
@Inject
public void setFileExtensions(@Named(Constants.FILE_EXTENSIONS) final String fileExtensions) {
this.fileExtensions = ImmutableSet.copyOf(Arrays.asList(fileExtensions.split(","))); //$NON-NLS-1$
}