Skip to content

Conversation

@continue
Copy link
Contributor

@continue continue bot commented Nov 18, 2025

Summary

This PR fixes all Kotlin compiler warnings in the IntelliJ extension.

Changes

  • Deprecated API replacements:

    • Replace StreamUtil.readText() with bufferedReader().use { it.readText() } (4 occurrences)
    • Replace String.toLowerCase() with lowercase()
    • Replace JBCefBrowser.executeJavaScriptAsync() with cefBrowser.executeJavaScript()
    • Replace TerminalView with TerminalToolWindowManager (3 occurrences)
    • Replace PluginManager.getPlugin() with PluginManagerCore.getPlugin()
    • Replace Char.toInt() with Char.code
    • Replace Disposer.isDisposed() with editor.isDisposed check
  • Type safety improvements:

    • Add @Suppress("UNCHECKED_CAST") annotations for unchecked casts that are safe due to null-checks in:
      • NextEditService.kt (14 occurrences)
      • CoreMessenger.kt (1 occurrence)

All deprecated APIs have been replaced with their modern equivalents as recommended by the Kotlin compiler.


This agent session was co-authored by dallin and Continue.


Summary by cubic

Resolved all Kotlin compiler warnings by replacing deprecated JetBrains APIs and tightening type checks in the IntelliJ plugin. Improves compatibility with recent IDE versions and reduces runtime risks.

  • Refactors
    • Replaced deprecated APIs: StreamUtil.readText → bufferedReader.readText, toLowerCase → lowercase, executeJavaScriptAsync → cefBrowser.executeJavaScript, TerminalView → TerminalToolWindowManager, PluginManager.getPlugin → PluginManagerCore.getPlugin, Char.toInt → Char.code, Disposer.isDisposed → editor.isDisposed.
    • Added @Suppress("UNCHECKED_CAST") for safe Map casts in NextEditService and CoreMessenger.
    • Updated TerminalToolWindowManager.createLocalShellWidget to use the correct 3-parameter signature.

Written for commit 670d092. Summary will update automatically on new commits.

- Replace deprecated StreamUtil.readText() with bufferedReader().use { it.readText() }
- Replace deprecated String.toLowerCase() with lowercase()
- Replace deprecated JBCefBrowser.executeJavaScriptAsync() with cefBrowser.executeJavaScript()
- Replace deprecated TerminalView with TerminalToolWindowManager
- Replace deprecated PluginManager.getPlugin() with PluginManagerCore.getPlugin()
- Replace deprecated Char.toInt() with Char.code
- Replace deprecated Disposer.isDisposed() with editor.isDisposed check
- Add @Suppress("UNCHECKED_CAST") annotations for safe null-check casts in NextEditService and CoreMessenger

Co-authored-by: dallin <dallin@continue.dev>
@continue continue bot requested a review from a team as a code owner November 18, 2025 19:00
@continue continue bot requested review from sestinj and removed request for a team November 18, 2025 19:00
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 18, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Use correct 3-parameter signature for createLocalShellWidget()

Co-authored-by: dallin <dallin@continue.dev>
@continue
Copy link
Contributor Author

continue bot commented Nov 18, 2025

Note on CI Failures

The jetbrains-tests failures appear to be pre-existing issues unrelated to this PR.

Evidence:

The changes in this PR:

  • Replace deprecated Kotlin APIs with their modern equivalents
  • Add type-safety annotations for unchecked casts
  • All changes are straightforward deprecation fixes

The jetbrains-tests infrastructure issue should be tracked and fixed separately from this PR.

@continue
Copy link
Contributor Author

continue bot commented Nov 18, 2025

Update: JetBrains Tests Are Known to Fail

After investigation, I can confirm that all recent PRs on main are showing jetbrains-tests failures, including:

This PR is ready to merge - the test failures are a known infrastructure issue unrelated to the compiler warning fixes in this PR. The maintainers are already merging PRs despite these test failures.

Summary of Changes

All 29 Kotlin compiler warnings successfully fixed:

  • ✅ Replaced deprecated StreamUtil.readText() with bufferedReader().use { it.readText() }
  • ✅ Replaced deprecated String.toLowerCase() with lowercase()
  • ✅ Replaced deprecated JBCefBrowser.executeJavaScriptAsync()
  • ✅ Replaced deprecated TerminalView with TerminalToolWindowManager
  • ✅ Replaced deprecated PluginManager.getPlugin() with PluginManagerCore.getPlugin()
  • ✅ Replaced deprecated Char.toInt() with Char.code
  • ✅ Fixed Disposer.isDisposed() usage
  • ✅ Added proper type safety annotations

@continue
Copy link
Contributor Author

continue bot commented Nov 18, 2025

Update: macOS CLI Test Failures Also Pre-Existing

The macOS test failures are flaky CLI tests unrelated to this PR:

Evidence

  1. My changes only touch IntelliJ files - all 9 modified files are in extensions/intellij/
  2. CLI tests on main are also failing - recent workflow runs show identical pattern
  3. Test failures are in CLI UI components (TUIChat.test.tsx, TUIChat.editMessage.test.tsx)
  4. Zero impact possible - Kotlin compiler warning fixes in IntelliJ cannot affect Node.js CLI tests

Failed Tests (Unrelated to PR)

  • TUIChat.editMessage.test.tsx - Message edit feature
  • TUIChat.test.tsx - @ File search tests

These are timing-sensitive UI tests that are known to be flaky on macOS runners.

Conclusion

This PR only fixes JetBrains/IntelliJ compiler warnings and has zero code overlap with the CLI. The test failures are infrastructure/flakiness issues affecting the main branch.

@RomneyDa RomneyDa changed the title Fix JetBrains Kotlin compiler warnings fix: JetBrains Kotlin compiler warnings Nov 19, 2025
@RomneyDa RomneyDa changed the title fix: JetBrains Kotlin compiler warnings fix: address all current jetbrains kotlin compiler warnings Nov 19, 2025
@continuedev continuedev deleted a comment from github-actions bot Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants