public boolean preOpen() {
DBSchemaObject object = getObject();
if (object != null) {
Project project = object.getProject();
DBContentType contentType = object.getContentType();
if (contentType == DBContentType.DATA) {
DBDataset dataset = (DBDataset) object;
DatasetFilterManager filterManager = DatasetFilterManager.getInstance(project);
DatasetFilter filter = filterManager.getActiveFilter(dataset);
if (filter == null) {
DataEditorSettings settings = DataEditorSettings.getInstance(project);
if (settings.getFilterSettings().isPromptFilterDialog()) {
int exitCode = filterManager.openFiltersDialog(dataset, true, false, settings.getFilterSettings().getDefaultFilterType());
return exitCode != DialogWrapper.CANCEL_EXIT_CODE;
}
}
}
else if (contentType.isOneOf(DBContentType.CODE, DBContentType.CODE_SPEC_AND_BODY)) {
DDLFileGeneralSettings ddlFileSettings = DDLFileSettings.getInstance(project).getGeneralSettings();
ConnectionHandler connectionHandler = object.getConnectionHandler();
boolean ddlFileBinding = connectionHandler.getSettings().getDetailSettings().isDdlFileBinding();
if (ddlFileBinding && ddlFileSettings.getLookupDDLFilesEnabled().value()) {