Commit Graph

38 Commits

Author SHA1 Message Date
Danny Tuppeny ebb033cb72 Add signature information to spec and add basic implementation for functions
Bug: https://github.com/dart-lang/sdk/issues/27034
Change-Id: I8d3f1a9c9a824b4b80f9cfa0370a439fa897b226
Reviewed-on: https://dart-review.googlesource.com/64689
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-25 07:16:52 +00:00
Brian Wilkerson 54e241d71f Deprecate more AST API and replace uses of it
Change-Id: I6ecf17853915e4b61ee39f25d99451b78d2ba4ac
Reviewed-on: https://dart-review.googlesource.com/66401
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-24 15:51:18 +00:00
Brian Wilkerson e98334a58c Remove remaining references to propagated types and mark the members as deprecated
Change-Id: I2508bc7d6afb36a42e33f0e421f3a39f6d8b4d02
Reviewed-on: https://dart-review.googlesource.com/66142
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-22 23:47:01 +00:00
Devon Carew 17b53a2835 Test out no_implicit_casts on the analyzer source base.
Change-Id: I4eb2414d7d9bbe21883c9e5e8eca10f2eaafb465
Reviewed-on: https://dart-review.googlesource.com/62725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-28 02:20:43 +00:00
Brian Wilkerson 7e53bb0689 Add hint for optional new/const to hover
Change-Id: Id1df68e3446d24bceb96f13c92c721fafa63c859
Reviewed-on: https://dart-review.googlesource.com/48266
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-24 14:54:23 +00:00
Brian Wilkerson 1d159e7c23 Rename annotation testing methods in Element
Change-Id: I0f60b9abd3de350e62d89eac0d690a1db40316b7
Reviewed-on: https://dart-review.googlesource.com/45080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-05 17:23:48 +00:00
Brian Wilkerson a6214b3129 Remove more libraries directives from server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2894883002 .
2017-05-19 08:42:30 -07:00
Brian Wilkerson e55812a3f2 Unify the server and plugin versions of the generators
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2844273003 .
2017-04-28 07:46:29 -07:00
Brian Wilkerson 5bb9fb5f96 Guard against NPE caused by invalid code (issue 28829)
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2704933002 .
2017-02-20 09:29:14 -08:00
Konstantin Shcheglov 663b7f665e Analysis.getHover should return the field's documentation for field formal parameters.
Also return the parameter's element with completion suggestion.

R=brianwilkerson@google.com
BUG= https://github.com/flutter/flutter-intellij/issues/385

Review-Url: https://codereview.chromium.org/2681233005 .
2017-02-10 08:49:40 -08:00
Konstantin Shcheglov f4186fb463 Issue 27244. Add 'isDeprecated' to HoverInformation.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27244

Review URL: https://codereview.chromium.org/2310153002 .
2016-09-06 11:31:11 -07:00
Brian Wilkerson 7a9b2a3133 Use null aware operators to clean up code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1941793002 .
2016-05-02 08:38:46 -07:00
Konstantin Shcheglov c0d40223bf Issue 25945. Include static/propagateInvokeType for MethodInvocation names into hover.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25945

Review URL: https://codereview.chromium.org/1814893002 .
2016-03-17 10:29:10 -07:00
Brian Wilkerson 93aa6f1ecf Deprecate the generated element library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1789233002 .
2016-03-12 09:13:44 -08:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Konstantin Shcheglov e7e52ae2c0 Issue 25542. If an element does not have its own documentation, use the documentation from the overridden superclass member or an implemented interface.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25542

