Examples of ElementData


Examples of org.eclipse.jst.jsf.designtime.internal.view.XMLViewObjectMappingService.ElementData

                if (context != null)
                {
                    final String uri = getNamespace((Element) viewDefnObject,
                            context.getStructuredDocument());
                    final ElementData elementData = XMLViewObjectMappingService
                            .createElementData(uri, viewDefnObject
                                    .getLocalName(), context,
                                    Collections.EMPTY_MAP);
                    return ((XMLViewObjectMappingService) serviceAdapter)
                            .findViewObject(elementData);
View Full Code Here

Examples of org.eclipse.jst.jsf.designtime.internal.view.XMLViewObjectMappingService.ElementData

        if (mappedObject != null && _mappingService != null)
        {
            final String uri = _adapter.getNamespace(node, document);
            final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE
                    .getContext(document, node);
            final ElementData elementData = XMLViewObjectMappingService
                    .createElementData(uri, node.getLocalName(), context,
                            attributeToProperties);
            //Bug 269050 - IllegalArgumentException in createMapping() method
            if (elementData != null) {
              _mappingService.createMapping(elementData, mappedObject);
View Full Code Here

Examples of org.eclipse.jst.jsf.designtime.internal.view.XMLViewObjectMappingService.ElementData

        final IAdaptable serviceAdaptable = viewRoot.getServices();
        final XMLViewObjectMappingService mappingService = (XMLViewObjectMappingService) serviceAdaptable
                .getAdapter(XMLViewObjectMappingService.class);
        if (mappingService != null)
        {
            final ElementData elementData = XMLViewObjectMappingService
                    .createElementData(elementAdapter.getNamespace(),
                            elementAdapter.getLocalName(), context,
                            Collections.EMPTY_MAP);
            final ViewObject viewObject = mappingService
                    .findViewObject(elementData);
            // if the corresponding view object is a valueholder, then
            // we need to see if you think there a valid conversion
            // available
            if (viewObject instanceof ComponentInfo
                    && ((ComponentInfo) viewObject).getComponentTypeInfo() != null
                    && ((ComponentInfo) viewObject).getComponentTypeInfo()
                            .isInstanceOf(
                                    ComponentFactory.INTERFACE_VALUEHOLDER))
            {
                final ComponentInfo component = (ComponentInfo) viewObject;
                // get the original elementData
                final ElementData mappedElementData = mappingService
                        .findElementData(component);
                final String propName = mappedElementData
                        .getPropertyName(attrAdapter.getLocalName());
                if ("value".equals(propName)) //$NON-NLS-1$
                {
                    // final List converters =
                    // component.getDecorators(ComponentFactory.CONVERTER);
View Full Code Here

Examples of org.eclipse.sapphire.ElementData

    @Test
   
    public void CopyElementData() throws Exception
    {
        final ElementData a = new ElementData( CopyTestElementRoot.TYPE );
        ElementData ac1;
        ElementData ac2;
        List<ElementData> list;
       
        a.write( "ValueProperty1", "abc" );
        a.write( "ValueProperty2", 5 );
        a.write( "ValueProperty3", null );
       
        ac1 = new ElementData( CopyTestElementChild.TYPE );
        a.write( "ImpliedElementProperty1", ac1 );
        ac1.write( "ValueProperty1", "implied-1" );
       
        ac2 = new ElementData( CopyTestElementChildEx.TYPE );
        a.write( "ImpliedElementProperty2", ac2 );
        ac2.write( "ValueProperty1", "implied-2-a" );
        ac2.write( "ValueProperty2", "implied-2-b" );
       
        ac1 = new ElementData( CopyTestElementChild.TYPE );
        a.write( "ElementProperty1", ac1 );
        ac1.write( "ValueProperty1", "element-1" );
       
        ac2 = new ElementData( CopyTestElementChildEx.TYPE );
        a.write( "ElementProperty2", ac2 );
        ac2.write( "ValueProperty1", "element-2-a" );
        ac2.write( "ValueProperty2", "element-2-b" );
       
        list = new ArrayList<ElementData>();
        a.write( "ListProperty1", list );
       
        ac1 = new ElementData( CopyTestElementChild.TYPE );
        list.add( ac1 );
        ac1.write( "ValueProperty1", "list-1-a" );
       
        ac1 = new ElementData( CopyTestElementChild.TYPE );
        list.add( ac1 );
        ac1.write( "ValueProperty1", "list-1-b" );
       
        ac1 = new ElementData( CopyTestElementChild.TYPE );
        list.add( ac1 );
        ac1.write( "ValueProperty1", "list-1-c" );
       
        list = new ArrayList<ElementData>();
        a.write( "ListProperty2", list );
       
        ac1 = new ElementData( CopyTestElementChild.TYPE );
        list.add( ac1 );
        ac1.write( "ValueProperty1", "list-2-a" );

        ac2 = new ElementData( CopyTestElementChildEx.TYPE );
        list.add( ac2 );
        ac2.write( "ValueProperty1", "list-2-b-a" );
        ac2.write( "ValueProperty2", "list-2-b-b" );
       
        ac2 = new ElementData( CopyTestElementChildEx.TYPE );
        list.add( ac2 );
        ac2.write( "ValueProperty1", "list-2-c-a" );
        ac2.write( "ValueProperty2", "list-2-c-b" );
       
        final Object t = new Object();
        a.write( "TransientProperty", t );
       
        final CopyTestElementRoot b = CopyTestElementRoot.TYPE.instantiate();
View Full Code Here

Examples of org.eclipse.sapphire.ElementData

           
            for( int i = 0; i < size; i++ )
            {
                final String qualifiedTypeName = in.readUTF();
                final ElementType type = ElementType.read( this.classLoader, qualifiedTypeName );
                final ElementData element = new ElementData( type );
                nativeToJava( in, element );
                elementsListFactory.add( element );
            }
           
            return elementsListFactory.result();
View Full Code Here

Examples of org.eclipse.sapphire.ElementData

                }
                else if( property instanceof ElementProperty )
                {
                    final String qualifiedTypeName = in.readUTF();
                    final ElementType type = ElementType.read( this.classLoader, qualifiedTypeName );
                    final ElementData child = new ElementData( type );
                    element.write( propertyName, child );
                    nativeToJava( in, child );
                }
                else if( property instanceof ListProperty )
                {
                    final ListFactory<ElementData> listFactory = ListFactory.start();
                    final int size = in.readInt();
                   
                    for( int i = 0; i < size; i++ )
                    {
                        final String qualifiedTypeName = in.readUTF();
                        final ElementType type = ElementType.read( this.classLoader, qualifiedTypeName );
                        final ElementData child = new ElementData( type );
                        listFactory.add( child );
                        nativeToJava( in, child );
                    }
                   
                    element.write( propertyName, listFactory.result() );
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.