Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Property.definition()


            {
              if (functionResult.operand(0) instanceof String)
              {
                  final Property property = element.property( (String)functionResult.operand(0) );
                 
                  if( property != null && property instanceof Value && ! property.definition().isReadOnly() )
                  {
                      return (Value<?>)property;
                  }
              }
            }
View Full Code Here


                    if (nestedFunc.operands().size() == 1 && nestedFunc.operand(0) instanceof Literal)
                    {
                      String propName = (String)((Literal)nestedFunc.operand(0)).value();
                              final Property property = element.property( propName );
                             
                              if( property != null && property instanceof Value && ! property.definition().isReadOnly() )
                              {
                                  return (Value<?>)property;
                              }
                     
                    }
View Full Code Here

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

        @Override
        public boolean applicable( final ServiceContext context )
        {
            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();
               
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

    @Override
    protected void initValidationService()
    {
        final Property property = context( Property.class );
       
        this.resourceMustExist = property.definition().hasAnnotation( MustExist.class );
       
        final ValidFileSystemResourceType validResourceTypeAnnotation = property.definition().getAnnotation( ValidFileSystemResourceType.class );
        this.validResourceType = ( validResourceTypeAnnotation != null ? validResourceTypeAnnotation.value() : null );
       
        this.fileExtensionsService = property.service( FileExtensionsService.class );
View Full Code Here

    {
        final Property property = context( Property.class );
       
        this.resourceMustExist = property.definition().hasAnnotation( MustExist.class );
       
        final ValidFileSystemResourceType validResourceTypeAnnotation = property.definition().getAnnotation( ValidFileSystemResourceType.class );
        this.validResourceType = ( validResourceTypeAnnotation != null ? validResourceTypeAnnotation.value() : null );
       
        this.fileExtensionsService = property.service( FileExtensionsService.class );
       
        if( this.fileExtensionsService != null )
View Full Code Here

           
            if( style != null && style.startsWith( "Sapphire.PropertyEditor.PopUpListField" ) )
            {
                final Property property = part.property();
               
                if( property.definition() instanceof ValueProperty && property.service( PossibleValuesService.class ) != null )
                {
                    PopUpListFieldStyle popUpListFieldPresentationStyle = null;
                   
                    if( style.equals( "Sapphire.PropertyEditor.PopUpListField" ) )
                    {
View Full Code Here

               
                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 )
                    {
                        return true;
                    }
                }
            }
View Full Code Here

                {
                    PopUpListFieldStyle popUpListFieldPresentationStyle = null;
                   
                    if( style.equals( "Sapphire.PropertyEditor.PopUpListField" ) )
                    {
                        if( Enum.class.isAssignableFrom( property.definition().getTypeClass() ) )
                        {
                            popUpListFieldPresentationStyle = PopUpListFieldStyle.STRICT;
                        }
                        else
                        {
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.