Examples of ValueProperty


Examples of org.eclipse.sapphire.ValueProperty

                    final PropertyDef cprop = itr.next();
                    boolean empty = true;
                   
                    if( cprop instanceof ValueProperty )
                    {
                        final ValueProperty cvprop = (ValueProperty) cprop;
                       
                        for( Element element : extElements )
                        {
                            if( element.property( cvprop ).text() != null )
                            {
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

                if( collection instanceof ElementList )
                {
                    final ElementList<?> list = (ElementList<?>) collection;
                    final ListProperty listProperty = list.definition();
                    final ElementType listEntryType = listProperty.getType();
                    final ValueProperty listEntryProperty;
                   
                    if( operands().size() > 1 )
                    {
                        final String listEntryPropertyName = cast( operand( 1 ), String.class );
                   
                        final PropertyDef prop = listEntryType.property( listEntryPropertyName );
                       
                        if( prop == null )
                        {
                            throw new FunctionException( missingProperty.format( listEntryType.getSimpleName(), listEntryPropertyName ) );
                        }
                       
                        if( ! ( prop instanceof ValueProperty ) )
                        {
                            throw new FunctionException( notValueProperty.format( listEntryType.getSimpleName(), listEntryPropertyName ) );
                        }
                   
                        listEntryProperty = (ValueProperty) prop;
                    }
                    else
                    {
                        ValueProperty prop = null;
                       
                        for( PropertyDef p : listEntryType.properties() )
                        {
                            if( p instanceof ValueProperty )
                            {
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

            @Override
            public void write(String value) {
                ProxyResource.this.value = value;
               
                final Element element = getActualElement(true/*create*/);
                final ValueProperty property = getValueProperty();
                element.property( property ).write( value, true );
            }
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final ValueProperty property = context.find( ValueProperty.class );
           
            if( property != null && property.getTypeClass() == JavaTypeName.class )
            {
                final JavaTypeConstraint constraintAnnotation = property.getAnnotation( JavaTypeConstraint.class );
               
                if ( constraintAnnotation != null )
                {
                    return true;
                }
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final ValueProperty property = context.find( ValueProperty.class );
           
            if( property != null && property.getTypeClass() == JavaTypeName.class )
            {
                final Reference referenceAnnotation = property.getAnnotation( Reference.class );
               
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
                    return true;
                }
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

                }
            }
            else if( property instanceof ListProperty )
            {
                final ListProperty listProperty = (ListProperty) property;
                final ValueProperty entryValueProperty = (ValueProperty) listProperty.getType().properties().first();
                final StringBuilder buf = new StringBuilder();
               
                for( Element entry : element.property( listProperty ) )
                {
                    final String entryValuePropertyText = entry.property( entryValueProperty ).text();
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

    @Test
   
    public void testWorkspaceRelativePath() throws Exception
    {
        final ValueProperty property = TestElement.PROP_WORKSPACE_RELATIVE_PATH;
        final TestElement element = TestElement.TYPE.instantiate( new RootXmlResource( new XmlResourceStore( new WorkspaceFileResourceStore( this.aa ) ) ) );
       
        testValidationOk( element, property, this.a.getFullPath() );
        testValidationOk( element, property, this.aa.getFullPath() );
        testValidationOk( element, property, this.ab.getFullPath() );
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

   
    @Test
   
    public void testProjectRelativePath() throws Exception
    {
        final ValueProperty property = TestElement.PROP_PROJECT_RELATIVE_PATH;
       
        TestElement element = TestElement.TYPE.instantiate( new RootXmlResource( new XmlResourceStore( new WorkspaceFileResourceStore( this.aa ) ) ) );
       
        testValidationOk( element, property, this.aa.getProjectRelativePath() );
        testValidationOk( element, property, this.ab.getProjectRelativePath() );
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

        final ElementList<?> list = (ElementList<?>) property();
       
        if( ! list.isEmpty() )
        {
            final Element element = list.get( 0 );
            final ValueProperty property = (ValueProperty) element.properties().first().definition();
            final String oldValue = element.property( property ).text();
            final String newValue;
           
            if( isChecked() )
            {
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

        final ElementList<?> list = (ElementList<?>) property();
       
        if( ! list.isEmpty() )
        {
            final Element element = list.get( 0 );
            final ValueProperty property = (ValueProperty) element.properties().first().definition();
            final String value = element.property( property ).text();
            checked = ( value != null && value.startsWith( this.prefix ) );
        }
       
        setChecked( checked );
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.