@Ignore
@Test
public void testCUTPASTEFeatures() throws Exception {
ApplicationGIS.openMap(map);
UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){
public boolean isTrue() {
return ApplicationGIS.getActiveMap() != null && ApplicationGIS.getActiveMap()==map;
}
}, true);
SimpleFeature[] features = UDIGTestUtil.createDefaultTestFeatures("new", 1); //$NON-NLS-1$
IGeoResource resource = MapTests.createGeoResource(features, true);
Layer layer = map.getLayerFactory().createLayer(resource);
map.getLayersInternal().add(layer);
IAction copyAction = ApplicationGIS.getToolManager().getCOPYAction(ApplicationGISInternal.getActiveEditor());
IAction pasteAction = ApplicationGIS.getToolManager().getPASTEAction(ApplicationGISInternal.getActiveEditor());
map.getEditManagerInternal().setSelectedLayer(firstLayer);
firstLayer.setFilter( null ); // Filter.INCLUDE
AdaptingFilter filter = AdaptingFilterFactory.createAdaptingFilter(firstLayer.getFilter(), firstLayer );
StructuredSelection structuredSelection = new StructuredSelection(filter);
ApplicationGISInternal.getActiveEditor().getEditorSite().getSelectionProvider().setSelection(structuredSelection) ;
Event event = new Event();
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(){
public boolean isTrue() {
try {
return fs.getCount(Query.ALL)==11;
} catch (IOException e) {