Skip to content

Imports refactoring: changing import folder fails to update dependent classes #30294

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

Open
JFixby opened this issue Jul 31, 2017 · 0 comments
Open
Labels
area-intellij Tracking issues for the Dart IntelliJ plugin.

Comments

@JFixby
Copy link

JFixby commented Jul 31, 2017

Reproduction steps:

Example project: https://github.com/JFixby/DartImportsExample

class A located in the lib/folderA/class_a_file.dart
content:

class A {
  static String fieldF = "";
}

class C located in the lib/class_c_depends_on_a.dart depends on the A
content:

import 'package:project_a/folderA/class_a_file.dart';

class C {
  C() {
    A.fieldF;
  }
}

What was done

rename the folder lib/folderA/ to any name like lib/folderX/

What is expected

refactoring updates class C with the new path
the import should become import 'package:project_a/folderX/class_a_file.dart';

What is actually happening

no update, class see is pointing to the missing old import

Refactoring preview shows no dependent classes:

image

renaming leads to a compile error:

image

Setup

IDEA version: community 2017.2
Dart plugin: 172.3317.48

@bwilkerson bwilkerson added the area-intellij Tracking issues for the Dart IntelliJ plugin. label Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-intellij Tracking issues for the Dart IntelliJ plugin.
Projects
None yet
Development

No branches or pull requests

2 participants