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

Issue 474193003: Make more use of generated code in Java analysis server. (Closed)

Created:
6 years, 4 months ago by jwren
Modified:
6 years, 4 months ago
CC:
reviews_dartlang.org, ricow1, danrubel, Paul Berry
Visibility:
Public.

Description

Make more use of generated code in Java analysis server. These request/responses are now up to date with the spec: - server.status - analysis.setSubscriptions - analysis.updateContent - analysis.flushResults - analysis.highlights - analysis.navigation - analysis.overrides Type generation was updated so getters of boolean types would be isX instead of getX HighlightRegion, NavigationRegion and Outline now have the method containsInclusive generated. Occurrences now has the additional method contains(int) generated. AddContentOverlay, ChangeContentOverlay and RemoveContentOverlay no longer take a String type as an input to the type. Removal of many non-generated types defined in spec. R=brianwilkerson@google.com Committed: https://code.google.com/p/dart/source/detail?r=39512

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+914 lines, -2547 lines) Patch
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisOptions.java View 1 chunk +0 lines, -196 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java View 1 chunk +2 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServerListener.java View 3 chunks +24 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServerListenerAdapter.java View 3 chunks +13 lines, -1 line 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisService.java View 1 chunk +0 lines, -28 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisStatus.java View 1 chunk +0 lines, -58 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/ContentChange.java View 1 chunk +0 lines, -81 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/ErrorFixes.java View 1 chunk +0 lines, -43 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/GetAssistsConsumer.java View 2 chunks +5 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/GetFixesConsumer.java View 2 chunks +7 lines, -2 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/HighlightRegion.java View 1 chunk +0 lines, -29 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/HighlightType.java View 1 chunk +0 lines, -58 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/NavigationRegion.java View 1 chunk +0 lines, -36 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/Occurrences.java View 1 chunk +0 lines, -56 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/OverrideMember.java View 1 chunk +0 lines, -51 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/RefactoringApplyConsumer.java View 1 chunk +1 line, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/SearchResult.java View 2 chunks +3 lines, -1 line 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/ServerStatus.java View 1 chunk +0 lines, -52 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/SourceChange.java View 1 chunk +0 lines, -41 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/SourceEdit.java View 1 chunk +0 lines, -48 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/SourceFileEdit.java View 1 chunk +0 lines, -41 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/SourceRegion.java View 1 chunk +0 lines, -41 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java View 2 chunks +3 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java View 2 chunks +5 lines, -5 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisStatus.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/ChangeContentOverlay.java View 2 chunks +3 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java View 2 chunks +2 lines, -2 lines 1 comment Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/HighlightRegion.java View 1 chunk +4 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/NavigationRegion.java View 1 chunk +4 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Occurrences.java View 1 chunk +9 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Outline.java View 1 chunk +4 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/RemoveContentOverlay.java View 2 chunks +3 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SearchResult.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/BroadcastAnalysisServerListener.java View 3 chunks +14 lines, -7 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/ErrorFixesImpl.java View 1 chunk +0 lines, -57 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/HighlightRegionImpl.java View 1 chunk +0 lines, -50 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/NavigationRegionImpl.java View 1 chunk +0 lines, -49 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/OccurrencesImpl.java View 1 chunk +0 lines, -89 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/OverrideMemberImpl.java View 1 chunk +0 lines, -38 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/SearchResultImpl.java View 3 chunks +5 lines, -3 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/SourceChangeImpl.java View 1 chunk +0 lines, -57 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/SourceEditImpl.java View 1 chunk +0 lines, -82 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/SourceFileEditImpl.java View 1 chunk +0 lines, -57 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/SourceRegionImpl.java View 1 chunk +0 lines, -76 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImpl.java View 6 chunks +16 lines, -23 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/AnalysisErrorsProcessor.java View 1 chunk +2 lines, -5 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/AssistsProcessor.java View 2 chunks +4 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/FixesProcessor.java View 2 chunks +3 lines, -26 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/HoverProcessor.java View 1 chunk +2 lines, -15 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/JsonProcessor.java View 5 chunks +1 line, -98 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisErrorsProcessor.java View 1 chunk +1 line, -1 line 0 comments Download
A + editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisFlushResultsProcessor.java View 1 chunk +11 lines, -7 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisHighlightsProcessor.java View 2 chunks +2 lines, -21 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisNavigationProcessor.java View 2 chunks +2 lines, -30 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisOccurrencesProcessor.java View 2 chunks +6 lines, -24 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisOutlineProcessor.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisOverridesProcessor.java View 2 chunks +6 lines, -27 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java View 2 chunks +4 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerStatusProcessor.java View 2 chunks +2 lines, -5 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/RefactoringApplyProcessor.java View 2 chunks +2 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/TypeHierarchyProcessor.java View 1 chunk +2 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/utilities/RequestUtilities.java View 6 chunks +13 lines, -56 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/MockAnalysisServer.java View 1 chunk +2 lines, -0 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/HighlightRegionImplTest.java View 1 chunk +0 lines, -35 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/NavigationRegionImplTest.java View 1 chunk +0 lines, -47 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/SearchResultImplTest.java View 1 chunk +0 lines, -38 lines 0 comments Download
D editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/SourceRegionImplTest.java View 1 chunk +0 lines, -59 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/TestAll.java View 1 chunk +0 lines, -4 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/TestAnalysisServerListener.java View 7 chunks +27 lines, -19 lines 0 comments Download
M editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/asserts/NavigationRegionsAssert.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java View 23 chunks +462 lines, -405 lines 2 comments Download
M editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/timing/AnalyzeEngineInServer.java View 3 chunks +11 lines, -8 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/model/AnalysisServerData.java View 1 chunk +4 lines, -4 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/model/AnalysisServerHighlightsListener.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/model/AnalysisServerOverridesListener.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/analysis/model/AnalysisServerDataImpl.java View 3 chunks +13 lines, -14 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/analysis/model/WorkspaceAnalysisServerListener.java View 4 chunks +12 lines, -7 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java View 3 chunks +5 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/search/ui/SearchResultPage_NEW.java View 1 chunk +3 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/actions/NewSelectionConverter.java View 2 chunks +5 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartReconcilingStrategy.java View 4 chunks +16 lines, -10 lines 1 comment Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartElementHyperlinkDetector.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartNavigationRegionHyperlink_NEW.java View 3 chunks +5 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/MarkOccurrencesManager_NEW.java View 2 chunks +2 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/OverrideIndicatorManager.java View 2 chunks +2 lines, -2 lines 1 comment Download
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java View 3 chunks +78 lines, -71 lines 0 comments Download
M pkg/analysis_server/tool/spec/codegen_analysis_server.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/analysis_server/tool/spec/codegen_java_types.dart View 8 chunks +68 lines, -10 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jwren
Sorry for the big CL- couldn't upload during flight. There is an inconsistency right now ...
6 years, 4 months ago (2014-08-24 11:25:33 UTC) #1
Brian Wilkerson
LGTM > I propose we make the API consistent by having the listener pass on ...
6 years, 4 months ago (2014-08-24 11:53:54 UTC) #2
Paul Berry
lgtm https://codereview.chromium.org/474193003/diff/1/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java File editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java (right): https://codereview.chromium.org/474193003/diff/1/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java#newcode76 editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java:76: String type = jsonObject.get("type").getAsString(); Since the type is ...
6 years, 4 months ago (2014-08-24 12:10:38 UTC) #3
jwren
Committed patchset #2 manually as 39512 (presubmit successful).
6 years, 4 months ago (2014-08-24 12:18:01 UTC) #4
scheglov
6 years, 4 months ago (2014-08-24 17:18:27 UTC) #5
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
File
editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java
(right):

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java:263:
public Boolean isIsDeprecated() {
Could we not to generate additional "is" if a boolean flag's name already starts
with the "is" prefix?

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
File
editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
(right):

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java:295:
assertEquals(new Integer(1), error.getOffset());
Why do we need to wrap ints into Integers?
Aren't we going to make most of the methods (where value is not optional) return
ints soon?

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
File
editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartReconcilingStrategy.java
(right):

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartReconcilingStrategy.java:343:
AddContentOverlay change = new AddContentOverlay(code);
We need also to use RemoveContentOverlay at some point.

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
File
editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/OverrideIndicatorManager.java
(right):

https://codereview.chromium.org/474193003/diff/20001/editor/tools/plugins/com...
editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/OverrideIndicatorManager.java:320:
com.google.dart.server.generated.types.Element superElement =
override.getSuperclassMember().getElement();
"superclassMember" is optional, so probably we may get an NPE here.

Powered by Google App Engine
This is Rietveld 408576698