Package org.eclipse.sapphire

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


        {
          final Set<String> facts;
         
          if( property != null )
          {
            facts = property.service( FactsAggregationService.class ).facts();
          }
          else
          {
            FactsAggregationService service = element.service( FactsAggregationService.class );
            facts = service != null ? service.facts() : new TreeSet<String>();       
View Full Code Here


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

                            }
                        }
                    }
                };
               
                final PossibleTypesService possibleTypesService = property.service( PossibleTypesService.class );

                final Runnable refreshAddActionHandlersOp = new Runnable()
                {
                    public void run()
                    {
View Full Code Here

                                event.detail = DND.DROP_NONE;
                                return;
                            }
                           
                            final List<ElementData> droppedElements = (List<ElementData>) event.data;
                            final Set<ElementType> possibleTypesService = property.service( PossibleTypesService.class ).types();
                           
                            for( final ElementData droppedElement : droppedElements )
                            {
                                if( ! possibleTypesService.contains( droppedElement.type() ) )
                                {
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
    protected void initValidationService()
    {
        final Property property = context( Property.class );

        property.service( JavaTypeConstraintService.class ).attach
        (
            new Listener()
            {
                @Override
                public void handle( final Event event )
View Full Code Here

                    refresh();
                }
            }
        );
       
        property.service( ReferenceService.class ).attach
        (
            new Listener()
            {
                @Override
                public void handle( final Event event )
View Full Code Here

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

    @Override
    protected void facts( final SortedSet<String> facts )
    {
        final Property property = context( Property.class );
       
        final JavaTypeConstraintService service = property.service( JavaTypeConstraintService.class );

        final List<JavaTypeKind> kinds = new ArrayList<JavaTypeKind>( service.kinds() );
       
        if( kinds.size() > 0 && kinds.size() < 5 )
        {
View Full Code Here

            if( types.size() == 1 )
            {
                final String typeName = types.get( 0 );
                String verb = verbImplementOrExtend.text();
               
                final ReferenceService<?> referenceService = property.service( ReferenceService.class );
               
                if( referenceService != null && referenceService instanceof JavaTypeReferenceService )
                {
                    JavaType type = null;
               
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.