private void processSelectEvent(InputEvent event, TreePath path, boolean deliberate) {
if (path != null) {
Object lastPathEntity = path.getLastPathComponent();
if (lastPathEntity instanceof DBObject) {
final DBObject object = (DBObject) lastPathEntity;
DBObjectProperties properties = object.getProperties();
if (properties.is(DBObjectProperty.EDITABLE)) {
DBSchemaObject schemaObject = (DBSchemaObject) object;
DatabaseFileSystem.getInstance().openEditor(schemaObject);
event.consume();
} else if (properties.is(DBObjectProperty.NAVIGABLE)) {
DatabaseFileSystem.getInstance().openEditor(object);
event.consume();
} else if (deliberate) {
new BackgroundTask(getProject(), "Loading Object Reference", false, false) {
protected void execute(@NotNull ProgressIndicator progressIndicator) throws InterruptedException {
final DBObject navigationObject = object.getDefaultNavigationObject();
if (navigationObject != null) {
new SimpleLaterInvocator(){
public void execute() {
navigationObject.navigate(true);
}
}.start();
}
}