Skip to content

Fix IntelliJ 2026.1 EAP API Compatibility Issues#11807

Open
wangmingliang-ms wants to merge 33 commits intodevelop.nextfrom
eap/api-compat
Open

Fix IntelliJ 2026.1 EAP API Compatibility Issues#11807
wangmingliang-ms wants to merge 33 commits intodevelop.nextfrom
eap/api-compat

Conversation

@wangmingliang-ms
Copy link
Collaborator

Summary

Fixes API compatibility issues reported by verifyPlugin for IntelliJ IDEA 2026.1 EAP.

Depends on: #11806

Changes (32 commits)

Deprecated API Replacements

  • AnActionEvent factory methods -> AnActionEvent.createEvent()
  • ComponentWithBrowseButton.getButton() -> direct field access
  • UIUtil.isUnderDarcula()/isUnderWin10LookAndFeel() -> new LookAndFeel APIs
  • PluginId.findId() -> PluginId.getId()
  • BrowseFolderActionListener -> addBrowseFolderListener
  • DataContext.getData(String) -> getData(DataKey)
  • RunManagerEx.addConfiguration 4-arg -> 3-arg
  • ComponentManager.getComponent() -> getInstance()
  • LafManager.getCurrentLookAndFeel() -> getCurrentUIThemeLookAndFeel()
  • Notification/NotificationGroup constructor overloads
  • PermanentInstallationID -> JetBrainsPermanentInstallationID
  • DatabaseConnectionInterceptor.intercept() -> interceptConnection()
  • ExternalSystemTaskNotificationListenerAdapter constructor
  • TerminalView -> TerminalToolWindowManager
  • UpdateInBackground -> getActionUpdateThread override
  • HttpConfigurable usage (commented out, complex migration)
  • TextMateSettings (commented out, not critical)
  • ProjectManagerListener.projectOpened (removed)
  • JavaRunConfigurationProducerBase constructor
  • UISettings.addUISettingsListener

Scheduled-for-Removal Fixes

  • StdModuleTypes.JAVA -> ModuleTypeManager lookup
  • TreeStructureProvider.getData(Collection, String) removed

Plugin Structure Fixes

  • Registry key overrides=true for duplicate cosmos dbtools key

Reflection Reduction

  • SbtVersionOptionsPanel: replaced reflection with direct Scala companion object API
  • AzureCosmosDbAccountParamEditor: reduced from 3 reflection calls to 1

Verification Results

Category Before After
Scheduled for removal 108 11
Deprecated 350 347
Override-only 9 8

wangmingliang-ms and others added 27 commits March 12, 2026 17:29
…ent.createEvent()

Replace createFromAnAction(), createFromDataContext(), and createFromInputEvent()
with the new AnActionEvent.createEvent() API across 18 files (26 usages).
These deprecated methods are scheduled for removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use setButtonEnabled(), setButtonIcon(), addActionListener() and
isEnabled directly on the ComponentWithBrowseButton instead of
accessing the underlying button via the deprecated getButton() method,
which is scheduled for removal in IntelliJ 2026.1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…el()

Use JBColor.isBright() instead of the deprecated UIUtil.isUnderDarcula()
and UIUtil.isUnderWin10LookAndFeel() methods, which are scheduled for
removal in IntelliJ 2026.1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PluginId.findId() is scheduled for removal in IntelliJ 2026.1.
Use PluginId.getId() which has the same signature and behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…erListener

Use TextFieldWithBrowseButton.addBrowseFolderListener(Project, FileChooserDescriptor)
or addBrowseFolderListener(TextBrowseFolderListener) instead of creating
BrowseFolderActionListener instances directly. The BrowseFolderActionListener
constructor is scheduled for removal in IntelliJ 2026.1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… overload

Use noteComponent(String, Function1) instead of the single-arg overload
that is scheduled for removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…load

Use addBrowseFolderListener(Project, FileChooserDescriptor) instead of
the deprecated addBrowseFolderListener(String, String, Project, FCD)
that is scheduled for removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…(DataKey)

