Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.ValueProperty


   
    @Test

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


   
    @Test

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

   
    @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

   
    @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

   
    @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

   
    @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

   
    @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

    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

    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

    {
        @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

TOP

Related Classes of org.eclipse.sapphire.ValueProperty

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.