Commit Graph

30 Commits

Author SHA1 Message Date
Konstantin Shcheglov 833795d54c Enforce use_super_parameters in analysis_server/.
Change-Id: I834e56b62df36782772e299e4279c408e9f8ec0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-15 18:13:44 +00:00
Konstantin Shcheglov 40856c14c1 Remove most trailing spaces in analysis_server/
Change-Id: Ib03564c09af974b74be893ea2d6fdf1f6669d99b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 21:50:24 +00:00
Konstantin Shcheglov f1fb297ad9 Migrate analysis_server/tool/spec
Change-Id: Ic8d7596198876d78f6628121ef0feb2fc9ea886d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-05 05:08:25 +00:00
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Paul Berry 7d3bc4862d Rename pkg/analysis_tool to pkg/analyzer_utilities.
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.

Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 17:46:30 +00:00
Brian Wilkerson 8969b1839c Enable omit_local_variable_types in analysis_server
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:58:44 +00:00
Brian Wilkerson e75c9192a1 Start converting dartdoc style in analysis_server
Change-Id: I013659a0f34dafce4c091dc534e2ab8ef0469217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135491
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 15:00:03 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Jaime Wren cf9c6134b8 Move consumerName(Request) from the analysis server generator to codegen_java.dart
Change-Id: I864a02dbba609809420479d392071af43e7931c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121807
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2019-10-16 00:06:42 +00:00
Kevin Moore ca4978e363 Add pkg:analysis_tool as an SDK-only set of utils
Reduces the API surface of pkg:analyzer that requires pkg:html

Related to https://github.com/dart-lang/sdk/issues/35802

Change-Id: Icd08d76190d6ab77cd180561cdde6df254b22557
Reviewed-on: https://dart-review.googlesource.com/c/91701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-01-31 16:52:05 +00:00
Brian Wilkerson 47e988b781 Clean up the remaining copyright notices in analysis_server
Change-Id: Iee3110f92ab0f24312ddd1eff407d2229f895321
Reviewed-on: https://dart-review.googlesource.com/c/89101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-11 15:38:56 +00:00
lambdabaa 3e8d87b59d Include request and response subscription methods to the AnalysisServer interface.
Previously in the downstream intellij-plugins repo we added the ResponseListener methods
https://github.com/JetBrains/intellij-plugins/commit/d6a6512b6ea0f1faee3cebd6c05271bed9369b99.
Mirroring them upstream in the code generation tool will ensure that the
two interface versions do not diverge. Additionally, we'd like the
ability to correlate requests and responses to do things like measuring
roundtrip times. Adding symmetric request subscription hooks to the API
will allow us to accomplish that.

R=scheglov@google.com

Change-Id: Ia940ff014ab06db7aa9335a904c0003dc1316c5a
Reviewed-on: https://dart-review.googlesource.com/c/86583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2018-12-07 19:35:17 +00:00
Peter von der Ahé eb0ec965e3 Move codegen/tools.dart to package:analyzer
Change-Id: Iab61e0dfcdd0969d1bf35e27c13c336a944d14e6
Reviewed-on: https://dart-review.googlesource.com/c/77780
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-03 07:41:43 +00:00
Brian Wilkerson 7d26ff6d4f Remove some more library directives
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
Devon Carew eb1839b8fd Minor changes to the generated spec, and display deprecated methods better.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2800283002 .
2017-04-15 13:43:36 -07:00
Paul Berry c78b4d66bb Move some of analyzer's code generation utilities into front_end.
These utilities are needed for generating the code that supports
summaries; in order to move summary logic into front_end, we will need
these code generation tools in front_end as well.

Also make a minor change to summary code generation logic so that it
talks to the file system directly rather than depending on analyzer's
file system abstraction.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2742333005 .
2017-03-14 12:30:18 -07:00
Paul Berry ac5578d03d Refactor analysis server code generation to re-use logic from analyzer.
The code generation infrastructure logic is now shared.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1431683002 .
2015-11-02 16:18:03 -08:00
danrubel d6580fd9fb generated analysis server java client code package rename
This changes the generated package name to better reflect our new home
from com.google.dart.server.generated.types
to   org.dartlang.analysis.server.protocol

BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1164683003
2015-06-04 17:29:35 -04:00
paulberry@google.com de0cb1f374 Create a new home for Java code generated by analysis server.
This code used to be generated directly into
editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated,
however now that editor is no longer part of this repository that
doesn't work anymore.

Fixes the test pkg/analysis_server/tool/spec/check_all_test.

R=danrubel@google.com

Review URL: https://codereview.chromium.org//1132673003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45646 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 16:40:04 +00:00
brianwilkerson@google.com 09b93c2416 Support code generation for other languages
R=paulberry@google.com

Review URL: https://codereview.chromium.org//863883004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43144 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 19:35:48 +00:00
jwren@google.com 36f5f8e768 Move AnalysisServer to package ...generated to indicated that the file shouldnt be changed manually.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//868183002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43119 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 20:10:03 +00:00
jwren@google.com 54727b8eca Add addStatusListener to the AnalysisServer generator.
R=keertip@google.com

Review URL: https://codereview.chromium.org//864063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43049 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 18:25:18 +00:00
jwren@google.com 473438f940 Addition of AnalysisServer.isSocketOpen for clients to know if the server is still running.
Execution of generate_all for recent changes to the analyzer spec input, and resulting changes to have editor and the java server layer compile.

R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//845973006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42787 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 21:46:59 +00:00
scheglov@google.com b8da9bc651 Format and sort analyzer and analysis_server packages.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//725143004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
jwren@google.com 9eca55332e Remove watchdog from RemoteAnalysisServerImpl
R=danrubel@google.com

Review URL: https://codereview.chromium.org//575163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40400 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 20:53:21 +00:00
jwren@google.com 9f2e374200 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

Review URL: https://codereview.chromium.org//474193003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39512 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 12:11:02 +00:00
jwren@google.com 7c370bf74c Initial code to generate the Java types from the spec. A constructor, the fields, getters, toString, and equals are all implemented. hashCode is not yet generated for each class.
This doesn't do anything with enum types.

The main source is in codegen_java_types.dart

The types are not yet used in the Java server.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//473533003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39228 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 22:37:17 +00:00
paulberry@google.com d03c364236 Add a test to verify that analysis server code generation is up to date.
This test will run on the Windows, Linux, and MacOS buildbots, so it
should help ensure that code generation works properly on all of those
platforms.

R=jwren@google.com

Review URL: https://codereview.chromium.org//469543002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39201 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 15:29:04 +00:00
jwren@google.com b685fa31ee Get the RemoteAnalysisServer to compile against the new generated AnalysisServer interface.
This disables any and all functionality that is not up to date with the current server spec.

R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//460423003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39164 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 21:14:24 +00:00
jwren@google.com 6e66a26763 Initial cut at generating the AnalysisServer.java interface. Currently this generates a commented out interface as the java server is not up to date with the spec.
This work iterates on the work that Paul started.

R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//463163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39155 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 18:33:59 +00:00