bb.addPoint(100,100, geom2.getShell());
AcceptChangesBehaviour behaviour=new AcceptChangesBehaviour(LineString.class, false);
UndoableMapCommand command = behaviour.getCommand(handler);
command.setMap((Map) handler.getContext().getMap());
command.run(new NullProgressMonitor());
layer.getMapInternal().getEditManagerInternal().commitTransaction();
FilterFactory filterFactory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
FeatureSource<SimpleFeatureType, SimpleFeature> resource = layer.getResource(FeatureSource.class, new NullProgressMonitor());