Package org.eclipse.sapphire

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


            public void write(String value) {
                ProxyResource.this.value = value;
               
                final Element element = getActualElement(true/*create*/);
                final ValueProperty property = getValueProperty();
                element.property( property ).write( value, true );
            }
        }

        @Override
        public XmlElement getXmlElement(boolean createIfNecessary) {
View Full Code Here


            return f.evaluate( this );
        }
        else if( element == this || element instanceof Element )
        {
            final Element el = ( element == this ? element() : (Element) element );
            final Property property = el.property( name );
           
            if( property != null )
            {
                final Function f = new ReadPropertyFunction( property, name, PropertyContentEvent.class )
                {
View Full Code Here

                    {
                        final Element child = ( (ElementHandle<?>) this.context ).content();
                       
                        if( child != null )
                        {
                            return child.property( name );
                        }
                       
                        return null;
                    }
                };
View Full Code Here

       
        if( ! list.isEmpty() )
        {
            final Element element = list.get( 0 );
            final ValueProperty property = (ValueProperty) element.properties().first().definition();
            final String oldValue = element.property( property ).text();
            final String newValue;
           
            if( isChecked() )
            {
                newValue = this.prefix + oldValue;
View Full Code Here

                {
                    newValue = oldValue;
                }
            }
           
            element.property( property ).write( newValue );
        }
       
        return null;
    }
   
View Full Code Here

       
        if( ! list.isEmpty() )
        {
            final Element element = list.get( 0 );
            final ValueProperty property = (ValueProperty) element.properties().first().definition();
            final String value = element.property( property ).text();
            checked = ( value != null && value.startsWith( this.prefix ) );
        }
       
        setChecked( checked );
    }
View Full Code Here

       
        this.diagramEditor = (SapphireDiagramEditorPagePart)parent();
        this.connectionDef = (IDiagramConnectionDef)super.definition();
       
        this.propertyName = this.bindingDef.getProperty().content();
        this.modelProperty = (ListProperty) element.property(this.propertyName).definition();
       
        initConnPartListener();
       
        this.templateListeners = new CopyOnWriteArraySet<DiagramConnectionTemplateListener>();
                   
View Full Code Here

                throw new RuntimeException("Invaid Model Path:" + this.originalEndpoint2Path);
            }
        }
       
        // initialize the connection parts
        ElementList<?> list = element.property(this.modelProperty);
        for( Element listEntryModelElement : list )
        {
            // check the type of connection: 1x1 connection versus 1xn connection           
            if (getConnectionType() == ConnectionType.OneToOne)
            {   
View Full Code Here

                    srcElement = list.insert();
                    setModelProperty(srcElement, srcProperty, endpoint1Value);
                }
               
                ModelPath.PropertySegment head = (ModelPath.PropertySegment)this.originalEndpoint2Path.head();
                PropertyDef connProp = srcElement.property(head.getPropertyName()).definition();
                if (!(connProp instanceof ListProperty))
                {
                    throw new RuntimeException("Expecting " + connProp.name() + " to be a list property");
                }
                // the connection is of type 1xn
View Full Code Here

                if (!(connProp instanceof ListProperty))
                {
                    throw new RuntimeException("Expecting " + connProp.name() + " to be a list property");
                }
                // the connection is of type 1xn
                ElementList<?> connList = srcElement.property((ListProperty)connProp);
                Element newElement = connList.insert();
                setModelProperty(newElement, ((ModelPath.PropertySegment)this.endpoint2Path.head()).getPropertyName(), endpoint2Value);
                StandardDiagramConnectionPart newConn = getConnectionPart(srcElement, newElement);
                if (newConn == null) {
                  newConn = createNewConnectionPart(newElement, null);
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.