Java Code Examples for org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil#removeNature()
The following examples show how to use
org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil#removeNature() .
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: JavaProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testGetContainerHandle_02() throws CoreException { IResourcesSetupUtil.removeNature(project1, XtextProjectHelper.NATURE_ID); IResourcesSetupUtil.removeNature(project2, XtextProjectHelper.NATURE_ID); String uri1ContainerHandle = projectsState.getContainerHandle(uri1); String uri2ContainerHandle = projectsState.getContainerHandle(uri2); String uri3ContainerHandle = projectsState.getContainerHandle(uri3); assertEquals(srcRoot.getHandleIdentifier(), uri1ContainerHandle); assertEquals(srcRoot.getHandleIdentifier(), uri2ContainerHandle); assertEquals(project2.getName(), uri3ContainerHandle); }
Example 2
Source File: JavaProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testGetContainerHandle_Bug316519_04() throws CoreException { IFile file = getFile(project1, "doesNotExist"); IResourcesSetupUtil.removeNature(file.getProject(), XtextProjectHelper.NATURE_ID); URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); String handleIdent = projectsState.getContainerHandle(uri); assertEquals(project1.getName(), handleIdent); }
Example 3
Source File: JavaProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testRemoveNature_02() throws CoreException { Collection<URI> containedURIs = projectsState.getContainedURIs(project1.getName()); assertEquals(4, containedURIs.size()); IResourcesSetupUtil.removeNature(project1, XtextProjectHelper.NATURE_ID); containedURIs = projectsState.getContainedURIs(project1.getName()); assertTrue(containedURIs.isEmpty()); }
Example 4
Source File: AbstractJavaProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override @Test public void testRemoveNature() throws CoreException { Collection<URI> containedURIs = projectsState.getContainedURIs(srcRoot.getHandleIdentifier()); assertEquals(2, containedURIs.size()); IResourcesSetupUtil.removeNature(javaProject1.getProject(), XtextProjectHelper.NATURE_ID); containedURIs = projectsState.getContainedURIs(srcRoot.getHandleIdentifier()); assertTrue(containedURIs.isEmpty()); }
Example 5
Source File: AbstractJavaProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testGetContainerHandle_Bug316519_02() throws CoreException { IFile file = getFile(project1, "src/doesNotExist"); IResourcesSetupUtil.removeNature(file.getProject(), XtextProjectHelper.NATURE_ID); URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); String handleIdent = projectsState.getContainerHandle(uri); assertEquals(srcRoot.getHandleIdentifier(), handleIdent); }
Example 6
Source File: StrictJavaProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testGetContainerHandle_02() throws CoreException { IResourcesSetupUtil.removeNature(project1, XtextProjectHelper.NATURE_ID); IResourcesSetupUtil.removeNature(project2, XtextProjectHelper.NATURE_ID); String uri1ContainerHandle = projectsState.getContainerHandle(uri1); String uri2ContainerHandle = projectsState.getContainerHandle(uri2); String uri3ContainerHandle = projectsState.getContainerHandle(uri3); assertEquals(srcRoot.getHandleIdentifier(), uri1ContainerHandle); assertEquals(srcRoot.getHandleIdentifier(), uri2ContainerHandle); assertNull(uri3ContainerHandle); }
Example 7
Source File: WorkspaceProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testGetContainerHandle_02() throws CoreException { IResourcesSetupUtil.removeNature(project1, XtextProjectHelper.NATURE_ID); IResourcesSetupUtil.removeNature(project2, XtextProjectHelper.NATURE_ID); String uri1ContainerHandle = projectsState.getContainerHandle(uri1); String uri2ContainerHandle = projectsState.getContainerHandle(uri2); String uri3ContainerHandle = projectsState.getContainerHandle(uri3); assertEquals(project1.getName(), uri1ContainerHandle); assertEquals(project1.getName(), uri2ContainerHandle); assertEquals(project2.getName(), uri3ContainerHandle); }
Example 8
Source File: WorkspaceProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Test public void testGetContainerHandle_Bug316519_04() throws CoreException { IFile file = getFile(project1, "doesNotExist"); IResourcesSetupUtil.removeNature(file.getProject(), XtextProjectHelper.NATURE_ID); URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); String handleIdent = projectsState.getContainerHandle(uri); assertEquals(project1.getName(), handleIdent); }
Example 9
Source File: WorkspaceProjectsStateTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override @Test public void testRemoveNature() throws CoreException { Collection<URI> containedURIs = projectsState.getContainedURIs(project1.getName()); assertEquals(2, containedURIs.size()); IResourcesSetupUtil.removeNature(project1, XtextProjectHelper.NATURE_ID); containedURIs = projectsState.getContainedURIs(project1.getName()); assertTrue(containedURIs.isEmpty()); }