Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.ElementType


       
        final ListFactory<Validation> annotations = ListFactory.start();
       
        if( property == null )
        {
            final ElementType type = element.type();
           
            annotations.add( type.getAnnotations( Validation.class ) );
           
            for( final Validations v : type.getAnnotations( Validations.class ) )
            {
                annotations.add( v.value() );
            }
        }
        else
View Full Code Here


        {
            final PropertyDef property = context.find( PropertyDef.class );
           
            if( property == null )
            {
                final ElementType type = context.find( Element.class ).type();
                return ( type.hasAnnotation( Validation.class ) || type.hasAnnotation( Validations.class ) );
            }
            else
            {
                return ( property.hasAnnotation( Validation.class ) || property.hasAnnotation( Validations.class ) );
            }
View Full Code Here

        {
            final ValueProperty property = context.find( ValueProperty.class );
           
            if( property != null )
            {
                final ElementType type = property.getModelElementType();
               
                if( type.properties().size() == 1 )
                {
                    final Property parent = context.find( Element.class ).parent();
                   
                    if( parent != null && parent.definition() instanceof ListProperty && parent.service( PossibleValuesService.class ) != null )
                    {
View Full Code Here

            final Property property = context.find( Property.class );
           
            if( property != null && property.definition() instanceof ListProperty &&
                property.service( PossibleTypesService.class ).types().size() == 1 )
            {
                final ElementType memberType = property.definition().getType();
                final SortedSet<PropertyDef> properties = memberType.properties();
               
                if( properties.size() == 1 )
                {
                    final PropertyDef memberProperty = properties.first();
                   
View Full Code Here

    private ImageData image;
   
    @Override
    protected void initImageService()
    {
        final ElementType type = context( Element.class ).type();
        final Image imageAnnotation = type.getAnnotation( Image.class );
        final Class<?> imageAnnotationHostClass = type.findAnnotationHostClass( imageAnnotation );
        final String imagePath = imageAnnotation.path();
       
        this.image = ImageData.readFromClassLoader( imageAnnotationHostClass, imagePath ).optional();
       
        if( this.image == null )
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ElementType

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.