Skip to content

Remove usages of deprecated API in DatabaseAuthProvider #5774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

asedunov
Copy link

@asedunov asedunov commented Jun 2, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

DataGrip team is making changes in DatabaseAuthProvider API, so we'd like to cleaning up usages of deprecated API in third-party plugins. This PR makes sure that DatabaseAuthProvider implementations in AWS Toolkit are up-to-date

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@asedunov asedunov requested a review from a team as a code owner June 2, 2025 13:34
import software.aws.toolkits.resources.message
import javax.swing.JPanel

abstract class AwsAuthWidget(private val userFieldEnabled: Boolean = true) : DatabaseCredentialsAuthProviderUi.UserWidget() {

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal

override fun createPanel(): JPanel {
val panel = JPanel(GridLayoutManager(rowCount, columnCount))
addUserField(panel, 0)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
addUserField(panel, 0)

// Disable the user field if we treat it as immutable
myUserField.isEnabled = userFieldEnabled

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
super.reset(point, resetCredentials)
reset(point.dataSource, resetCredentials)
override fun reset(config: DatabaseConnectionPoint, resetCredentials: Boolean) {
super.reset(config, resetCredentials)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
override fun onChanged(r: Runnable) {
// Tries to set username so if we don't have one, don't set
if (userFieldEnabled) {
super.onChanged(r)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
override fun onChanged(r: Runnable) {
// Tries to set username so if we don't have one, don't set
if (userFieldEnabled) {
super.onChanged(r)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
region?.let {
regionSelector.selectedRegion = it
}
super.updateFromUrl(holder)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
region?.let {
regionSelector.selectedRegion = it
}
super.updateFromUrl(holder)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
@rli
Copy link
Contributor

rli commented Aug 5, 2025

superseded by #5945

@rli rli closed this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants