Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Element.parent()


                {
                    element = element.root();
                }
                else if( segment instanceof ModelPath.ParentElementSegment )
                {
                    element = element.parent().element();
                }
                else if( segment instanceof ModelPath.PropertySegment )
                {
                    final Property property = element.property( ( (ModelPath.PropertySegment) segment ).getPropertyName() );
                   
View Full Code Here


                    xmlElement = ( (XmlResource) resource ).getXmlElement();
                }
               
                while( xmlElement == null && modElement != null )
                {
                    final Property parent = modElement.parent();
                   
                    if( parent == null )
                    {
                        modElement = null;
                    }
View Full Code Here

   
    protected boolean check( final MasterDetailsContentNodePart node )
    {
        final Element element = node.getModelElement();
       
        if( element.parent() instanceof ElementList && ! element.parent().definition().isReadOnly() )
        {
            final ISapphirePart parentPart = node.parent();
           
            if( parentPart != null && parentPart instanceof MasterDetailsContentNodePart )
            {
View Full Code Here

   
    protected boolean check( final MasterDetailsContentNodePart node )
    {
        final Element element = node.getModelElement();
       
        if( element.parent() instanceof ElementList && ! element.parent().definition().isReadOnly() )
        {
            final ISapphirePart parentPart = node.parent();
           
            if( parentPart != null && parentPart instanceof MasterDetailsContentNodePart )
            {
View Full Code Here

    @SuppressWarnings( "unchecked" )
    protected Object run( final Presentation context )
    {
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final Element element = node.getModelElement();
        final ElementList<Element> list = (ElementList<Element>) element.parent();
       
        list.moveDown( element );
       
        return null;
    }
View Full Code Here

        boolean enabled = super.computeEnabledState();
       
        if( enabled )
        {
            final Element element = getModelElement();
            final ElementList<?> list = (ElementList<?>) element.parent();
            enabled = ( list.indexOf( element ) < ( list.size() - 1 ) );
        }
       
        return enabled;
    }
View Full Code Here

{
    @Override
    protected boolean check( final MasterDetailsContentNodePart node )
    {
        final Element element = node.getModelElement();
        final Property property = element.parent();

        if( property != null && ! property.definition().isReadOnly() )
        {
            if( super.check( node ) )
            {
View Full Code Here

    @SuppressWarnings( "unchecked" )
    protected Object run( final Presentation context )
    {
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final Element element = node.getModelElement();
        final ElementList<Element> list = (ElementList<Element>) element.parent();
       
        list.moveUp( element );
       
        return null;
    }
View Full Code Here

        boolean enabled = super.computeEnabledState();
       
        if( enabled )
        {
            final Element element = getModelElement();
            final ElementList<?> list = (ElementList<?>) element.parent();
            enabled = ( list.indexOf( element ) > 0 );
        }
       
        return enabled;
    }
View Full Code Here

            {
                row = findTableRow( el );
               
                if( row == null )
                {
                    final Property parent = el.parent();
                   
                    if( parent != null )
                    {
                        el = parent.element();
                    }
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.