Package org.eclipse.sapphire

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


       
        final Property property = property();
       
        this.memberType = property.definition().getType();
        this.memberProperty = (ValueProperty) this.memberType.properties().first();
        this.possibleValuesService = property.service( PossibleValuesService.class );
       
        setAddActionDesired( ! this.possibleValuesService.strict() );
    }

    public Control createSourceControl( final Composite parent )
View Full Code Here


       
        assertEquals( 1, xl.size() );
        assertEquals( 1, yl.size() );
        assertSame( xl.get( 0 ), yl.get( 0 ) );
       
        final PossibleValuesService x = property.service( PossibleValuesService.class );
        final TestPossibleValuesService y = property.service( TestPossibleValuesService.class );
       
        assertNotNull( x );
        assertSame( x, y );
    }
View Full Code Here

        assertEquals( 1, xl.size() );
        assertEquals( 1, yl.size() );
        assertSame( xl.get( 0 ), yl.get( 0 ) );
       
        final PossibleValuesService x = property.service( PossibleValuesService.class );
        final TestPossibleValuesService y = property.service( TestPossibleValuesService.class );
       
        assertNotNull( x );
        assertSame( x, y );
    }
View Full Code Here

                }
            }
        }
        else
        {
            final JavaTypeConstraintService javaTypeConstraintService = property.service( JavaTypeConstraintService.class );
           
            if( javaTypeConstraintService != null )
            {
                kinds.addAll( javaTypeConstraintService.kinds() );
            }
View Full Code Here

        else
        {
            throw new IllegalStateException();
        }
       
        this.possibleValuesService = property.service( PossibleValuesService.class );
       
        this.possibleValuesServiceListener = new Listener()
        {
            @Override
            public void handle( final Event event )
View Full Code Here

        public PropertyEditorPresentation create( final PropertyEditorPart part, final SwtPresentation parent, final Composite composite )
        {
            final Property property = part.property();
           
            if( property.definition() instanceof ListProperty &&
                property.service( PossibleTypesService.class ).types().size() == 1 )
            {
                final SortedSet<PropertyDef> properties = property.definition().getType().properties();
               
                if( properties.size() == 1 )
                {
View Full Code Here

        {
            final Property property = factory.property();
           
            if( factory.visible() && ! property.definition().isReadOnly() )
            {
                final PossibleTypesService possibleTypesService = property.service( PossibleTypesService.class );
   
                if( property instanceof ElementList )
                {
                    for( final ElementType memberType : possibleTypesService.types() )
                    {
View Full Code Here

           
            final Property property = factory.property();
           
            if( ! property.disposed() )
            {
                final PossibleTypesService possibleTypesService = property.service( PossibleTypesService.class );
                possibleTypesService.detach( this.possibleTypesServiceListener );
            }
        }
    }
View Full Code Here

               
                return
                (
                    referenceAnnotation != null &&
                    referenceAnnotation.target() == JavaType.class &&
                    evaluate( property.service( JavaTypeConstraintService.class ) ) &&
                    property.element().adapt( IJavaProject.class ) != null
                );
            }
           
            return false;
View Full Code Here

       
        final Property property = property0;
        if( property instanceof Value<?> )
        {
         
            final DefaultValueService defaultValueService = property.service( DefaultValueService.class );
            final boolean hasDefaultValue = ( defaultValueService == null ? false : defaultValueService.value() != null );
            final boolean isBooleanType = property.definition().getTypeClass().equals( Boolean.class );
           
            final String actionText
                = ( hasDefaultValue || isBooleanType ? restoreDefaultValue.text() : clear.text() );
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.