Package org.eclipse.sapphire

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


{
    @Override
    protected boolean evaluate( final PropertyEditorPart part )
    {
        final Property property = part.property();
        return ( property.definition() instanceof ValueProperty && Path.class.isAssignableFrom( property.definition().getTypeClass() ) && property.service( RelativePathService.class ) != null );
    }

}
View Full Code Here


{
    @Override
    protected boolean evaluate( final PropertyEditorPart part )
    {
        final Property property = part.property();
        return ( property.definition() instanceof ValueProperty && Path.class.isAssignableFrom( property.definition().getTypeClass() ) && property.service( RelativePathService.class ) != null );
    }

}
View Full Code Here

    @Override
    public PropertyEditorPresentation create( final PropertyEditorPart part, final SwtPresentation parent, final Composite composite )
    {
        final Property property = part.property();
       
        if( property instanceof Value && property.definition().isOfType( Enum.class ) )
        {
            final Enum<?>[] enumValues = (Enum<?>[]) property.definition().getTypeClass().getEnumConstants();
           
            if( enumValues.length > 3 )
            {
View Full Code Here

    {
        final Property property = part.property();
       
        if( property instanceof Value && property.definition().isOfType( Enum.class ) )
        {
            final Enum<?>[] enumValues = (Enum<?>[]) property.definition().getTypeClass().getEnumConstants();
           
            if( enumValues.length > 3 )
            {
                return new PopUpListFieldPropertyEditorPresentation( part, parent, composite, PopUpListFieldStyle.STRICT );
            }
View Full Code Here

        final Property property = property();
       
        // TODO support readonly
        //final boolean isReadOnly = ( property.isReadOnly() || part.getRenderingHint( HINT_READ_ONLY, false ) );

        final SortedSet<PropertyDef> allMemberProperties = property.definition().getType().properties();
       
        if( allMemberProperties.size() == 1 )
        {
            final PropertyDef prop = allMemberProperties.first();
           
View Full Code Here

        for( MasterDetailsContentNodePart node : nodesToDelete )
        {
            final Element element = node.getModelElement();
            final Property elementParent = element.parent();
           
            if( elementParent.definition() instanceof ListProperty )
            {
                ( (ElementList<?>) elementParent ).remove( element );
            }
            else
            {
View Full Code Here

        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
           
            if( property != null && property.definition().getTypeClass() == JavaTypeName.class )
            {
                final Reference referenceAnnotation = property.definition().getAnnotation( Reference.class );
               
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
View Full Code Here

        {
            final Property property = context.find( Property.class );
           
            if( property != null && property.definition().getTypeClass() == JavaTypeName.class )
            {
                final Reference referenceAnnotation = property.definition().getAnnotation( Reference.class );
               
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
                    return property.service( JavaTypeConstraintService.class ) != null;
                }
View Full Code Here

            }
        }
        else
        {
            final ValidFileSystemResourceType validFileSystemResourceTypeAnnotation
                = property.definition().getAnnotation( ValidFileSystemResourceType.class );
       
            if( validFileSystemResourceTypeAnnotation != null )
            {
                this.type = validFileSystemResourceTypeAnnotation.value();
            }
View Full Code Here

                input = new Object();
            }
       
            final ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog( p.shell(), labelProvider, contentProvider );
           
            dialog.setTitle( property.definition().getLabel( false, CapitalizationType.TITLE_STYLE, false ) );
            dialog.setMessage( createBrowseDialogMessage( property.definition().getLabel( true, CapitalizationType.NO_CAPS, false ) ) );
            dialog.setAllowMultiple( false );
            dialog.setHelpAvailable( false );
            dialog.setInput( input );
            dialog.setComparator( viewerComparator );
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.