Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.PropertyDef


                   
                    if( operands().size() > 1 )
                    {
                        final String listEntryPropertyName = cast( operand( 1 ), String.class );
                   
                        final PropertyDef prop = listEntryType.property( listEntryPropertyName );
                       
                        if( prop == null )
                        {
                            throw new FunctionException( missingProperty.format( listEntryType.getSimpleName(), listEntryPropertyName ) );
                        }
View Full Code Here


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

    private JavaTypeConstraintServiceData data;

    @Override
    protected void initJavaTypeConstraintService()
    {
        final PropertyDef property = context().find( PropertyDef.class );
        final JavaTypeConstraint javaTypeConstraintAnnotation = property.getAnnotation( JavaTypeConstraint.class );
       
        final Set<JavaTypeKind> kind = EnumSet.noneOf( JavaTypeKind.class );
       
        for( JavaTypeKind k : javaTypeConstraintAnnotation.kind() )
        {
View Full Code Here

public final class AbsoluteFolderPathBrowseActionHandlerCondition extends PropertyEditorCondition
{
    @Override
    protected boolean evaluate( final PropertyEditorPart part )
    {
        final PropertyDef property = part.property().definition();
       
        if( property.isOfType( Path.class ) && property.hasAnnotation( AbsolutePath.class ) )
        {
            final ValidFileSystemResourceType validFileSystemResourceType = property.getAnnotation( ValidFileSystemResourceType.class );
           
            if( validFileSystemResourceType != null && validFileSystemResourceType.value() == FileSystemResourceType.FOLDER )
            {
                return true;
            }
View Full Code Here

    private void nativeToJava( final DataInputStream in, final ElementData element ) throws IOException
    {
        while( in.readByte() != 0 )
        {
            final String propertyName = in.readUTF();
            final PropertyDef property = element.type().property( propertyName );

            if( property != null )
            {
                if( property instanceof ValueProperty )
                {
View Full Code Here

        final ElementType memberType = list.definition().getType();
        final SortedSet<PropertyDef> allMemberProperties = memberType.properties();
       
        if( allMemberProperties.size() == 1 )
        {
            final PropertyDef prop = allMemberProperties.first();
           
            if( prop instanceof ValueProperty )
            {
                this.memberProperty = (ValueProperty) prop;
            }
View Full Code Here

public final class AbsoluteFilePathBrowseActionHandlerCondition extends PropertyEditorCondition
{
    @Override
    protected boolean evaluate( final PropertyEditorPart part )
    {
        final PropertyDef property = part.property().definition();
       
        if( property.isOfType( Path.class ) && property.hasAnnotation( AbsolutePath.class ) )
        {
            final ValidFileSystemResourceType validFileSystemResourceType = property.getAnnotation( ValidFileSystemResourceType.class );
           
            if( validFileSystemResourceType != null && validFileSystemResourceType.value() == FileSystemResourceType.FILE )
            {
                return true;
            }
View Full Code Here

public final class StaticFactsService extends FactsService
{
    @Override
    protected void facts( final SortedSet<String> facts )
    {
        final PropertyDef property = context( PropertyDef.class );
       
        final Fact factAnnotation = property.getAnnotation( Fact.class );
       
        if( factAnnotation != null )
        {
            facts( facts, factAnnotation );
        }
       
        final Facts factsAnnotation = property.getAnnotation( Facts.class );
       
        if( factsAnnotation != null )
        {
            for( Fact a : factsAnnotation.value() )
            {
View Full Code Here

    public static final class Condition extends ServiceCondition
    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final PropertyDef property = context.find( PropertyDef.class );
            return ( property != null && ( property.hasAnnotation( Fact.class ) || property.hasAnnotation( Facts.class ) ) );
        }
View Full Code Here

    private Set<ElementType> possible;
   
    @Override
    protected void initPossibleTypesService()
    {
        final PropertyDef property = context( PropertyDef.class );
        final List<Class<?>> possible = new ArrayList<Class<?>>();
       
        final Type typeAnnotation = property.getAnnotation( Type.class );
       
        if( property instanceof ElementProperty || property instanceof ListProperty )
        {
            if( typeAnnotation != null )
            {
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.PropertyDef

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.