Commit Graph

3160 Commits

Author SHA1 Message Date
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
danrubel@google.com 36dca53a87 fix path in generated comment
BUG=
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40199 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 05:03:41 +00:00
danrubel@google.com a9a2c98d53 gracefully handle internal exceptions during request
- new SERVER_ERROR response code
- return SERVER_ERROR response if exception when processing request before request can be sent
- send server.error notification if exception occurs anytime while processing request or future work triggered by request

BUG=dartbug.com/20893
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40198 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 05:01:46 +00:00
scheglov@google.com 778536d97c Issue 19682. New analyzer snapshot that fixes an inline refactoring problem.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19682

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40193 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 22:47:29 +00:00
scheglov@google.com 3120d3632f Issue 17024. Quick Fix to find imported library.
It works with both project and package libraries.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40173 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:36:04 +00:00
scheglov@google.com 14e375418b Issue 10355. Quick Fix to replace 'var' with 'dynamic'.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=10355

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40172 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:26:58 +00:00
scheglov@google.com 88c1df9734 Issue 20891. Produce Quick Fixes for annotations.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20891

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40167 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 17:36:42 +00:00
scheglov@google.com 94bab70117 Remove contexts from the index.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40153 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 15:45:12 +00:00
scheglov@google.com 2900afc0ed Use Relationship as a first key in the index store.
This significantly speeds up computing type hierarchies.
For example for List we don't have to read all the nodes (files) where it is
used as a type annotation. We read node where it IS_EXTENDED_BY and IS_IMPLEMENTED_BY.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40152 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 15:40:50 +00:00
brianwilkerson@google.com 1e5e985370 Disable tests to fix the build
Review URL: https://codereview.chromium.org//559993003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40116 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 20:49:58 +00:00
scheglov@google.com 7ac6ed2b6f Issue 20890. Fix for NPE in the 'Add show' QA.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20890

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40115 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 20:49:42 +00:00
brianwilkerson@google.com f289a1abac Fix exception in error processing; implement mapUri
R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40109 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 19:54:49 +00:00
paulberry@google.com bad1890ab3 Implement "analysis.reanalyze" in analysis server.
This is accomplished by instructing the context manager to remove all
contexts and recreate them from scratch.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40106 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 19:20:09 +00:00
danrubel@google.com 016dc1132b add code completion declared and return types
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40087 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 13:04:11 +00:00
paulberry@google.com 2c15ecefbf Avoid false positives when searching for uses of a constructor.
Since constructor invocations are statically bound, there's never a
reason to search for potential matches.  Since potential matching is
performed by name, this avoids an enormous number of false positives
in the case where the constructor is unnamed.

BUG=dartbug.com/20869
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40058 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:25:15 +00:00
jwren@google.com 83de5a8f7b New dev version of analyzer package
R=paulberry@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40056 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:13:10 +00:00
jwren@google.com 944174f36a Move package_map_provider.dart from the server to the analyzer package to be used by the command line analyzer.
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40051 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 20:36:35 +00:00
scheglov@google.com 65f95d89f4 Fix for List<Future> is not assignable to List.
Instead of pushing core.dart file, we should pre-index SDK.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40038 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 16:24:22 +00:00
scheglov@google.com 209ebe2a7f Integrate the EXTRACT_METHOD refactoring into Editor.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40034 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 14:57:41 +00:00
scheglov@google.com 16f88fe5f2 Make the generated Java class RefactoringMethodParameter mutable.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40002 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 21:37:40 +00:00
paulberry@google.com ea7f519f03 Make SdkLibrary.shortName consistently include 'dart:'
The documentation of SdkLibrary.shortName claimed that it didn't
include the 'dart:' prefix; however the implementation did include it.
The implementation of shortName in _MockSdkLibrary class (used only
for unit testing) did not include the 'dart:' prefix, causing some
unit tests to pass even though the functionality was wrong.

This change updates the docs and _MockSdkLibrary to correspond to the
implementation (the 'dart:' prefix is included).  Additionally it
fixes one usage of shortName which was expecting the 'dart:' prefix to
be absent; this was preventing quick fixes from working correctly.

In addition, the Mock SDK is modified to add a reference from
dart:core to dart:async and from dart:async to dart:math (these
dependencies exist in the real SDK).  This avoids the need for some
workarounds in unit tests.

