Commit Graph

3160 Commits

Author SHA1 Message Date
danrubel@google.com 56027f1dcb fix suggestions in class body and more common tests
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41027 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 21:00:15 +00:00
scheglov@google.com 07cf72a3ec Improve import prefix search results UI.
1. Bug fix for search on an import directive without a prefix.

2. Pretend that import prefixes are children on libraries' compilation units.

3. Icon for import prefix elements in Editor.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41024 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 20:30:49 +00:00
scheglov@google.com 68831585dd Fix for renaming import without an import prefix.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41021 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 16:25:07 +00:00
danrubel@google.com 029ed4968e binary expression suggestion fix
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41019 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 16:07:32 +00:00
paulberry@google.com 6742866101 Add "checked mode compile time error" type to analysis server API.
This avoids a crash if the analyzer detects a checked mode compile
time error.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41000 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 20:52:29 +00:00
danrubel@google.com 64db597677 import directive suggestion fix
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40999 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 20:46:22 +00:00
danrubel@google.com 5bdaa8ddcf combinator suggestion fix and more common tests
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40998 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 20:38:42 +00:00
scheglov@google.com 9bcd836cf8 Search for function to import even when reported as UNDEFINED_METHOD.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40996 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 19:35:45 +00:00
danrubel@google.com b95d052249 more common code completion tests
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40995 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 17:56:31 +00:00
danrubel@google.com e4200b55d8 add suggestions for variable declaration assignment RHS
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40991 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 13:15:35 +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 6d440417dd Remove the last external import in protocol.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40982 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 22:11:14 +00:00
danrubel@google.com e08c24ea56 show only type names in is expression RHS
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40977 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 20:24:40 +00:00
danrubel@google.com 6319b75048 cascade target fix and common test
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40970 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 18:54:34 +00:00
scheglov@google.com 53fe3d983f Issue 21233. Improve inlining strings into string interpolations.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21233

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40963 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 17:21:40 +00:00
danrubel@google.com 932218aea1 local cascade suggestion fix and move towards common tests
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40959 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 16:21:01 +00:00
danrubel@google.com 19e54e4f2b add named constructor, cascade selector suggestions and more tests
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40954 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 12:43:45 +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
brianwilkerson@google.com 623f8dd33f Stop sending launchData for non-analyzed files
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40942 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 18:56:30 +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
paulberry@google.com b4af87636b Change integration test notifications to use structured objects.
This allows us to use completions when writing code to handle server
notifications in integration tests.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40916 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 01:04:51 +00:00
scheglov@google.com 439a5a9df2 Remove from AnalysisServer the 'test_' methods which now has non-test implementations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40914 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-05 19:57:15 +00:00
lukechurch@google.com 28e388248a Add Domain handler with startup and shutdown stubs
As per discussion this is a proposal for an api to be implemented by server to notify domains that need to be called before handling requests will be started and after it has finished

BUG=
R=brianwilkerson@google.com, danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40911 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-04 21:24:34 +00:00
paulberry@google.com 1363c77a02 Change integration test send...() methods to return structured objects.
This allows us to use completions when analyzing responses from the
server in integration tests.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40909 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-04 17:37:47 +00:00
danrubel@google.com 9cc5893d3d filter undesired suggestions from prefix expression
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40908 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-04 04:32:37 +00:00
danrubel@google.com a46a5b166d suggest re-exported elements of imported libraries
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40907 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-04 03:14:28 +00:00
paulberry@google.com a5e47c8eb2 Change integration test send...() methods to use structured objects.
This is less error prone than using raw JSON, and requires less effort
when writing integration tests.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40904 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 18:52:47 +00:00
scheglov@google.com 11644f7288 Fix for the prefix/suffix diff computing.
We need to exclude a common part of a prefix/suffix.
Also, I decided not to improve diff calculation, at least in the short term.
So, I'm removing diff.dart and the TODO comment.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40903 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 17:31:55 +00:00
brianwilkerson@google.com 55107d5dc3 Initial timing framework and test for server
R=paulberry@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40902 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 17:18:42 +00:00
danrubel@google.com ef2982539d refactor library prefix suggestion generation
so the imported_computer is responsible for all suggestions
based upon import directives.

BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40900 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 16:02:36 +00:00
danrubel@google.com 206acf2715 cleanup/organize/improve completion tests
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40890 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 04:36:11 +00:00
danrubel@google.com a6ea07633d narrow imported element suggestions
This reduces the situations in which imported elements are suggested to
reduce/eliminate incorrect suggestions

BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40886 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 16:57:55 +00:00
danrubel@google.com 6f46e0296c improve completion test failure message by adding node info
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40885 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 16:30:30 +00:00
scheglov@google.com a863eecbfd Use simple prefix/suffix diff in members sorter.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40880 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 14:52:14 +00:00
scheglov@google.com 6596936e55 Fix for starting 'Rename LibraryElement' refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40866 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 03:00:32 +00:00
scheglov@google.com 099ce93ec3 Add 'Introduce new local with cast type' quick assist.
Unfortunately we still often need it in Dart, as we always need it in Java.

Type promotion does not work for "if (name is Type)" if "name" is a field,
an expression or "name" is modified _anywhere_ in the function.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40824 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 20:45:10 +00:00
scheglov@google.com 6a3f946ec4 Fix for 'Extract Local' refactoring - take into account local variable elements.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40823 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 20:16:40 +00:00
scheglov@google.com c0ff46e62f Make fields sorting stable.
Accidentally found a problem when one of the fields is moved, even though
all the fields should not. It seems to be he case because List.sort()
is not a stable sort. So, we now use offsets to compare field items.

R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40821 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 18:00:30 +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 85b466c9c6 Issue 19670. Extend the 'Create Field' Quick Fix to support getter context.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19670

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40812 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 15:18:37 +00:00
scheglov@google.com 29b292ee4c Issue 19670. 'Create field' quick fix.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19670

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40782 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 19:45:34 +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 99156246f8 Include 'potentialEdits' into refactoring feedback.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40750 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-28 18:59:00 +00:00
scheglov@google.com 5d01fcbedf Implement 'edit.sortMembers' request.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40735 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 20:09:21 +00:00
scheglov@google.com 2d00d5e2c0 Specify when 'sortMembers' will return an error.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40719 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 17:12:15 +00:00
scheglov@google.com 133a7cc20c 'Sort unit/class members' refactoring implementation.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40718 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 17:10:25 +00:00
scheglov@google.com 3bacc7ae1e Use a separate request for 'Sort members' feature, not a refactoring.
As requested in https://codereview.chromium.org/609653002/

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40713 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 15:53:47 +00:00
scheglov@google.com bc768460d4 Integrate CONVERT_GETTER_TO_METHOD refactoring into server.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40712 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 15:26:23 +00:00
scheglov@google.com f4aabfb6e1 Issue 21071. Generate posix-style relative URIs.
But parse using the target file system's Context.

R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21071

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40655 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 22:22:57 +00:00