Use the existing ACTION_SOURCE DataKey instead of passing a raw String
to DataContext.getData(). The String-based getData is scheduled for
removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split into addConfiguration(settings) + setBeforeRunTasks() since the
4-arg addConfiguration is scheduled for removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nce()

Use ModuleRootManager.getInstance(module) instead of the deprecated
module.getComponent(ModuleRootManager.class) which is scheduled for
removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rrentUIThemeLookAndFeel()

The getCurrentLookAndFeel() method is scheduled for removal in
IntelliJ 261. Use getCurrentUIThemeLookAndFeel() instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sion

Use new Notification(groupId, content, type) with setTitle() and
setListener() instead of the deprecated 5-arg constructor that is
scheduled for removal in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…th 3-arg version

Replace createNotification(title, subtitle, content, type) with
createNotification(title, content, type) to fix scheduled-for-removal
deprecation in IntelliJ 261.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
StdModuleTypes class is removed in IntelliJ 261. Use
ModuleTypeManager.getInstance().findByID("JAVA_MODULE") instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ntInstallationID

PermanentInstallationID.get() is scheduled for removal in IntelliJ 261.
Use JetBrainsPermanentInstallationID.get() as the replacement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…h interceptConnection()

The intercept() method is deprecated with "Use coroutines" message. Replace
with interceptConnection() which is the Kotlin suspend function equivalent.
Since these are Java implementations that only do telemetry logging, return
Boolean.TRUE synchronously to indicate the connection should proceed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ng) method implementation

The getData method with String parameter is deprecated in IntelliJ 261.
Removing the custom implementation allows the default super implementation to handle data retrieval.
… constructor

Replace ExternalSystemTaskNotificationListenerAdapter() no-arg constructor with
ExternalSystemTaskNotificationListener interface for IntelliJ 261 compatibility.
Replace TerminalView.getInstance() with TerminalToolWindowManager.getInstance()
for IntelliJ 261 compatibility in SSH connection implementations.
Replace deprecated addExtraAction(AnActionButton) with addExtraAction(AnAction)
by explicitly casting to AnAction for IntelliJ 261 compatibility.
…aActions

Remove @OverRide annotation from createExtraActions() method as the base class
method signature has changed in IntelliJ 261.
…override

Replace deprecated UpdateInBackground interface with overriding
getActionUpdateThread() returning ActionUpdateThread.BGT for IntelliJ 261 compatibility.
Replace deprecated ComponentsKt.noteComponent with ContextHelpLabel.create
for IntelliJ 261 compatibility.
Temporarily disable HttpConfigurable proxy initialization due to deprecated
API. Added TODO for migration to new ProxyConfiguration API in IntelliJ 261.
…ecated getData(String)

Added support for both deprecated getData(String) and new getData(DataKey) methods
to maintain compatibility during transition period in IntelliJ 261.
Removed empty deprecated projectOpened() method implementation from
LSPProjectManagerListener for IntelliJ 261 compatibility.
Temporarily disable TextMate bundle unregistration due to deprecated
TextMateSettings API. Added TODO for migration to new API in IntelliJ 261.
wangmingliang-ms and others added 6 commits March 12, 2026 17:29
Replace deprecated JavaRunConfigurationProducerBase(ConfigurationFactory)
constructor with no-arg constructor for IntelliJ 261 compatibility.
Comment out deprecated getButton().name assignment for IntelliJ 261 compatibility.
The button name assignment is not critical for functionality.
Replace deprecated UISettings.addUISettingsListener() with message bus approach
using UISettingsListener.TOPIC for IntelliJ 261 compatibility.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
…ion in AzureCosmosDbAccountParamEditor

- SbtVersionOptionsPanel: upgrade Scala plugin dependency from 2024.2.5 to 2026.1.8,
  use Versions\$.MODULE\$.loadSbtVersions() directly instead of reflection
- AzureCosmosDbAccountParamEditor: replace 3 FieldUtils.readField() calls with 1,
  use LocalDataSource.getSslCfg().myEnabled for SSL toggle instead of drilling into
  private UI fields via reflection
- Only remaining reflection: DataInterchange.myConfigurable (no public API exists)
Base automatically changed from eap/build-support to develop.next March 13, 2026 01:31
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.

1 participant