}
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
DatasetEditor datasetEditor = getDatasetEditor(e);
if (datasetEditor == null || !datasetEditor.getActiveConnection().isConnected()) {
presentation.setEnabled(false);
} else {
DBDataset dataset = datasetEditor.getDataset();
if (dataset != null) {
boolean enabled =
!datasetEditor.isInserting() &&
!datasetEditor.isLoading();
presentation.setEnabled(enabled);
DatasetFilterManager filterManager = DatasetFilterManager.getInstance(dataset.getProject());
DatasetFilter activeFilter = filterManager.getActiveFilter(dataset);