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

Examples of com.volantis.mcs.eclipse.common.odom.ODOMSelectionManager


    /**
     * Check that enable is false when a device layout is selected.
     */
    public void testEnableDeviceLayoutSelection() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(createCommand(getOKFormatType(),
                selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here


     * Check that enable is false when a layout and an empty format are
     * selected.
     */
    public void testEnableLayoutSelection() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(createCommand(getOKFormatType(),
                selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

    /**
     * Checks that enable is false when a multiple selection exists.
     */
    public void testEnableMultiSelect() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

     * Checks that enable is true when no constraints are violated and there
     * is just a single empty selection.
     */
    public void testEnableOK() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

    /**
     * Tests that run does the required modification
     */
    public void testRunOK() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

     * rest of javadoc inherited
     */
    protected void doTestRun(TestData data,
                             String expectedXml) throws Exception {

        ODOMSelectionManager selManager = data.getSelectionManager();
        ODOMESCountingListener listener = new ODOMESCountingListener();
        selManager.addSelectionListener(listener, null);
        super.doTestRun(data, expectedXml);
        assertEquals("One selection event was expected. ",
                numRunSelectionsExpected, listener.getCount());
        selManager.removeSelectionListener(listener, null);

    }
View Full Code Here

     * rest of javadoc inherited
     */
    protected void doTestEnable(TestData data,
                                String testName,
                                boolean expected) throws Exception {
        ODOMSelectionManager selManager = data.getSelectionManager();
        ODOMESCountingListener listener = new ODOMESCountingListener();
        selManager.addSelectionListener(listener, null);
        super.doTestEnable(data, testName, expected);
        assertEquals("No selection event was expected.",
                numEnableSelectionsExpected, listener.getCount());
        selManager.removeSelectionListener(listener, null);
    }
View Full Code Here

     */
    protected ODOMSelectionManager createSelectionManager(ODOMElement observe) {
        ODOMSelectionFilter filter = new ODOMSelectionFilter(null, null,
                new ODOMSelectionFilterConfiguration(true, false));
        filter.include(observe);
        return new ODOMSelectionManager(filter);
    }
View Full Code Here

     * @throws Exception
     * Todo Fix in new build
     */
    public void notestCutActionCommand() throws Exception {
        ODOMElement document = createDocument(SINGLE_PANE_RUN);
        ODOMSelectionManager selManager = createSelectionManager(document);
        Clipboard clipboard = new Clipboard(Display.getDefault());
        TestData data = createTestData(
                new CutActionCommand(clipboard, selManager));

        setDocument(data, document);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.common.odom.ODOMSelectionManager

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.