Review URL: https://codereview.chromium.org/1632033002 .
2016-01-25 17:09:48 -08:00
pq 1f8eddcc21 Cache element docs (and add to completions) [#23694].
This does away with the expensive call to `computeDocumentationComment` in favor of cached comments.  Notably this makes adding doc content to code completion proposals performant (and so is done here).  It should also make `dartdoc` *much* faster for doc generation since there are no more trips to disk to fetch comments  for elements (still needed for source though).

For more on the desire for docs in completions see here: https://github.com/dart-lang/sdk/issues/23694

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

Review URL: https://codereview.chromium.org/1534043002 .
2015-12-17 21:07:42 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Konstantin Shcheglov 168556a3e4 Tweaks for hover.
1. Include full signature of classes - extends, with and implements clauses.

2. Provide statis type only for variables - for all other elements the static type is always the same as in the signature.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1513943005 .
2015-12-11 14:25:46 -08:00
Brian Wilkerson 9ad256cf18 Move the wire protocol support into the public API
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398293002 .
2015-10-11 07:34:28 -07:00
Konstantin Shcheglov 0e7f4b5717 Fix hover documentation for parameters.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1384583007 .
2015-10-05 07:04:20 -07:00
Konstantin Shcheglov e6053aa135 Rollback https://codereview.chromium.org/1380223003
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1390463002 .
2015-10-04 17:07:10 -07:00
Konstantin Shcheglov 1af7b154af Issue 23694. Include 'docSummary' and 'docComplete' into CompletionSuggestion.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23694

Review URL: https://codereview.chromium.org/1380223003 .
2015-10-04 16:16:45 -07:00
Konstantin Shcheglov 3924b15d85 Remove ElementLocator.locateWithOffset altogether.
It was needed only for the old Angular implementation support, which
overlayed its own Element subclasses into normal Dart AST, for example
for string literals - names of components.

As we don't support this anymore, there is no need for the method.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1370833002 .
2015-09-25 14:57:15 -07:00
brianwilkerson@google.com 81e474c43e Clean up many generated constructors
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45676 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 19:06:12 +00:00
scheglov@google.com e154d7ac6a Tweaks for hover - local variables and methods.
1. We don't need enclosing class and library for local elements.

2. None of the elements other than methods append class name in toString(), so remove it there too.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44838 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-01 18:24:16 +00:00
scheglov@google.com 0c21dc284c Add 'containingClassDescription' to HoverInformation.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44483 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 22:05:05 +00:00
brianwilkerson@google.com cd58e290c4 Reformat
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00
brianwilkerson@google.com 94dd9d28f8 Fix a null pointer exception
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43617 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 21:55:48 +00:00
scheglov@google.com affc91a881 Issue 21552. Fixes for navigation, hover and rename in instance creation expressions.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21552

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41651 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 03:01:21 +00:00
paulberry@google.com 0c0fd777a6 Finish modifying analysis server to make use of code generation.
Generated code is used to produce the response to these requests:
- analysis.updateOptions
- analysis.updateContent
- analysis.setSubscriptions
- analysis.setPriorityFiles
- analysis.setAnalysisRoots
- server.shutdown
- server.setSubscriptions

Generated code is used to produce these requests:
- server.shutdown
- server.getVersion
- server.shutdown
- server.connected

Generated code is used to produce these notifications:
- completion.results
- analysis.overrides
- analysis.outline
- analysis.occurrences

Generated code is used to decode these notifications:
- server.status

In addition, some dead code was removed, the 'protocol.dart' and
'protocol2.dart' files were combined, and the fields Response.result,
Request.params, and Notification.params were made private (to
encourage future use of the generated code).  Also, some overly
verbose import statements were cleaned up by using "hide" rather than
"show".

R=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39516 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 10:48:16 +00:00
paulberry@google.com e18327f317 Make more use of generated code in analysis server.
The following generated classes are now used:
- CompletionRelevance
- CompletionSuggestion
- CompletionSuggestionKind
- ErrorFixes
- HighlightRegion
- HighlightRegionType
- HoverInformation
- LinkedEditGroup
- LinkedEditSuggestion
- LinkedEditSuggestionKind
- SourceChange

Generated code is used to produce these notifications:
- analysis.errors
- analysis.highlights
- analysis.navigation
- search.results
- server.error
- server.status

Generated code is used to produce the response to these requests:
- analysis.getErrors
- analysis.getHover
- edit.getAssists
- edit.getFixes
- server.getVersion

Generated code is used to handle these notifications in unit testing:
- analysis.highlights
- analysis.navigation

In addition, these methods have been removed, since they are no longer
needed:
- Notification.getParameter
- Result.setEmptyResult
- Result.setResult

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39511 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 08:39:41 +00:00
scheglov@google.com e1e1febe72 Merge two constants.dart into one.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39355 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:34:54 +00:00
paulberry@google.com 7226309842 Import analysis_services.dart into analysis_server.dart.
Having two separate packages doesn't really have any benefit, and has
the downside of forcing us to carefully avoid circular dependencies
between the two.  It makes more sense to just combine them.

This is largely a mechanical change consisting of the following renames:

1. pkg/analysis_services/lib/src/* -> pkg/analysis_server/lib/src/services/*
2. pkg/analysis_services/lib/* -> pkg/analysis_server/lib/src/services/*
3. pkg/analysis_services/test/* -> pkg/analysis_server/test/services/*

There were 4 instances where 1 and 2 created a collision:
.../services/correction/assist.dart, .../services/correction/fix.dart,
.../services/refactoring/refactoring.dart, and
.../services/search/search_engine_internal.dart.  To fix the
collision, the files coming from pkg/analysis_services/lib/src were
renamed to "..._internal.dart".

In addition, pkg/analysis_services/test/test_all.dart was modified to
call pkg/analysis_services/test/services/test_all.dart.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39349 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 20:17:49 +00:00
danrubel@google.com 256e11dd57 more progress implementing analysis server code completion
- add more properties returned by completion suggestion
- move completion suggestion into services
- move property constants into services for use by completion services
- move HasToJson into services for completion
- remove duplicate completion test

BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38418 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 02:04:49 +00:00
scheglov@google.com 1de8ecb571 Use HasToJson when set Reponse/Notification parameters.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38206 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:54:04 +00:00
scheglov@google.com 570d537b0f Update HoverInformation to include offset, length, kind.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37995 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 22:06:13 +00:00
scheglov@google.com 7f70e3186f Implementation for 'analysis.getHover'.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37952 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 17:33:22 +00:00