Package org.eclipse.sapphire

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


                }
                else if( segment instanceof ModelPath.PropertySegment )
                {
                    final Property property = element.property( ( (ModelPath.PropertySegment) segment ).getPropertyName() );
                   
                    if( property != null && property.definition() instanceof ImpliedElementProperty )
                    {
                        element = ( (ElementHandle<?>) property ).content();
                    }
                    else if( property instanceof ElementList || property instanceof ElementHandle )
                    {
View Full Code Here


    {
        super( part, parent, composite );
       
        final Property property = property();
       
        this.memberType = property.definition().getType();
        this.memberProperty = (ValueProperty) this.memberType.properties().first();
        this.possibleValuesService = property.service( PossibleValuesService.class );
       
        setAddActionDesired( ! this.possibleValuesService.strict() );
    }
View Full Code Here

    try {
      final SelectionDialog dlg = JavaUI.createPackageDialog(((FormComponentPresentation) context).shell(),
          project, 0, null);

      dlg.setTitle( dialogTitle.format( property.definition().getLabel( true, CapitalizationType.TITLE_STYLE, false ) ) );
      dlg.setMessage( dialogMessage.text() );

      if (dlg.open() == SelectionDialog.OK) {
        Object results[] = dlg.getResult();
        assert results != null && results.length == 1;
View Full Code Here

      final Property property = part.property();

      return
            (
                property instanceof Value &&
                property.definition().isOfType( JavaPackageName.class ) &&
                property.element().adapt( IJavaProject.class ) != null
            );
    }
  }
View Full Code Here

        try
        {
            final SelectionDialog dlg
                = JavaUI.createTypeDialog( ( (FormComponentPresentation) context ).shell(), null, project, browseDialogStyle, false );
           
            dlg.setTitle( dialogTitle.format( property.definition().getLabel( true, CapitalizationType.TITLE_STYLE, false ) ) );
           
            if (dlg.open() == SelectionDialog.OK) {
                Object results[] = dlg.getResult();
                assert results != null && results.length == 1;
                if (results[0] instanceof IType) {
View Full Code Here

        @Override
        protected boolean evaluate( final PropertyEditorPart part )
        {
            final Property property = part.property();
           
            if( property instanceof Value && property.definition().isOfType( JavaTypeName.class ) )
            {
                final Reference referenceAnnotation = property.definition().getAnnotation( Reference.class );
               
                return
                (
View Full Code Here

        {
            final Property property = part.property();
           
            if( property instanceof Value && property.definition().isOfType( JavaTypeName.class ) )
            {
                final Reference referenceAnnotation = property.definition().getAnnotation( Reference.class );
               
                return
                (
                    referenceAnnotation != null &&
                    referenceAnnotation.target() == JavaType.class &&
View Full Code Here

            }
            else if( segment instanceof ModelPath.PropertySegment )
            {
                final Property property = this.element.property( ( (ModelPath.PropertySegment) segment ).getPropertyName() );
               
                if( property != null && property.definition() instanceof ImpliedElementProperty )
                {
                    this.element = ( (ElementHandle<?>) property ).content();
                }
                else
                {
View Full Code Here

        // Initialize
       
        final PropertyEditorPart part = part();
        final Property property = part.property();
       
        this.memberType = property.definition().getType();
       
        final SortedSet<PropertyDef> allMemberProperties = this.memberType.properties();
       
        if( allMemberProperties.size() == 1 )
        {
View Full Code Here

        @Override
        public PropertyEditorPresentation create( final PropertyEditorPart part, final SwtPresentation parent, final Composite composite )
        {
            final Property property = part.property();
           
            if( property.definition() instanceof ListProperty &&
                property.service( PossibleTypesService.class ).types().size() == 1 )
            {
                final SortedSet<PropertyDef> properties = property.definition().getType().properties();
               
                if( properties.size() == 1 )
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.