Examples of ElementPropertyBinding


Examples of org.eclipse.sapphire.modeling.ElementPropertyBinding

        }
        else if( property instanceof ElementHandle )
        {
            if( property.definition() instanceof ImpliedElementProperty )
            {
                binding = new ElementPropertyBinding()
                {
                    private final MemoryResource element = new MemoryResource( property.definition().getType(), MemoryResource.this );
                   
                    @Override
                    public ElementType type( final Resource resource )
                    {
                        return ( (MemoryResource) resource ).type();
                    }
                   
                    @Override
                    public Resource read()
                    {
                        return this.element;
                    }
                };
            }
            else
            {
                binding = new ElementPropertyBinding()
                {
                    private MemoryResource element;
                   
                    @Override
                    public ElementType type( final Resource resource )
View Full Code Here

Examples of org.eclipse.sapphire.modeling.ElementPropertyBinding

            initialized = ( ( this.initialization & CONTENT_INITIALIZED ) != 0 );
        }
       
        if( ! initialized || ! onlyIfNotInitialized )
        {
            final ElementPropertyBinding binding = binding();
            final Resource resourceAfter = binding.read();
            final boolean proceed;
           
            synchronized( this )
            {
                final Resource resourceBefore = ( this.content == null ? null : this.content.resource() );
               
                initialized = ( ( this.initialization & CONTENT_INITIALIZED ) != 0 );
                proceed = ( ! initialized || resourceBefore != resourceAfter );
            }
           
            if( proceed )
            {
                T contentBefore;
                T contentAfter = null;
               
                if( resourceAfter != null )
                {
                    final ElementType type = binding.type( resourceAfter );
                    contentAfter = type.instantiate( this, resourceAfter );
                }

                PropertyContentEvent event = null;
               
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.