Package org.eclipse.sapphire

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


        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() );
           
            final PropertyEditorAssistContribution.Factory contribution = PropertyEditorAssistContribution.factory();
View Full Code Here


            );
           
            final PropertyEditorAssistSection section = context.getSection( SECTION_ID_ACTIONS );
            section.addContribution( contribution.create() );
        }
        else if( property.definition() instanceof ListProperty )
        {
            final PropertyEditorAssistContribution.Factory contribution = PropertyEditorAssistContribution.factory();
           
            contribution.text( "<p><a href=\"action\" nowrap=\"true\">" + escapeForXml( clear.text() ) + "</a></p>" );
           
View Full Code Here

       
        if( property0 == null )
        {
          contribute = true;
        }
        else if( ! property0.definition().isDerived() )
        {
            contribute = ! property0.empty();
        }
       
        if( ! contribute )
View Full Code Here

            "action",
            new Runnable()
            {
                public void run()
                {
                    sourceEditorService.show( element, property != null ? property.definition() : null);
                }
            }
        );
       
        final PropertyEditorAssistSection section = context.getSection( SECTION_ID_ACTIONS );
View Full Code Here

            }
            else
            {
                final Property property = element.property( path );
               
                if( property.definition() instanceof ImpliedElementProperty )
                {
                    part = new WithImpliedPart();
                }
                else
                {
View Full Code Here

        else if (part instanceof WithPart)
        {
          property = ((WithPart)part).property();
        }
       
        if( property == null || property.definition().isReadOnly() )
        {
            return;
        }
       
        if( property instanceof Value<?> )
View Full Code Here

        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
           
            if( property.definition() instanceof ValueProperty )
            {
                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.definition() instanceof ValueProperty )
            {
                final Reference referenceAnnotation = property.definition().getAnnotation( Reference.class );
   
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
                    final IProject project = property.element().adapt( IProject.class );
                   
View Full Code Here

        final String columnWidthsHint = part.getRenderingHint( PropertyEditorDef.HINT_COLUMN_WIDTHS, "" );
        final StringTokenizer columnWidthsHintTokenizer = new StringTokenizer( columnWidthsHint, "," );
       
        for( final ModelPath childPropertyPath : part.getChildProperties() )
        {
            final PropertyDef childProperty = property.definition().getType().property( childPropertyPath );
            final PropertyEditorDef childPropertyEditorDef = part.definition().getChildPropertyEditor( childPropertyPath );
            final TableViewerColumn tableViewerColumn = new TableViewerColumn( this.tableViewer, SWT.NONE );
           
            if( childPropertyEditorDef == null )
            {
View Full Code Here

                        }
                    }
                );
            }

            if( ! property.definition().hasAnnotation( FixedOrderList.class ) )
            {
                final SapphireAction moveUpAction = actions.getAction( ACTION_MOVE_UP );
                final SapphireActionHandler moveUpActionHandler = new MoveUpActionHandler();
                moveUpActionHandler.init( moveUpAction, null );
                moveUpAction.addHandler( moveUpActionHandler );
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.