use of com.microsoft.azure.toolkit.intellij.connector.ConnectorDialog in project azure-tools-for-java by Microsoft.
the class ConnectToSQLAction method actionPerformed.
@Override
public void actionPerformed(NodeActionEvent e) {
final ConnectorDialog dialog = new ConnectorDialog(project);
final SqlServer server = this.node.getServer();
final Database database = new Database(server.id(), null);
final DatabaseResource resource = new DatabaseResource(database, DatabaseResource.Definition.SQL_SERVER);
dialog.setResource(resource);
dialog.show();
}
use of com.microsoft.azure.toolkit.intellij.connector.ConnectorDialog in project azure-tools-for-java by Microsoft.
the class ConnectToMySQLAction method actionPerformed.
@Override
public void actionPerformed(NodeActionEvent e) {
AzureSignInAction.requireSignedIn(project, () -> {
final ConnectorDialog dialog = new ConnectorDialog(project);
final MySqlServer server = this.node.getServer();
final Database database = new Database(server.id(), null);
final DatabaseResource resource = new DatabaseResource(database, DatabaseResource.Definition.AZURE_MYSQL);
dialog.setResource(resource);
dialog.show();
});
}
use of com.microsoft.azure.toolkit.intellij.connector.ConnectorDialog in project azure-tools-for-java by Microsoft.
the class IntellijStorageActionsContributor method registerHandlers.
@Override
public void registerHandlers(AzureActionManager am) {
final BiPredicate<Object, AnActionEvent> condition = (r, e) -> r instanceof AzureStorageAccount;
final BiConsumer<Object, AnActionEvent> handler = (c, e) -> CreateStorageAccountAction.createStorageAccount((e.getProject()));
am.registerHandler(ResourceCommonActionsContributor.CREATE, condition, handler);
am.<IAzureResource<?>, AnActionEvent>registerHandler(ResourceCommonActionsContributor.CONNECT, (r, e) -> r instanceof StorageAccount, (r, e) -> AzureTaskManager.getInstance().runLater(() -> {
final ConnectorDialog dialog = new ConnectorDialog(e.getProject());
dialog.setResource(new AzureServiceResource<>(((StorageAccount) r), StorageAccountResourceDefinition.INSTANCE));
dialog.show();
}));
}
Aggregations