Package org.eclipse.sapphire.modeling.xml

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


   
    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" );
       
        ( (TestModelElementB2) root.getElement().content( true, TestModelElementB2.TYPE ) ).setValue( "3333" );
View Full Code Here


   
    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" );
       
        ( (TestModelElementB2) root.getElement().content( true, TestModelElementB2.TYPE ) ).setValue( "3333" );
View Full Code Here

        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore(
                loadResourceAsStream("initial.txt"));
        final XmlResourceStore xmlResourceStore = new XmlResourceStore(
                byteArrayResourceStore);

        final TestModelRoot root = TestModelRoot.TYPE.instantiate(new RootXmlResource(xmlResourceStore));
        root.initialize();
        root.resource().save();
       
        assertEqualsIgnoreNewLineDiffs(loadResource("result.txt"), new String(byteArrayResourceStore.getContents(), UTF8));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.RootXmlResource

Copyright © 2018 www.massapicom. 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.