queryAtts.add(0,ANY);
queryAtts.add(CQL);
attributeCombo.setItems(queryAtts.toArray(new String[0]));
attributeCombo.select(0);
AdaptableFeatureCollection adaptableCollection = new AdaptableFeatureCollection(features);
adaptableCollection.addAdapter(featureSource); // used to listen for changes
if( featureSource instanceof FeatureStore )
enableEditing(featureTypeCellModifier, query, adaptableCollection);
table.setFeatures(adaptableCollection);
}
private void enableEditing( final FeatureTypeCellModifier featureTypeCellModifier, final Query query, AdaptableFeatureCollection adaptableCollection ) {
adaptableCollection.addAdapter(featureTypeCellModifier);
ICellEditorListener[] keyBindingActivators=new ICellEditorListener[query.getPropertyNames().length];
for( int i = 0; i < keyBindingActivators.length; i++ ) {
keyBindingActivators[i]=new ICellEditorListener(){
public void applyEditorValue() {
ApplicationGIS.getToolManager().registerActionsWithPart(TableView.this);
}
public void cancelEditor() {
applyEditorValue();
}
public void editorValueChanged( boolean oldValidState, boolean newValidState ) {
}
};
}
adaptableCollection.addAdapter(keyBindingActivators);
}
}
);
} catch (final IOException e) {
Display.getDefault().asyncExec(new Runnable(){