Package org.eclipse.sapphire.ui.AttributesContainer

Examples of org.eclipse.sapphire.ui.AttributesContainer.Attribute


        if( name == null )
        {
            throw new IllegalArgumentException();
        }
       
        Attribute attribute = null;
       
        for( Attribute attr : state.getAttributes() )
        {
            if( name.equalsIgnoreCase( attr.getName().content() ) )
            {
                attribute = attr;
                break;
            }
        }
       
        String string = null;
       
        if( value != null )
        {
            string = state.service( MasterConversionService.class ).convert( value, String.class );
        }
       
        if( string == null )
        {
            if( attribute != null )
            {
                state.getAttributes().remove( attribute );
            }
        }
        else
        {
            if( attribute == null )
            {
                attribute = state.getAttributes().insert();
                attribute.setName( name );
            }
           
            attribute.setValue( string );
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.AttributesContainer.Attribute

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.