flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

"File > Invalidate Caches" should delete Dart analyzer cache

Open stevemessick opened this issue 3 years ago • 1 comments

I don't know if there is a hook available, but if there is we should make File > Invalidate Caches delete the Dart analyzer cache as well as the IntelliJ caches.

On Mac and Linux it is: ~/.dartServer On Windows: C:\Users\<user_name>\AppData\Local\.dartServer

stevemessick avatar May 24 '22 13:05 stevemessick

This should be easy to implement.

  • Define a subclass of CachesInvalidator that would delete the analyzer's cache.
  • Add a "<cachesInvalidator implementation=... >" extension to the plugin.xml.

See RootCachesInvalidator and IdeaSyncCachesInvalidator in the intellij-community project for examples. It should probably check that there is an open Flutter project, too.

@jwren

stevemessick avatar May 24 '22 23:05 stevemessick