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

Issue 563333002: Issue 19799. Merge getter/setter pairs into fields when create missing overrides. (Closed)

Created:
6 years, 3 months ago by scheglov
Modified:
6 years, 3 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Issue 19799. Merge getter/setter pairs into fields when create missing overrides. R=paulberry@google.com BUG= https://code.google.com/p/dart/issues/detail?id=19799 Committed: https://code.google.com/p/dart/source/detail?r=40220

Patch Set 1 #

Total comments: 4

Patch Set 2 : Tweak for number of generated elements. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -40 lines) Patch
M pkg/analysis_server/lib/src/services/correction/fix.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/correction/fix_internal.dart View 1 5 chunks +56 lines, -25 lines 0 comments Download
M pkg/analysis_server/test/services/correction/fix_test.dart View 3 chunks +45 lines, -14 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
scheglov
6 years, 3 months ago (2014-09-12 18:52:08 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/563333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right): https://codereview.chromium.org/563333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart#newcode608 pkg/analysis_server/lib/src/services/correction/fix_internal.dart:608: if (a.kind == ElementKind.GETTER) { In practice this ...
6 years, 3 months ago (2014-09-12 20:29:01 UTC) #2
scheglov
Committed patchset #2 (id:20001) manually as 40220 (presubmit successful).
6 years, 3 months ago (2014-09-12 21:29:15 UTC) #3
scheglov
6 years, 3 months ago (2014-09-12 21:29:29 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/563333002/diff/1/pkg/analysis_server/lib/src/...
File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right):

https://codereview.chromium.org/563333002/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/services/correction/fix_internal.dart:608: if
(a.kind == ElementKind.GETTER) {
On 2014/09/12 20:29:01, Paul Berry wrote:
> In practice this will work, but strictly speaking it's not a total ordering
(as
> required by sort()).  Can we do something like this instead?
> 
> int names = compareStrings(a.displayName, b.displayName);
> if (names != 0) {
>   return names;
> }
> return a.kind.ordinal - b.kind.ordinal;

We could, but I anticipate that we will want to move away from using Java enums,
so "ordinal" may go away too. So, I'd not like to introduce something what will
force us to support it.

https://codereview.chromium.org/563333002/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/services/correction/fix_internal.dart:630: // remove
this and the next elements, adjust iterator
On 2014/09/12 20:29:01, Paul Berry wrote:
> Should we also decrement numElements, so that the fix message will be
consistent
> with the number of elements added?

I considered this, and decided that I'm not sure.
Formally we implement 2 members for each field.
But I think you are right, we should say how many "physical" members will be
added.

Powered by Google App Engine
This is Rietveld 408576698