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

Issue 485083004: Make RefactoringStatus a collection of generated RefactoringProblems. (Closed)

Created:
6 years, 4 months ago by scheglov
Modified:
6 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make RefactoringStatus a collection of generated RefactoringProblems. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=39494

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+449 lines, -600 lines) Patch
M pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart View 4 chunks +5 lines, -4 lines 0 comments Download
M pkg/analysis_server/lib/src/services/correction/status.dart View 5 chunks +167 lines, -276 lines 8 comments Download
M pkg/analysis_server/lib/src/services/refactoring/extract_local.dart View 3 chunks +5 lines, -5 lines 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart View 6 chunks +8 lines, -10 lines 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/rename_local.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M pkg/analysis_server/test/services/correction/status_test.dart View 3 chunks +81 lines, -123 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart View 2 chunks +11 lines, -11 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/extract_local_test.dart View 13 chunks +14 lines, -14 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart View 28 chunks +81 lines, -80 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart View 12 chunks +15 lines, -15 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart View 4 chunks +5 lines, -5 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/rename_import_test.dart View 3 chunks +17 lines, -17 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/rename_library_test.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/rename_local_test.dart View 11 chunks +14 lines, -14 lines 0 comments Download
M pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart View 11 chunks +16 lines, -16 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
scheglov
6 years, 4 months ago (2014-08-22 01:56:43 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/services/correction/status.dart File pkg/analysis_server/lib/src/services/correction/status.dart (right): https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/services/correction/status.dart#newcode192 pkg/analysis_server/lib/src/services/correction/status.dart:192: * guarantee as to which will be returned. ...
6 years, 4 months ago (2014-08-22 12:36:03 UTC) #2
Brian Wilkerson
LGTM https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/services/correction/status.dart File pkg/analysis_server/lib/src/services/correction/status.dart (right): https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/services/correction/status.dart#newcode19 pkg/analysis_server/lib/src/services/correction/status.dart:19: Location createLocation(AnalysisContext context, Source source, I'd like this ...
6 years, 4 months ago (2014-08-22 14:24:04 UTC) #3
scheglov
Committed patchset #1 manually as 39494 (presubmit successful).
6 years, 4 months ago (2014-08-22 14:45:45 UTC) #4
scheglov
6 years, 4 months ago (2014-08-22 14:46:13 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/...
File pkg/analysis_server/lib/src/services/correction/status.dart (right):

https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/services/correction/status.dart:19: Location
createLocation(AnalysisContext context, Source source,
On 2014/08/22 14:24:04, Brian Wilkerson wrote:
> I'd like this better if these were factory methods on Location.

Agree.
It's the next step.
I decided to do my first code generation in the next CL.

https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/services/correction/status.dart:87:
RefactoringProblemSeverity _maxSeverity(RefactoringProblemSeverity a,
On 2014/08/22 14:24:04, Brian Wilkerson wrote:
> And this should be an instance method on RefactoringProblemSeverity.

Do you mean a *static* method?
The initial values of a severity is null, because we don't have yet a problem
and there is no OK severity.

https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/services/correction/status.dart:90: return b;
On 2014/08/22 14:24:04, Brian Wilkerson wrote:
> For consistency we should return 'a' if 'b' is null.

Done.

https://codereview.chromium.org/485083004/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/services/correction/status.dart:192: * guarantee as
to which will be returned.
On 2014/08/22 12:36:03, Paul Berry wrote:
> If you don't want to make a guarantee as to which problem will be returned,
then
> it seems odd that the summary of the function (on line 189) says "Returns the
> *first* [RefactoringProblem] with the highest severity."

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698