Java Code Examples for org.eclipse.xtext.ui.XtextProjectHelper#NATURE_ID

The following examples show how to use org.eclipse.xtext.ui.XtextProjectHelper#NATURE_ID . 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: KickStartNewProjectAction.java    From solidity-ide with Eclipse Public License 1.0 5 votes vote down vote up
public void addNature(IProject project) {
	try {
		IProjectDescription description = project.getDescription();
		String[] natures = description.getNatureIds();
		String[] newNatures = new String[natures.length + 1];
		System.arraycopy(natures, 0, newNatures, 0, natures.length);
		newNatures[natures.length] = XtextProjectHelper.NATURE_ID;
		description.setNatureIds(newNatures);
		project.setDescription(description, null);
	} catch (CoreException e) {
		e.printStackTrace();
	}
}
 
Example 2
Source File: AbstractPluginProjectCreator.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected String[] getProjectNatures() {
	return new String[] {
		JavaCore.NATURE_ID,
		"org.eclipse.pde.PluginNature", //$NON-NLS-1$
		XtextProjectHelper.NATURE_ID
	};
}
 
Example 3
Source File: StatechartDiagramEditor.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
public void addNature(IProject project) {
	try {
		IProjectDescription description = project.getDescription();
		String[] natures = description.getNatureIds();
		String[] newNatures = new String[natures.length + 1];
		System.arraycopy(natures, 0, newNatures, 0, natures.length);
		newNatures[natures.length] = XtextProjectHelper.NATURE_ID;
		description.setNatureIds(newNatures);
		project.setDescription(description, null);
	} catch (CoreException e) {
		e.printStackTrace();
	}
}
 
Example 4
Source File: AbstractSarlUiTest.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Override
public String[] getNatures() {
	return new String[] {
			XtextProjectHelper.NATURE_ID,
			JavaCore.NATURE_ID,
			WorkbenchTestHelper.NATURE_ID
	};
}
 
Example 5
Source File: AbstractSarlMavenTest.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Override
public String[] getNatures() {
	return new String[] {
			XtextProjectHelper.NATURE_ID,
			JavaCore.NATURE_ID,
			WorkbenchTestHelper.NATURE_ID,
			SARLEclipseConfig.MAVEN_NATURE_ID
	};
}
 
Example 6
Source File: AbstractProjectCreator.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
protected String[] getProjectNatures() {
	return new String[] {
		XtextProjectHelper.NATURE_ID
	};
}