Java Code Examples for org.eclipse.xtext.Constants#FILE_EXTENSIONS

The following examples show how to use org.eclipse.xtext.Constants#FILE_EXTENSIONS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileExtensionProvider.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@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);
	}
}
 
Example 2
Source File: AbstractValidPreferencePage.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 3
Source File: AbstractXbaseContentAssistTest.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
protected void setExtensions(@Named(Constants.FILE_EXTENSIONS) String extensions) {
	this.fileExtension = extensions.split(",")[0];
}
 
Example 4
Source File: AbstractXbaseUITestCase.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
protected void setExtensions(@Named(Constants.FILE_EXTENSIONS) String extensions) {
	this.fileExtension = extensions.split(",")[0];
}
 
Example 5
Source File: AbstractXbaseContentAssistTest.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
protected void setExtensions(@Named(Constants.FILE_EXTENSIONS) String extensions) {
	this.fileExtension = extensions.split(",")[0];
}
 
Example 6
Source File: AbstractXbaseContentAssistTest.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
protected void setExtensions(@Named(Constants.FILE_EXTENSIONS) String extensions) {
	this.fileExtension = extensions.split(",")[0];
}
 
Example 7
Source File: XtextLinkingService.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
public void setFileExtension(@Named(Constants.FILE_EXTENSIONS) String fileExtension) {
	this.fileExtension = fileExtension.split(",")[0];
}
 
Example 8
Source File: SARLElementImageProvider.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Set the file extensions.
 *
 * @param fileExtensions the file extensions.
 */
@Inject
public void setFileExtensions(@Named(Constants.FILE_EXTENSIONS) String fileExtensions) {
	this.fileExtensions.clear();
	this.fileExtensions.addAll(Arrays.asList(fileExtensions.split("[,;: ]+"))); //$NON-NLS-1$
}
 
Example 9
Source File: AbstractNewSarlElementWizardPage.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Change the file extension used by this page.
 *
 * @param fileExtension the file extension
 */
@Inject
public void setFileExtension(@Named(Constants.FILE_EXTENSIONS) String fileExtension) {
	this.sarlFileExtension = fileExtension;
}
 
Example 10
Source File: NewSarlFileWizard.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Constructor.
 * @param fileExtension the extension of the file.
 */
@Inject
public NewSarlFileWizard(@Named(Constants.FILE_EXTENSIONS) String fileExtension) {
	this.fileExtension = fileExtension;
}
 
Example 11
Source File: SARLFileRenameParticipant.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Construct the participant.
 *
 * @param fileExtension the file extension.
 */
@Inject
public SARLFileRenameParticipant(@Named(Constants.FILE_EXTENSIONS) String fileExtension) {
	this.fileExtension = fileExtension;
}
 
Example 12
Source File: SARLJdtPackageRenameParticipant.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Construct the participant.
 *
 * @param fileExtension the file extension.
 */
@Inject
public SARLJdtPackageRenameParticipant(@Named(Constants.FILE_EXTENSIONS) String fileExtension) {
	this.fileExtension = fileExtension;
}
 
Example 13
Source File: CodeBuilderFactory.java    From sarl with Apache License 2.0 4 votes vote down vote up
@Inject
public void setFileExtensions(@Named(Constants.FILE_EXTENSIONS) String fileExtensions) {
	this.fileExtension = fileExtensions.split("[:;,]+")[0];
}
 
Example 14
Source File: AbstractBuilder.java    From sarl with Apache License 2.0 4 votes vote down vote up
@Inject
public void setFileExtensions(@Named(Constants.FILE_EXTENSIONS) String fileExtensions) {
	this.fileExtension = fileExtensions.split("[:;,]+")[0];
}
 
Example 15
Source File: AbstractCachingResourceDescriptionManager.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * 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$
}