datasetEditor.fetchNextRecords(settings.getGeneralSettings().getFetchBlockSize().value());
}
}
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
presentation.setText("Fetch next records");
DatasetEditor datasetEditor = getDatasetEditor(e);
Project project = ActionUtil.getProject(e);
if (project != null) {
DataEditorSettings settings = DataEditorSettings.getInstance(project);
presentation.setText("Fetch next " + settings.getGeneralSettings().getFetchBlockSize().value() + " records");
}
boolean enabled =
datasetEditor != null &&
datasetEditor.getEditorTable() != null &&
datasetEditor.getActiveConnection().isConnected() &&
!datasetEditor.isInserting() &&
!datasetEditor.isLoading() &&
!datasetEditor.getEditorTable().getModel().isResultSetExhausted();
presentation.setEnabled(enabled);
}