Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Issue 606753003: Implement strict and non-strict union types in completion UI. (Closed)

Created:
6 years, 2 months ago by Nathan Collins
Modified:
6 years, 2 months ago
CC:
reviews_dartlang.org, ricow1
Visibility:
Public.

Description

Implement strict and non-strict union types in completion UI. I've included @scheglov as a reviewer because I believe he is most familiar with the completion code. The semantics of strict and non-strict union types are probably of interest to @jwren and @brianwilkerson however. This CL comprises a significant refactoring of the completion code related to computing the "names" defined on a type. The trouble is that for the strict union-type semantics we want a name to only be defined on the union type if it's defined on all member types in the union. However, the code had been structured such that it mixed the computation of possible names with adding possible names to the list of all completions. For the strict semantics we need to know all the names first and then take their intersection. So, most of the changes -- besides the union-type name logic itself -- is related to making the computation of possible completions separate from adding them to the list of completions. R=brianwilkerson@google.com, scheglov@google.com, jwren@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=40698

Patch Set 1 #

Total comments: 2

Patch Set 2 : Factor out mapping of [getName] over elements per @brianwilkerson. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -77 lines) Patch
M editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/completion/CompletionEngine.java View 1 8 chunks +188 lines, -73 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java View 2 chunks +21 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Nathan Collins
6 years, 2 months ago (2014-09-25 21:22:48 UTC) #1
Brian Wilkerson
What isn't clear to me from looking at the code or tests is what effect ...
6 years, 2 months ago (2014-09-25 21:45:04 UTC) #2
scheglov
lgtm
6 years, 2 months ago (2014-09-25 21:50:59 UTC) #3
Nathan Collins
On 2014/09/25 21:45:04, Brian Wilkerson wrote: > What isn't clear to me from looking at ...
6 years, 2 months ago (2014-09-25 22:31:18 UTC) #4
Nathan Collins
https://codereview.chromium.org/606753003/diff/1/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/completion/CompletionEngine.java File editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/completion/CompletionEngine.java (right): https://codereview.chromium.org/606753003/diff/1/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/completion/CompletionEngine.java#newcode432 editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/completion/CompletionEngine.java:432: Set<String> currentNames = new HashSet<String>(); On 2014/09/25 21:45:04, Brian ...
6 years, 2 months ago (2014-09-25 22:31:26 UTC) #5
Nathan Collins
6 years, 2 months ago (2014-09-25 22:31:55 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as 40698 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698