Skip to content

Extract substring not working with JetBrains Dart Plugin #61683

@StephenBrough

Description

@StephenBrough

When I select a substring and try either Ctrl+Alt+V, or bring up the refactor menu with Ctrl+Alt+Shift+T and select 'Introduce Variable', nothing happens. I tried both Android Studio and IntelliJ with the Dart plugin. This extraction operation does work in VSCode.

I don't know exactly where this issue may be coming from, a comment on this issue suggests an issue with the analysis server.

I'm not super familiar with the flow of how things work, but I pulled down the Dart SDK, added some logs at various points in extract_local.dart, and everything appears to be working. Unless I missed something, I'm not seeing anything reporting a fatal status. I don't see createChange() being called, seems like the IDE should be calling that at some point.

I don't see any logs from Android Studio/IntelliJ, seems to just silently fail.

To reproduce, just have any kind of local String and try extracting the sub string from it.

void main(List<String> arguments) {
  final stringTest = 'Hello Chris, welcome back';
}

Dart version: Dart SDK version: 3.9.2 (stable) (Wed Aug 27 03:49:40 2025 -0700) on "windows_x64"

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions