How to open Database Menu or Dialog programmatically?
Answered
I Have a Button, how can I click my button to open Database New Menu or Dialog?
I want invoke this menu by my button or

just open the dialog.

I tried ShowSettingsUtil#showSettingsDialog but didn't find the Configurable class.
Please sign in to leave a comment.
Hi,
You can invoke it programmatically with
com.intellij.database.view.ui.DataSourceManagerDialog.showDialog()
.You can also invoke the action
DatabaseView.LinkedDataSource.CreateDataSource
programmatically (withcom.intellij.openapi.actionSystem.ex.ActionUtil.invokeAction()
).Please note these methods are not a part of Open API, and they may be changed without preserving backward compatibility.
Thanks! I will remember your reminder.
Karol Lewandowski, follow up question. Can you also populate the dialog programmatically? Including database type, host, port and credentials
Hi,
Unfortunately, I don't see such an option.