Package com.volantis.mcs.eclipse.common.odom

Examples of com.volantis.mcs.eclipse.common.odom.ODOMElement.addContent()


            if (structure == FormatType.Structure.LEAF) {
                // Leaf formats have no internal structure
            } else if (structure == FormatType.Structure.SIMPLE_CONTAINER) {
                // Simple containers have an empty format placeholder for child
                // creation
                prototype.addContent(get(FormatType.EMPTY));

                // The following code block inserts default values for new
                // Formats.  This will eventually be required for all formats.
                // However at the moment we only set the following required
                // fields of the Spatial Iterators....
View Full Code Here


                ODOMElement row = (ODOMElement)factory.element(rowName);

                prototype.addContent(cols);
                cols.addContent(col);
                prototype.addContent(row);
                row.addContent(get(FormatType.EMPTY));
            } else {
                throw new IllegalArgumentException(
                    "The given format type (" + //$NON-NLS-1$
                    formatType.getTypeName() +
                    ") has an unknown structure (" + //$NON-NLS-1$
View Full Code Here

            // Ensure that the element within the standard element does
            // not itself have a StandardElementHandler in order to avoid
            // recursive change handling. The standard handler will be set
            // on the contained element if it is restored (see restore()).
            content.setStandardElementHandler(null);
            standard.addContent(content);
        }
        return standard;
    }

    /**
 
View Full Code Here

                ODOMElement newRowElement = (ODOMElement)
                        FormatPrototype.factory.element(rowName);
                // Fill each row with an empty format.
                for (int col = 0; col < colCount; col++) {
                    Element empty = FormatPrototype.get(FormatType.EMPTY);
                    newRowElement.addContent(empty);
                    selectedElements.add(empty);
                }
                // Add the new row at the correct position.
                content.add(rowPos + newRow, newRowElement);
            }
View Full Code Here

        ODOMElement root = (ODOMElement) factory.element("root");
        ODOMElement child = (ODOMElement) factory.element("child");
        ODOMText grandchild = (ODOMText) factory.text("grandchild");
        ODOMXPath path = new ODOMXPath("child/text()");

        root.addContent(child.addContent(grandchild));

        ODOMObservable deleted = path.remove(root);

        assertNotNull("The deleted grandchild should have been found",
                      deleted);
View Full Code Here

        parent2.addContent(child1b);
        parent2.addContent(child2b);

        // Create the root element and add content
        final ODOMElement rootElement = (ODOMElement) factory.element("root");
        rootElement.addContent(parent2);
        rootElement.addContent(parent1);

        // Create the content provider for the dialog.
        final class TestContentProvider
                implements ITreeContentProvider {
View Full Code Here

        parent2.addContent(child2b);

        // Create the root element and add content
        final ODOMElement rootElement = (ODOMElement) factory.element("root");
        rootElement.addContent(parent2);
        rootElement.addContent(parent1);

        // Create the content provider for the dialog.
        final class TestContentProvider
                implements ITreeContentProvider {
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.