Package org.eclipse.sapphire.modeling

Examples of org.eclipse.sapphire.modeling.ModelPath$Segment


               
                private SapphireActionHandler getJumpHandler( final TableItem item,
                                                              final int column )
                {
                    final Element element = ( (TableRow) item.getData() ).element();
                    final ModelPath property = part.getChildProperties().get( column );
                    final PropertyEditorPart propertyEditor = part.getChildPropertyEditor( element, property );
                    final SapphireActionGroup actions = propertyEditor.getActions();
                    return actions.getAction( ACTION_JUMP ).getFirstActiveHandler();
                }
            }
View Full Code Here


        if( path == null )
        {
            throw new IllegalArgumentException();
        }
       
        return property( new ModelPath( path ) );
    }
View Full Code Here

       
        final Set<ModelPath> dependencies = new HashSet<ModelPath>();
       
        for( String str : dependenciesAsStrings )
        {
            ModelPath path = null;
           
            try
            {
                path = new ModelPath( str );
            }
            catch( ModelPath.MalformedPathException e )
            {
                Sapphire.service( LoggingService.class ).log( e );
            }
View Full Code Here

       
        this.templateListeners = new CopyOnWriteArraySet<DiagramConnectionTemplateListener>();
                   
        String endpt1PropStr = this.bindingDef.getEndpoint1().content().getProperty().content();
        String endpt2PropStr = this.bindingDef.getEndpoint2().content().getProperty().content();
        this.originalEndpoint2Path = new ModelPath(endpt2PropStr);
       
        ElementType type = this.modelProperty.getType();
        this.endpoint1Property = type.property(endpt1PropStr);
        this.endpoint2Property = type.property(this.originalEndpoint2Path);
               
        if (getConnectionType() == ConnectionType.OneToOne)
        {
            this.endpoint1Path = new ModelPath(endpt1PropStr);
            this.endpoint2Path = new ModelPath(endpt2PropStr);
            this.connListProperty = this.modelProperty;
        }
        else
        {
            ModelPath.PropertySegment head = (ModelPath.PropertySegment)this.originalEndpoint2Path.head();
            PropertyDef prop = type.property(head.getPropertyName());
            if (prop instanceof ListProperty)
            {
                this.endpoint1Path = new ModelPath("../" + endpt1PropStr);
                this.endpoint2Path = this.originalEndpoint2Path.tail();
                this.connListProperty = (ListProperty)prop;
            }
            else
            {
View Full Code Here

                handleModelPropertyChange( event );
            }
        };       
       
        String endpointPropStr = this.bindingDef.getEndpoint2().content().getProperty().content();
        this.endpointPath = new ModelPath(endpointPropStr);
       
        ElementList<Element> srcNodeList = getModelElement().property(nodeProperty);
        for (Element srcNodeModel : srcNodeList)
        {
            PropertyDef connProp = srcNodeModel.property(this.propertyName).definition();
View Full Code Here

       
        synchronized( root() )
        {
            assertNotDisposed();

            return properties( new ModelPath( path ) );
        }
    }
View Full Code Here

           
            Property property = this.propertiesByName.get( path.toLowerCase() );
           
            if( property == null )
            {
                property = property( new ModelPath( path ) );
            }
           
            return property;
        }
    }
View Full Code Here

       
        synchronized( root() )
        {
            assertNotDisposed();

            return visit( new ModelPath( path ), visitor );
        }
    }
View Full Code Here

                }
                else if( head instanceof PropertySegment )
                {
                    final String name = ( (PropertySegment) head ).getPropertyName();
                    final Property property = this.propertiesByName.get( name.toLowerCase() );
                    final ModelPath tail = path.tail();
                   
                    if( property instanceof ElementHandle )
                    {
                        final Element element = ( (ElementHandle<?>) property ).content();
                       
                        if( element != null )
                        {
                            return element.visit( tail, visitor );
                        }
                    }
                    else if( property instanceof ElementList )
                    {
                        for( Element element : (ElementList<?>) property )
                        {
                            if( ! element.visit( tail, visitor ) )
                            {
                                return false;
                            }
                        }
                    }
                   
                    return true;
                }
                else if( head instanceof TypeFilterSegment )
                {
                    final String t = type().getSimpleName();
                    boolean match = false;
                   
                    for( String type : ( (TypeFilterSegment) head ).getTypes() )
                    {
                        if( type.equalsIgnoreCase( t ) )
                        {
                            match = true;
                            break;
                        }
                    }
                   
                    if( match )
                    {
                        return visit( path.tail(), visitor );
                    }
                   
                    return true;
                }
                else if( head instanceof AllSiblingsSegment )
                {
                    final Property parent = parent();
                   
                    if( parent instanceof ElementList )
                    {
                        final ModelPath p = ( new ModelPath( parent.name() ) ).append( path.tail() );
                        return parent.element().visit( p, visitor );
                    }
                }
            }
View Full Code Here

    public final void attach( final Listener listener,
                              final String path )
    {
        assertNotDisposed();

        attach( listener, new ModelPath( path ) );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.ModelPath$Segment

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.