if( value == null ){
// not a valid entry.
return;
}
TableItem tableItem=(TableItem) item;
Schema schema = new Schema();
int columnIndex = schema.getIndexOf( feature.getFeatureType(), property );
tableItem.setText(columnIndex+1, value.toString());
UndoableComposite composite = new UndoableComposite();
composite.getCommands().add(new SetEditingFlag(true));
composite.getCommands().add(
EditCommandFactory.getInstance().createSetAttributeCommand(feature, layer, property, value));
composite.getFinalizerCommands().add(new SetEditingFlag(false));
layer.getMap().sendCommandASync(composite);
}
};
final SimpleFeatureType schema = notifierLayer.getSchema();
Filter filter = Filter.INCLUDE;
final FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = notifierLayer.getResource(FeatureSource.class, null);
final List<String> queryAtts = obtainQueryAttributesForFeatureTable(schema);
//if the filter action is true, filter our results by the AOI service
if(isAOIFilter()){
filter = addAOIFilter(filter, schema.getCoordinateReferenceSystem());
}
final Query query = new DefaultQuery(schema.getName().getLocalPart(), filter, queryAtts.toArray(new String[0]));
FeatureCollection<SimpleFeatureType, SimpleFeature> featuresF = featureSource.getFeatures(query);
final FeatureCollection<SimpleFeatureType, SimpleFeature> features = featuresF;
Display.getDefault().asyncExec(new Runnable(){
public void run() {