Examples of XmlResourceStore


Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        ( (TestModelElementA1) root.getList().insert( TestModelElementA1.TYPE ) ).setValue( "1111" );
        ( (TestModelElementA2) root.getList().insert( TestModelElementA2.TYPE ) ).setValue( "2222" );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test
   
    public void testDefaultBindingWrite1() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestRootElement model = TestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        model.resource().setCorruptedResourceExceptionInterceptor
        (
             new CorruptedResourceExceptionInterceptor()
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test
   
    public void testDefaultBindingWrite2() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final ITestRootElement model = ITestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        model.resource().setCorruptedResourceExceptionInterceptor
        (
             new CorruptedResourceExceptionInterceptor()
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( byteArrayResourceStore );
       
        final TestXmlBinding0003A a = TestXmlBinding0003A.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
        a.setAa( "aa" );
       
        final TestXmlBinding0003AB ab = a.getAb().content( true );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test
   
    public void testDefaultBindingRead1() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore( loadResourceAsStream( "TestData.txt" ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestRootElement model = TestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        assertEquals( "aaaa", model.getValuePropertyA().text() );
        assertEquals( "bbbb", model.getValuePropertyB().text() );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test

    public void testDefaultBindingRead2() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore( loadResourceAsStream( "TestData.txt" ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final ITestRootElement model = ITestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        assertEquals( "aaaa", model.getValuePropertyA().text() );
        assertEquals( "bbbb", model.getValuePropertyB().text() );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( byteArrayResourceStore );

        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
        final TestModelChild child = root.getChild();
       
        child.setAaa( "111" );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

{
    @Test
   
    public void test() throws Exception
    {
        final XmlResourceStore xmlResourceStore = new XmlResourceStore();
        final TestXmlBinding0002ModelElement element = TestXmlBinding0002ModelElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        try
        {
            element.getTestProperty().insert();
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

   
    public void testModelElementToDomDocument() throws Exception
    {
        final MasterConversionService service = Sapphire.service( MasterConversionService.class );
       
        final XmlResourceStore xmlResourceStore = new XmlResourceStore();
        final RootXmlResource xmlResource = new RootXmlResource( xmlResourceStore );
        final XmlConversionTestElement elementOnXml = XmlConversionTestElement.TYPE.instantiate( xmlResource );

        final Document document = service.convert( elementOnXml, Document.class );
       
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore

    public void testModelElementToDomElement() throws Exception
    {
        final MasterConversionService service = Sapphire.service( MasterConversionService.class );
       
        final XmlResourceStore xmlResourceStore = new XmlResourceStore();
        final RootXmlResource xmlResource = new RootXmlResource( xmlResourceStore );
        final XmlConversionTestElement elementOnXml = XmlConversionTestElement.TYPE.instantiate( xmlResource );
       
        xmlResource.save();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.