I am not entirely sure if this issue are for Intellij or Dart Analyzer since the core issue seems to be a question about API protocol usage. But let's start here and I will move the question in case it is actually a matter for JetBrains.
Problem description
When using Intellij, we are missing type information when doing auto-completion on record members as seen in the following screenshot:
If we instead uses VSCode we can see it does provide type information about the two members of the record:
Theory of root cause
When looking at the Analysis Server API and looking at the traffic going on between Intellij and Analysis serve, I can see a difference between normal members and then record members.
If I try auto-complete a local int variable, I get something like:
I have looked at the Intellij plugin code and can't see any reference to actually usage of the returnType value on CompletionSuggestion (which are the overall type of these completions) but they do refer to returnType on the Element (which are the type of the element member on the local variable example).
I think Intellij never have considered the returnType on CompletionSuggestion for some reason but the VSCode plugin does look at this value (not checked their implementation).
Question here are then if the CompletionSuggestion for record members should contain an Element value, or should Intellij start making use of the returnType field on CompletionSuggestion.
Version information
Tested both with:
Dart 3.4.0 (stable) (Mon May 6 07:59:58 2024 -0700) on "windows_x64"
Dart 3.5.0-147.0.dev (dev) (Sat May 11 05:03:30 2024 -0700) on "windows_x64"
I am not entirely sure if this issue are for Intellij or Dart Analyzer since the core issue seems to be a question about API protocol usage. But let's start here and I will move the question in case it is actually a matter for JetBrains.
Problem description
When using Intellij, we are missing type information when doing auto-completion on record members as seen in the following screenshot:
If we instead uses VSCode we can see it does provide type information about the two members of the record:
Theory of root cause
When looking at the Analysis Server API and looking at the traffic going on between Intellij and Analysis serve, I can see a difference between normal members and then record members.
If I try auto-complete a local int variable, I get something like:
While if I try autocomplete against the record, the result are quite more simple:
I have looked at the Intellij plugin code and can't see any reference to actually usage of the
returnType
value onCompletionSuggestion
(which are the overall type of these completions) but they do refer toreturnType
on theElement
(which are the type of theelement
member on the local variable example).I think Intellij never have considered the
returnType
onCompletionSuggestion
for some reason but the VSCode plugin does look at this value (not checked their implementation).Question here are then if the
CompletionSuggestion
for record members should contain anElement
value, or should Intellij start making use of thereturnType
field onCompletionSuggestion
.Version information
Tested both with:
Intellij Dart plugin version: 241.15989.9