Java 类org.eclipse.xtext.resource.impl.ChangedResourceDescriptionDelta 实例源码

项目:xtext-core    文件:StateBasedContainerTest.java   
@Override
@Test public void testBug352214() {
    container.getResourceDescriptions(); // initialize uri map
    ResourceDescriptionChangeEvent event = new ResourceDescriptionChangeEvent(Collections.<IResourceDescription.Delta>singletonList(
            new ChangedResourceDescriptionDelta(resourceDescription, null)));
    simulateEmpty = true;
    container.descriptionsChanged(event);
    assertEquals(0, container.getResourceDescriptionCount());
    assertTrue(Iterables.all(container.getResourceDescriptions(), Predicates.notNull()));
    assertFalse(container.hasResourceDescription(uri)); 
    assertNull(container.getResourceDescription(uri));
}
项目:bts    文件:DirtyStateEditorSupport.java   
protected ChangedResourceDescriptionDelta createDelta(IResourceDescription.Delta delta,
        IResourceDescription.Delta prev) {
    return new ChangedResourceDescriptionDelta(prev.getOld(), delta.getNew());
}