scheglov@google.com
409fcc9d44
Fix for 'await' highlighting in for-each.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//835953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42610 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 20:01:05 +00:00
scheglov@google.com
e73e5faaad
Getters should not have parameters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//787603004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42183 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 21:04:44 +00:00
scheglov@google.com
354081528c
Update local functions methods/functions.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//770253003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42078 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 23:51:10 +00:00
scheglov@google.com
2427406da3
Fix for NPE in navigation after some incremental changes.
...
TBR
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//774543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42058 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 02:07:10 +00:00
scheglov@google.com
20d82e5135
Compressed/optimized navigation notification.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//766323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42049 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 22:21:28 +00:00
scheglov@google.com
2bcc7feba2
Remove unused methods in analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//721223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41718 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 16:27:07 +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
scheglov@google.com
1c6ddd0751
Issue 21498. Fix for navigation from instance creation with type arguments.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21498
Review URL: https://codereview.chromium.org//694383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41468 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 20:45:34 +00:00
scheglov@google.com
0463d78cfb
Semantic highlight async/await/sync/yield.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//668943004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41335 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:18:11 +00:00
scheglov@google.com
2ca4bbbd60
Support for enums semantic highlighting.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//679103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41330 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 18:39:40 +00:00
scheglov@google.com
8ae0268b39
Issue 21419. Don't create navigation region for elements without location.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21419
Review URL: https://codereview.chromium.org//661193004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41302 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-25 21:12:12 +00:00
scheglov@google.com
51fb6c5a9e
Issue 21377. Specify that navigation regions are sorted and implement it.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21377
Review URL: https://codereview.chromium.org//649853004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41261 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-23 17:18:13 +00:00
scheglov@google.com
8f337c37d1
Issue 21373. Fix for removing line info in case of exception (causes NPE in outline computer).
...
I will update analysis_server/pubspec.yaml before commit.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21373
Review URL: https://codereview.chromium.org//652903006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41235 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 20:34:31 +00:00
scheglov@google.com
89978808cd
Issue 21238. Fix for NPE in occurrences computer when FieldFormalParameterElement references unresolved field.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21238
Review URL: https://codereview.chromium.org//668763002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41215 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 21:26:09 +00:00
scheglov@google.com
b67b33f60c
Move Engine to Server element / error converters into protocol_server.dart
...
Also move the corrsponding tests.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//628023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40983 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 22:25:08 +00:00
scheglov@google.com
e9e0694e2f
Remove references to Engine classes from protocol.dart
...
R=brianwilkerson@google.com , paulberry@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//628293004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40948 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 00:24:48 +00:00
scheglov@google.com
482ecda504
Simplify conversion of empty lists to null.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//629283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40945 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 21:37:15 +00:00
paulberry@google.com
1f50bf550a
Remove special list behavior in analysis server protocol.
...
Previously, for optional lists, the absence of a list was treated by
the toJson and fromJson methods as equivalent to the presence of an
empty list. This disagreed with the API documentation in several
places and created the risk of null reference exceptions in clients.
This change makes optional lists behave just like optional fields of
any other type.
BUG=dartbug.com/21230
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//625413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40939 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 16:32:14 +00:00
scheglov@google.com
5e9ba07a3e
Fix for NPE when FieldFormalParameterElement references an unresolved field.
...
I found it (in a hard way - server died) during dogfooding.
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//616953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40820 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 17:59:16 +00:00
scheglov@google.com
a836f0f5ad
Fix for highlighting 'abstract' in ClassTypeAlias.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//612123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40777 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 17:33:55 +00:00
scheglov@google.com
40be584340
Remove unused code.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//569243003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40395 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 20:09:43 +00:00
danrubel@google.com
6a91be4ddf
convert engine element setter to completion element setter
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//578673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40362 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 23:21:57 +00:00
scheglov@google.com
80757f2511
Semantic highlighting for LABEL elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//559353003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40252 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 16:41:09 +00:00
scheglov@google.com
b67e00a59e
Issue 20894. Improve navigation regions for 'new Class.named()' expression.
...
As we discussed offline.
Rename changes will follow.
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20894
Review URL: https://codereview.chromium.org//551143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40207 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 15:52:08 +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
paulberry@google.com
10fdb7677a
Change analysis server protocol to omit empty lists when optional.
...
For object fields of type List that are marked as optional, FromJson
code automatically populates the data structure with an empty list
when the field is omitted. ToJson code automatically omits the field
when its value is an empty list.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//482573004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39507 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-23 18:03:34 +00:00
paulberry@google.com
caf0592503
Make more use of generated code in analysis server.
...
The following generated classes are now used:
- Element
- Location
- Occurrences
- Outline
- OverriddenMember
- Override
- Position
- SearchResult
- SearchResultKind
- SourceFileEdit
- TypeHierarchyItem
Generated code is used to produce the responses to these requests:
- completion.getSuggestions
- search.findElementReferences
- search.findMemberDeclarations
- search.findMemberReferences
- search.findTopLevelDeclarations
- search.getTypeHierarchy
Generated code is used to handle these notifications in unit testing:
- analysis.navigation
- analysis.occurrences
- analysis.outline
- analysis.overrides
- search.results
In addition, we no longer bother to test the JSON conversion code on
AnalysisError, since it is code generated.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//479683005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39470 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:04:06 +00:00
paulberry@google.com
1fed61127e
Introduce convenience methods into generated analysis server classes.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//492243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39453 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 15:49:35 +00:00
paulberry@google.com
c5ff06636b
Make more use of generated classes in analysis server.
...
Generated code is now used to process input JSON, and to create
requests and process responses in unit tests. In addition, the
handwritten classes for ElementKind and SourceEdit have been replaced
with the gennerated versions.
Also some dead code has been removed.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//492563002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39404 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 12:39:31 +00:00
paulberry@google.com
34699f46d5
Start using code-generated protocol classes in analysis server.
...
This updates the handlers for analysis.getErrors,
server.setSubscriptions, and analysis.setSubscriptions with simpler
versions that make use of the code-generated protocol classes, and
replaces the classes AnalysisError and AnalysisService with their
code-generated versions.
It also removes some dead code.
R=jwren@google.com
Review URL: https://codereview.chromium.org//486003003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39376 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 18:29: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
scheglov@google.com
c25a70a1d9
Fixes for the missing highlights.
...
These problems were found in https://codereview.chromium.org/463643002/
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//454843004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39140 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 14:24:01 +00:00
scheglov@google.com
cef6c26a95
Update 'analysis.override' notification to the latest spec.
...
R=brianwilkerson@google.com , jwren@google.com
BUG=
Review URL: https://codereview.chromium.org//440743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38882 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 21:21:22 +00:00
scheglov@google.com
f974128b01
Ignore 'dynamic' and 'void' elements in the occurrences computer too.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//438753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38809 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 23:48:30 +00:00
scheglov@google.com
e9719d8fcd
Ignore 'dynamic' in the navigation computer.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//433973003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38797 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 20:54:20 +00:00
scheglov@google.com
e24d5aacfc
Implementation of the 'search.getTypeHierarchy' API.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//422573003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38626 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 15:52:28 +00:00
scheglov@google.com
f96087b9c1
Drop 'errorToJson', use server's AnalysisError.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//415263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38550 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 20:21:12 +00:00
scheglov@google.com
4a722c5958
Implementation of the 'edit.getFixes' API in server.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//402333006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38473 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:45:51 +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
bd010c2cd3
Improve occurrences calculation - merge accessors, members.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//396043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38314 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 22:20:44 +00:00
scheglov@google.com
9903444d04
Include 'element' into 'search.findElementReferences' response.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//396063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38268 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 00:19:27 +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
acd4145f62
Initial implementation for 'search.findElementReferences'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//392693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38201 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 17:45:28 +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
82d67d0d87
Add highlight regions for comments.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//366163003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37992 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 20:49:50 +00:00
scheglov@google.com
64f238ba34
Implemention of the 'analysis.overrides' notification.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//364083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37971 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 03:24:27 +00:00
scheglov@google.com
179c102d78
Implementation for 'analysis.occurrences' notification.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//367973006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37954 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 18:38:01 +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