Java 类org.eclipse.xtext.parsetree.reconstr.impl.DefaultTransientValueService 实例源码

项目:xtext-core    文件:TransientContainerReferencesTest.java   
@Test public void testCrossResourceContainment() throws Exception {
    Element parent = CrossContainmentFactory.eINSTANCE.createElement();
    Element child = CrossContainmentFactory.eINSTANCE.createElement();
    parent.getContainment().add(child);
    Resource resource0 = new XMIResourceImpl(URI.createFileURI("test0.xmi"));
    resource0.getContents().add(parent);
    DefaultTransientValueService defaultTransientValueService = new DefaultTransientValueService();
    assertTrue(defaultTransientValueService.isTransient(child, CrossContainmentPackage.Literals.ELEMENT__CONTAINER, 0));
    Resource resource1 =new XMIResourceImpl(URI.createFileURI("test0.xmi"));
    resource1.getContents().add(child);
    assertEquals(parent, child.getContainer());
    assertFalse(defaultTransientValueService.isTransient(child, CrossContainmentPackage.Literals.ELEMENT__CONTAINER, 0));
}
项目:xtext-core    文件:DefaultRuntimeModule.java   
public Class<? extends ITransientValueService> bindITransientValueService() {
    return DefaultTransientValueService.class;
}