Package org.eclipse.sapphire

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


  @Override
  public String browse(final Presentation context) {
    final Property property = property();

    final IJavaProject project = property.element().adapt(IJavaProject.class);

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


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

}
View Full Code Here

                    browseDialogStyle = IJavaElementSearchConstants.CONSIDER_CLASSES_AND_ENUMS;
                }
            }
        }

        final IProject project = property.element().adapt( IProject.class );
       
        try
        {
            final SelectionDialog dlg
                = JavaUI.createTypeDialog( ( (FormComponentPresentation) context ).shell(), null, project, browseDialogStyle, false );
View Full Code Here

               
                return
                (
                    referenceAnnotation != null &&
                    referenceAnnotation.target() == JavaType.class &&
                    property.element().adapt( IJavaProject.class ) != null
                );
            }
           
            return false;
        }
View Full Code Here

                    {
                        modElement = null;
                    }
                    else
                    {
                        modElement = parent.element();
                        resource = modElement.resource();
                       
                        if( resource != null )
                        {
                            xmlElement = ( (XmlResource) resource ).getXmlElement();
View Full Code Here

                return
                (
                    referenceAnnotation != null &&
                    referenceAnnotation.target() == JavaType.class &&
                    evaluate( property.service( JavaTypeConstraintService.class ) ) &&
                    property.element().adapt( IJavaProject.class ) != null
                );
            }
           
            return false;
        }
View Full Code Here

            {
                final Reference referenceAnnotation = property.definition().getAnnotation( Reference.class );
   
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
                    final IProject project = property.element().adapt( IProject.class );
                   
                    if( project != null )
                    {
                        try
                        {
View Full Code Here

    @Override
    public PropertyEditorPresentation2 createChildPropertyEditorPresentation( final PropertyEditorPart part )
    {
        final Table table = this.table;
        final Property property = part.property();
        final Element element = findTableRowElement( property.element() );
       
        ColumnHandler handler = null;
       
        for( final ColumnHandler h : this.columnHandlers )
        {
View Full Code Here

                {
                    final Property parent = el.parent();
                   
                    if( parent != null )
                    {
                        el = parent.element();
                    }
                }
            }
           
            if( row != null )
View Full Code Here

                final Property parent = modelElement.parent();               
                if( parent == null )
                {
                    throw new RuntimeException("Invalid model path: " + endpointPath);
                }
                return resolveEndpoint(parent.element(), endpointPath.tail());               
            }
            else
            {
                throw new RuntimeException("Invalid model path: " + endpointPath);
            }
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.