* @since 1.1.0
*/
public class EditFeatureSelectionProvider extends AbstractMapEditorSelectionProvider implements IMapEditorSelectionProvider {
public void setActiveMap( IMap map, MapPart editor ) {
AdaptableFeature selectedFeature = (AdaptableFeature) map.getEditManager().getEditFeature();
if( selectedFeature==null )
selection=new StructuredSelection();
else{
selection=new StructuredSelection(selectedFeature);
}
map.getEditManager().addListener(new IEditManagerListener(){
public void changed( EditManagerEvent event ) {
if( event.getType()== EditManagerEvent.EDIT_FEATURE ){
AdaptableFeature selectedFeature = (AdaptableFeature) event.getNewValue();
if( selectedFeature==null )
selection=new StructuredSelection();
else{
selection=new StructuredSelection(selectedFeature);
}