Commit Graph

3160 Commits

Author SHA1 Message Date
paulberry@google.com 5b45f8e762 Move PubPackageMapProvider to its own file.
This will allow clients of the AnalysisServer package to provide their
own PackageMapProvider without bringing in a dependency on dart:io.

R=brianwilkerson@google.com, rpaquay@chromium.org

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40638 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 18:09:08 +00:00
paulberry@google.com 54e1435931 Propagate future returned by _updateElementReferences().
Otherwise the Future.forEach() may complete too soon, causing the
refactoring to be returned to the client before all of the necessary
changes have been accumulated.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40637 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 17:52:43 +00:00
brianwilkerson@google.com 1f4682b962 Rework launch data
R=jwren@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40610 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 22:02:03 +00:00
scheglov@google.com 077de1fb02 'Convert Getter to Method' refactoring implementation.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40574 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 21:55:15 +00:00
scheglov@google.com 855f8364d2 Issue 20910. Add SORT_MEMBERS refactoring to the server specification.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20910

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40573 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 21:54:03 +00:00
scheglov@google.com 45d53b7df8 Replace AnalysisServerListener with Stream.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40557 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 18:35:30 +00:00
danrubel@google.com 55158383fa first cut fuzz test for analysis server
This very rough first cut drives the analysis server snapshot so that it...

- analyzes the specified source tree
- locates and 'opens' a file in that tree
- modifies the content of that file in memory without saving to disk
- requests code completions

I'm not happy with the readability of the ServerTest # test() method because of all the Future references.
I'm going to experiment with async / await to see if that can make it more readable.

There are several libraries that I pulled out of the analysis server code base and cleaned up to use
with an analysis server client. In the long run, these analysis server client libraries need to be cleaned up
so that clients can import them rather than having to do what I've done. These libraries include:

- example/server_test/bin/byte_stream_channel.dart
- example/server_test/bin/channel.dart
- example/server_test/bin/generated_protocol.dart
- example/server_test/bin/json.dart
- example/server_test/bin/protocol.dart

BUG=
R=lukechurch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40556 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 18:27:48 +00:00
scheglov@google.com 571a630d38 Move SourceReference, extract duplicate code.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40550 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 17:06:44 +00:00
scheglov@google.com c56440ec34 Integrate CONVERT_METHOD_TO_GETTER into the server.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40549 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 17:04:50 +00:00
scheglov@google.com fac2a62392 Reset refactoring manager on any analysis.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40542 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 14:56:26 +00:00
scheglov@google.com bb4bd6d889 'Convert Method to Getter' refactoring implementation.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40541 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 14:53:19 +00:00
scheglov@google.com 66c1b3aacc Issue 18296. Harden the name checks.
Don't allow to use invalid names in refactorings.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40521 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 20:53:05 +00:00
scheglov@google.com 00c0b8e164 Use MOVE_FILE refactoring to implement file rename participant in Editor.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40520 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 20:35:07 +00:00
scheglov@google.com eb0fde9cf3 Try to restore 'package:' URI reference to the file being moved.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40519 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 20:28:18 +00:00
scheglov@google.com 604a9e760d Integration of MOVE_FILE into the server and a couple of fixes.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40510 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 18:10:56 +00:00
scheglov@google.com cb8c9c654d Move file refactoring implementation.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40500 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 16:23:14 +00:00
scheglov@google.com eeb6c26d21 API proposal for the MOVE_FILE refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40499 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 16:20:29 +00:00
scheglov@google.com df85f37a29 Issue 13783. Add file from missing import.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=13783

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40482 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 00:19:54 +00:00
scheglov@google.com ac5e10b501 Push add*Edit helpers into SourceChange.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40464 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 21:20:37 +00:00
jwren@google.com c150e91cf6 Ensure for and if statements have a space after the statement keyword
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40403 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 21:31:40 +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
scheglov@google.com 3e884db043 Index and search of import prefixes.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40397 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 20:19:39 +00:00
scheglov@google.com c7a131a7d5 Churn only: move analysis notification tests.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40396 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 20:16:29 +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
scheglov@google.com bbbcddfac6 New analyzer snaphot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40394 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 20:07:57 +00:00
danrubel@google.com 70d983e570 add element to completion suggestions
suggest getter rather than field element
add test for function suggestions

BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40366 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 03:50:46 +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
danrubel@google.com 6cc9d7d887 add element to completion suggestion API
BUG=
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40360 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 23:17:24 +00:00
scheglov@google.com 7fde5deecc Send final problems even if 'validateOnly'.
Also fix for reporting duplicate 'Rename Local' shadowing warnings.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40332 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 17:48:19 +00:00
scheglov@google.com 457050dd88 Add SourceFileEdit.time field.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40329 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 17:19:37 +00:00
scheglov@google.com 620f7cf957 Rollback https://codereview.chromium.org/575613002
I'm sorry, but I'm going to rollback this change.
We discussed this offline with Brian and decided that while it looks
technically correct, it does not work well for our use cases, as well as
probably for our users.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40324 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 16:31:52 +00:00
scheglov@google.com 2208ce5587 Split refactoring problems into init, options and final.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40318 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 15:14:51 +00:00
scheglov@google.com 8ed8098a48 Issue 17389. Analyzer snapshot and server tweaks to use new ParameterElement.defaultValueCode.
This also makes Analysis Server to return hovers with parameter default values.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40298 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 01:46:27 +00:00
scheglov@google.com e823d01b65 Issue 19697. Partial fix - don't search for subclasss members.
I think it still worth to commit this CL, if nothing else,
it makes search a little faster by not searching for subclasses.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40290 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 23:34:15 +00:00
scheglov@google.com 3d6fff5735 Issue 18926. Rename refactoring for labels.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=18926

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40259 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 17:48:09 +00:00
scheglov@google.com e5a2441aa4 Search for LabelElement and icon for LABEL in Editor.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40254 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 17:03:35 +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 caf4b0476e Issue 18895. Convert an expression function body into the block function body when Extract Local.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=18895

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40250 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 15:28:31 +00:00
scheglov@google.com bab2843d3a Issue 19696. Test for potential reference to the element defined in a subclass.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19696

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40248 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 15:07:08 +00:00
scheglov@google.com 9773f61186 Add LABEL ElementKind, completion and highlighting kinds.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40247 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 15:04:52 +00:00
scheglov@google.com 3e3178ee6c Support for searching LabelElements in SearchEngine.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40245 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 15:03:01 +00:00
scheglov@google.com 7eae998b90 Issue 13029. Quick fix to create a function for a Function typed named parameter.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=13029

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40242 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 14:53:06 +00:00
scheglov@google.com 3f1f6f9e41 Issue 20892. Quick Fix 'Import Library' for type arguments.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20892

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40241 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 14:50:38 +00:00
scheglov@google.com 210a4459b2 Issue 20358. Don't report referenced names of named parameters in named expressions as possible shadowing.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20358

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40240 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 14:48:36 +00:00
danrubel@google.com a5ecdaffcc fix code completion import dart exception
BUG=dartbug.com/20893
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40238 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 12:41:41 +00:00
danrubel@google.com e7bdefffba update error handling to send response with stack trace
BUG=dartbug.com/20893
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40237 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 12:30:07 +00:00
scheglov@google.com 59eac1e533 Issue 19800. Support for inlining getters/setters.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19800

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40230 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-14 03:17:55 +00:00
scheglov@google.com 4a59e13a84 Issue 19799. Merge getter/setter pairs into fields when create missing overrides.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19799

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40220 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 21:29:09 +00:00
scheglov@google.com 8269bc67c3 Issue 19801. Fix for inlining referenced function with an expression body.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19801

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40214 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 19:41:59 +00:00
scheglov@google.com d2d8fb708e Issue 20894. Rename 'Class' when rename refactoring is activated on 'Class' in 'new Class.name()'.
To do this we need to tweak the Java version of ElementLocator and regenarate the Dart version.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40208 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 17:16:15 +00:00