Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Property


    @Override
    protected void init()
    {
        super.init();
       
        final Property property = context( Property.class );
       
        this.possibleValuesService = property.service( PossibleValuesService.class );
       
        if( this.possibleValuesService == null )
        {
            throw new IllegalStateException();
        }
View Full Code Here


    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
            return ( property != null && property.service( PossibleValuesService.class ) != null );
        }
View Full Code Here

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
            return ( property != null && Path.class.isAssignableFrom( property.definition().getTypeClass() ) && property.service( RelativePathService.class ) != null );
        }
View Full Code Here

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
            return ( property != null && property.service( FileExtensionsService.class ) != null );
        }
View Full Code Here

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
            return ( property != null && property.service( InitialValueService.class ) != null );
        }
View Full Code Here

    private Listener referenceServiceListener;
   
    @Override
    protected void initValidationService()
    {
        final Property property = context( Property.class );
       
        this.referenceService = property.service( ReferenceService.class );
       
        if( this.referenceService != null )
        {
            this.referenceServiceListener = new Listener()
            {
View Full Code Here

{
    @Override
    protected void initStandardDocumentationService( final StringBuilder content,
                                                     final List<Topic> topics )
    {
        final Property property = context( Property.class );
       
        init( property.definition(), content, topics );
       
        final SortedSet<String> facts = property.service( FactsAggregationService.class ).facts();
       
        if( ! facts.isEmpty() )
        {
            if( content.length() > 0 )
            {
View Full Code Here

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
           
            for( PropertyDef p = property.definition(); p != null ; p = p.getBase() )
            {
                if( p.hasAnnotation( Documentation.class ) )
                {
                    return true;
                }
            }
           
            if( ! property.service( FactsAggregationService.class ).facts().isEmpty() )
            {
                return true;
            }
           
            return false;
View Full Code Here

        {
            if (functionResult.operands().size() == 1)
            {
              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;
                  }
              }
            }
            else
            {                        
              if (functionResult.operand(1) instanceof String)
              {     
                String temp = (String)functionResult.operand(1);
                if (temp.equalsIgnoreCase("text") || temp.equalsIgnoreCase("content"))
                {
                  if (functionResult.function().operand(0) instanceof PropertyAccessFunction)
                  {
                    PropertyAccessFunction nestedFunc = (PropertyAccessFunction)functionResult.function().operand(0);
                    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

        else
        {
            ModelPath.Segment head = endpointPath.head();
            if( head instanceof ParentElementSegment )
            {
                final Property parent = modelElement.parent();               
                if( parent == null )
                {
                    throw new RuntimeException("Invalid model path: " + endpointPath);
                }
                return resolveEndpoint(parent.element(), endpointPath.tail());               
            }
            else
            {
                throw new RuntimeException("Invalid model path: " + endpointPath);
            }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.Property

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.