Examples of runWithEvent()


Examples of org.eclipse.jface.action.IAction.runWithEvent()

               
                Event event = new Event();
                event.widget = ti;
                event.x = e.x;
                event.y = e.y;
                action.runWithEvent(event);
            }
        })
        return this;
    }
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

        event.display=Display.getCurrent();
        copyAction.runWithEvent(event);

        ApplicationGISInternal.getActiveEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(layer));
       
        pasteAction.runWithEvent(event);
       
        final FeatureSource<SimpleFeatureType, SimpleFeature> fs = layer.getResource(FeatureSource.class, new NullProgressMonitor());
       
        UDIGTestUtil.inDisplayThreadWait( 4000, new WaitCondition(){
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

    @Test
    public void testGetCreateAttributeAction() throws Exception {
        IAction action = editor.getCreateAttributeAction();

        assertNotNull( action.getId() );
        action.runWithEvent(new Event());

        editor.testingGetViewer().getInput();
        assertEquals(
                Messages.FeatureTypeEditor_newAttributeTypeDefaultName + 0, getAttributeDescriptor(2).getName());
        assertEquals(String.class, getAttributeDescriptor(2).getType());
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

                Messages.FeatureTypeEditor_newAttributeTypeDefaultName + 0, getAttributeDescriptor(2).getName());
        assertEquals(String.class, getAttributeDescriptor(2).getType());

        assertEquals(3, editor.testingGetViewer().getTree().getItemCount());

        action.runWithEvent(new Event());

        assertEquals(4, editor.testingGetViewer().getTree().getItemCount());
        assertEquals(
                Messages.FeatureTypeEditor_newAttributeTypeDefaultName + 1, getAttributeDescriptor(3).getName());
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

        assertNotNull( action.getId() );
       
        TreeViewer viewer = editor.testingGetViewer();
        viewer.setSelection(new StructuredSelection(featureType.getDescriptor(0)));
        action.runWithEvent(new Event());

        SimpleFeatureTypeBuilder builder = (SimpleFeatureTypeBuilder) editor.testingGetViewer().getInput();
        assertEquals(1, builder.buildFeatureType().getAttributeCount());
        assertEquals(String.class, builder.buildFeatureType().getDescriptor(0).getType().getBinding());
        assertEquals("name", builder.buildFeatureType().getDescriptor(0).getName()); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

        assertEquals(1, builder.buildFeatureType().getAttributeCount());
        assertEquals(String.class, builder.buildFeatureType().getDescriptor(0).getType().getBinding());
        assertEquals("name", builder.buildFeatureType().getDescriptor(0).getName()); //$NON-NLS-1$

        IAction create = editor.getCreateAttributeAction();
        create.runWithEvent(new Event());
        create.runWithEvent(new Event());

        assertEquals(3, builder.buildFeatureType().getAttributeCount());

        List<AttributeDescriptor> attrs = new ArrayList<AttributeDescriptor>(2);
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

        assertEquals(String.class, builder.buildFeatureType().getDescriptor(0).getType().getBinding());
        assertEquals("name", builder.buildFeatureType().getDescriptor(0).getName()); //$NON-NLS-1$

        IAction create = editor.getCreateAttributeAction();
        create.runWithEvent(new Event());
        create.runWithEvent(new Event());

        assertEquals(3, builder.buildFeatureType().getAttributeCount());

        List<AttributeDescriptor> attrs = new ArrayList<AttributeDescriptor>(2);
        attrs.add(builder.buildFeatureType().getDescriptor(1));
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

        final IAction toolAction = new Action(){
            @Override
            public void runWithEvent( Event event ) {
                IAction action = getTool(toolID, categoryID);
                if (action != null && action.isEnabled()) {
                    action.runWithEvent(event );
                }
            }
        };
        toolAction.addPropertyChangeListener(new IPropertyChangeListener(){
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

      EasyMock.replay(pageSite);
      // do set
      DesignPageSite.Helper.setSite(button, pageSite);
    }
    // run action
    action.runWithEvent(new Event());
    waitEventLoop(0);
    // verify
    EasyMock.verify(pageSite);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

Examples of org.eclipse.jface.action.IAction.runWithEvent()

      EasyMock.replay(pageSite);
      // do set
      DesignPageSite.Helper.setSite(button, pageSite);
    }
    // run action
    action.runWithEvent(new Event());
    waitEventLoop(0);
    // verify
    EasyMock.verify(pageSite);
    assertEditor(
        "public class Test implements EntryPoint {",
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.