Examples of PropertyDef


Examples of org.eclipse.sapphire.PropertyDef

        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 )
            {
                final String label = childProperty.getLabel( false, CapitalizationType.TITLE_STYLE, false );
                tableViewerColumn.getColumn().setText( label );
            }
            else
            {
                final MutableReference<FunctionResult> labelFunctionResultRef = new MutableReference<FunctionResult>();
               
                final Runnable updateLabelOp = new Runnable()
                {
                    public void run()
                    {
                        String label = (String) labelFunctionResultRef.get().value();
                        label = LabelTransformer.transform( label, CapitalizationType.TITLE_STYLE, false );
                        tableViewerColumn.getColumn().setText( label );
                    }
                };
               
                final FunctionResult labelFunctionResult = part.initExpression
                (
                    childPropertyEditorDef.getLabel().content(),
                    String.class,
                    Literal.create( childProperty.getLabel( false, CapitalizationType.NO_CAPS, true ) ),
                    updateLabelOp
                );
               
                labelFunctionResultRef.set( labelFunctionResult );
               
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

    private ColumnHandler createColumnHandler( final List<ColumnHandler> allColumnHandlers,
                                               final ModelPath childPropertyPath,
                                               final boolean showImages,
                                               final PropertyEditorDef childPropertyEditorDef )
    {
        final PropertyDef childProperty = property().definition().getType().property( childPropertyPath );
        final ColumnHandler columnHandler;
       
        if( childProperty.isOfType( Boolean.class ) )
        {
            columnHandler = new BooleanPropertyColumnHandler( this.tableViewer, this.selectionProvider, part(),
                                                              allColumnHandlers, childPropertyPath, showImages );
        }
        else
        {
            PopUpListFieldStyle popUpListFieldPresentationStyle = null;
           
            if( childProperty.isOfType( Enum.class ) )
            {
                popUpListFieldPresentationStyle = PopUpListFieldStyle.STRICT;
            }
            else if( childPropertyEditorDef != null )
            {
                final String style = childPropertyEditorDef.getStyle().text();
               
                if( style != null )
                {
                    if( style.startsWith( "Sapphire.PropertyEditor.PopUpListField" ) )
                    {
                        if( style.equals( "Sapphire.PropertyEditor.PopUpListField" ) )
                        {
                            final PossibleValues possibleValuesAnnotation = childProperty.getAnnotation( PossibleValues.class );
                           
                            if( possibleValuesAnnotation != null )
                            {
                                popUpListFieldPresentationStyle
                                    = ( possibleValuesAnnotation.invalidValueSeverity() == Severity.ERROR
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

               
                final List<PropertyDef> columns = new ArrayList<PropertyDef>();
               
                for( ExtensionSummarySectionColumnDef cdef : this.def.getColumns() )
                {
                    final PropertyDef cprop = extType.property( cdef.getName().text() );
                   
                    if( cprop != null )
                    {
                        columns.add( cprop );
                    }
                }
               
                if( columns.isEmpty() )
                {
                    columns.addAll( getDefaultColumns() );
                }
               
                for( Iterator<PropertyDef> itr = columns.iterator(); itr.hasNext(); )
                {
                    final PropertyDef cprop = itr.next();
                    boolean empty = true;
                   
                    if( cprop instanceof ValueProperty )
                    {
                        final ValueProperty cvprop = (ValueProperty) cprop;
View Full Code Here

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

Examples of org.eclipse.sapphire.PropertyDef

        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

Examples of org.eclipse.sapphire.PropertyDef

    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

Examples of org.eclipse.sapphire.PropertyDef

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

Examples of org.eclipse.sapphire.PropertyDef

    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

Examples of org.eclipse.sapphire.PropertyDef

        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

Examples of org.eclipse.sapphire.PropertyDef

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
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.