Examples of ValueProperty


Examples of org.eclipse.sapphire.ValueProperty

   
    @Test

    public void testRequiredInterface3()
    {
        final ValueProperty property = TestElement.PROP_REQUIRED_INTERFACE_3;
       
        test( property, "foo.bar.FooBar", "Could not resolve required interface 3 \"foo.bar.FooBar\"" );
        test( property, "java.util.ArrayList", "Type java.util.ArrayList is a class, which is not allowed for required interface 3" );
        test( property, "java.util.AbstractList", "Type java.util.AbstractList is an abstract class, which is not allowed for required interface 3" );
        test( property, "java.util.HashMap", "Type java.util.HashMap is a class, which is not allowed for required interface 3" );
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

   
    @Test

    public void testRequiredAnnotation1()
    {
        final ValueProperty property = TestElement.PROP_REQUIRED_ANNOTATION_1;
       
        test( property, "foo.bar.FooBar", "Could not resolve required annotation 1 \"foo.bar.FooBar\"" );
        test( property, "java.util.ArrayList", "Type java.util.ArrayList is a class, which is not allowed for required annotation 1" );
        test( property, "java.util.AbstractList", "Type java.util.AbstractList is an abstract class, which is not allowed for required annotation 1" );
        test( property, "java.util.HashMap", "Type java.util.HashMap is a class, which is not allowed for required annotation 1" );
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

   
    @Test

    public void testRequiredEnum1()
    {
        final ValueProperty property = TestElement.PROP_REQUIRED_ENUM_1;
       
        test( property, "foo.bar.FooBar", "Could not resolve required enum 1 \"foo.bar.FooBar\"" );
        test( property, "java.util.ArrayList", "Type java.util.ArrayList is a class, which is not allowed for required enum 1" );
        test( property, "java.util.AbstractList", "Type java.util.AbstractList is an abstract class, which is not allowed for required enum 1" );
        test( property, "java.util.HashMap", "Type java.util.HashMap is a class, which is not allowed for required enum 1" );
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

   
    @Test

    public void testRequiredMixedType1()
    {
        final ValueProperty property = TestElement.PROP_REQUIRED_MIXED_TYPE_1;
       
        test( property, "foo.bar.FooBar", "Could not resolve required mixed type 1 \"foo.bar.FooBar\"" );
        test( property, "java.util.ArrayList" );
        test( property, "java.util.AbstractList", "Type java.util.AbstractList is an abstract class, which is not allowed for required mixed type 1" );
        test( property, "java.util.HashMap" );
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

   
    @Test

    public void testRequiredMixedType2()
    {
        final ValueProperty property = TestElement.PROP_REQUIRED_MIXED_TYPE_2;
       
        test( property, "foo.bar.FooBar", "Could not resolve required mixed type 2 \"foo.bar.FooBar\"" );
        test( property, "java.util.ArrayList" );
        test( property, "java.util.AbstractList", "Type java.util.AbstractList is an abstract class, which is not allowed for required mixed type 2" );
        test( property, "java.util.HashMap" );
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 );
            return ( property != null && property.hasAnnotation( ProjectRelativePath.class ) );
        }
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 );
            return ( property != null && Path.class.isAssignableFrom( property.getTypeClass() ) && property.hasAnnotation( ProjectRelativePath.class ) );
        }
View Full Code Here

Examples of org.eclipse.sapphire.ValueProperty

    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final ISapphireUiDef def = context.find( ISapphireUiDef.class );
            final ValueProperty property = context.find( ValueProperty.class );
           
            if( def != null && property != null && property.getTypeClass() == JavaTypeName.class )
            {
                final Reference referenceAnnotation = property.getAnnotation( Reference.class );
   
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
                    final IProject project = def.adapt( IProject.class );
                   
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 && context.find( ISapphireUiDef.class ) != null )
            {
                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

    }
   
    protected void initBindingMetadata()
    {
        final Value<?> property = (Value<?>) property();
        final ValueProperty pdef = property.definition();
        final XmlNamespaceResolver xmlNamespaceResolver = resource().getXmlNamespaceResolver();
       
        final XmlBinding genericBindingAnnotation = pdef.getAnnotation( XmlBinding.class );
       
        if( genericBindingAnnotation != null )
        {
            this.path = new XmlPath( genericBindingAnnotation.path(), xmlNamespaceResolver );
            this.removeNodeOnSetIfNull = true;
        }
        else
        {
            final XmlValueBinding bindingAnnotation = pdef.getAnnotation( XmlValueBinding.class );
           
            if( bindingAnnotation != null )
            {
                this.path = new XmlPath( bindingAnnotation.path(), xmlNamespaceResolver );
                this.removeNodeOnSetIfNull = bindingAnnotation.removeNodeOnSetIfNull();
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.