BUG=dartbug.com/20850
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40000 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 21:02:30 +00:00
scheglov@google.com 19f017660a Return a feedback for the INLINE_METHOD refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39993 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 19:56:26 +00:00
scheglov@google.com d7f0532f29 Add feedback for INLINE_METHOD refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39992 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 19:26:52 +00:00
danrubel@google.com 611e8ca216 rename completion class
BUG=
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39987 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 18:38:36 +00:00
scheglov@google.com c0c0b51188 Send feedback for the INLINE_LOCAL_VARIABLE refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39981 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 17:33:09 +00:00
danrubel@google.com 8aeace76ec improve keyword suggestions
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39978 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 16:32:50 +00:00
scheglov@google.com 4187ed6349 Add feedback for 'Inline Local' refactoring.
Also fix for the Java client tests.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39977 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 16:29:23 +00:00
brianwilkerson@google.com 44c2892f6f Initial support for execution domain
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39974 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 16:21:16 +00:00
jwren@google.com 2eec75f67e Search domain implementation in the Remote java server, using generated types.
TypeHierarchyContentProvider_NEW.java functionality has been stubbed out as it is currently written to support the old implementation of the TypeHierarchyItem type.

Search functionality in Editor has been converted.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39949 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 04:40:46 +00:00
scheglov@google.com b66227cb7a Update RemoteAnalysisServerImpl and tests to fix the build.
TBR

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39943 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-06 03:23:23 +00:00
brianwilkerson@google.com 29341b4e5e Rename debug domain to execution
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39942 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-06 02:43:12 +00:00
paulberry@google.com a99a140173 Change analyzer package to a "-dev" version.
This will enable the analysis server to depend on the latest and
greatest analyzer without forcing that version on other analyzer
clients.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39935 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 21:34:53 +00:00
scheglov@google.com 897ba068ee Fix for no-op assist proposals.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39931 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 21:09:01 +00:00
paulberry@google.com 77a6daa667 Add error condition INVALID_OVERLAY_CHANGE to analysis server.
R=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39925 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 19:23:55 +00:00
scheglov@google.com c5251c6bd9 Integrate 'Rename' refactoring into Editor.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39923 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 19:13:18 +00:00
scheglov@google.com 3661df5b0e Include additional information into RenameFeedback.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39918 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 16:39:15 +00:00
scheglov@google.com a828b39332 Generate setters for RefactoringOptions.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39915 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 14:49:02 +00:00
scheglov@google.com ce242e4d44 Use primitive int/boolean where possible in the Java client.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39891 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 00:16:57 +00:00
scheglov@google.com 7ac61164ff Use RefactoringFeedback objects in Java.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39889 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 23:29:35 +00:00
paulberry@google.com bd54398b61 Update analysis server to depend on analyzer 0.22.4.
Analysis server relies on some files that don't exist in analyzer 0.22.0-dev.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39888 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 21:32:34 +00:00
scheglov@google.com 67cd1ab0e2 Decode RefactoringFeedback automatically.
The implementation is pretty ugly though.

1. I have to add Response into ResponseDecoder.
2. I have to hack EditGetRefactoringParams.fromRequest generation to feel the "id to kind" map.

  It would be easier if we decided to return 'kind' in responses.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39887 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 21:13:24 +00:00
scheglov@google.com 5033317a13 Split channels library.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39881 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 17:53:16 +00:00
scheglov@google.com 3ddecb8c64 Use typed RefactoringOptions in the Dart version of the protocol.
R=jwren@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39875 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 16:21:08 +00:00
paulberry@google.com 9279b9fe81 Fix error handling in analysis.getError.
Analysis.getError now has the following behaviors:

- If the file in question does not exist, or is not subject to
  analysis, a new error called GET_ERRORS_INVALID_FILE is generated.

- If the server's internal state (the set of active analysis contexts)
  changes while the query is in process, the query is transparently
  restarted; the client no longer receives a GET_ERRORS_ERROR error.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39871 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 14:34:43 +00:00
paulberry@google.com e3a2f54db8 Clarify some of the analysis server errors.
The errors GET_ERRORS_ERROR, UNANLYZED_PRIORITY_FILES, and
UNSUPPORTED_FEATURE exist for legacy reasons and should be removed
soon.  The error SERVER_ALREADY_STARTED exists for future expansion
and is not yet used.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39832 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 20:36:29 +00:00
paulberry@google.com 245168938e Merge analysis server's mocks.dart and mocks2.dart into one file.
There were competing implementations of MockAnalysisContext and
MockSource, but one of the implementations was only used in one place
(analysis_server_test.dart), so it's been switched over to use the
other implementation.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39826 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 19:45:42 +00:00
scheglov@google.com 44473cf553 Integrate INLINE_LOCAL_VARIABLE into the server.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39824 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 19:23:37 +00:00
scheglov@google.com 43b0e2d584 Use unit + offset as 'Inline Local' arguments.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39821 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 18:45:18 +00:00
scheglov@google.com dfeccd520d Integrate INLINE_METHOD into the server.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39816 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 18:32:36 +00:00
paulberry@google.com 8d8ee25cff Merge analysis_testing package into analysis_server.
Note that analysis_server already contains a file test/mocks.dart, so
the mocks.dart file from analysis_testing has been imported as
test/mocks2.dart.  I will merge these two into a single file in a
future CL.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39814 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 18:11:42 +00:00