Commit Graph

967 Commits

Author SHA1 Message Date
danrubel 3b8b7ee7a2 suggest "deferred as" rather than "deferred"
suggest show and hide in import declaration

fixes #23967

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1276843007 .
2015-08-06 16:02:58 -07:00
Konstantin Shcheglov 65941839b7 Remove also duplicate imports.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1277983002 .
2015-08-06 12:42:30 -07:00
Brian Wilkerson 848386fddc (TBR) Add missed file
Review URL: https://codereview.chromium.org//1272273003 .
2015-08-05 08:23:43 -07:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
danrubel a6ea45883d add location to suggestions from local file
fixes #23905

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1267203002 .
2015-08-04 22:12:01 -07:00
danrubel bf05b75f43 update suggestion element return type to have type param
cleanup loadLibrary suggestion to have correct element

dartbug.com/23905

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1260593005 .
2015-08-04 22:08:55 -07:00
Konstantin Shcheglov d11b644cc5 Issue 23963. Improve to/from block/expression body with void expressions.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23963

Review URL: https://codereview.chromium.org//1267333003 .
2015-08-04 16:16:17 -07:00
Konstantin Shcheglov fbb7aedee5 WEB-17598. Name new libraries according to the Dart Style Guide.
R=brianwilkerson@google.com
BUG= https://youtrack.jetbrains.com/issue/WEB-17598
     https://github.com/dart-lang/sdk/issues/23972

Review URL: https://codereview.chromium.org//1253103007 .
2015-08-04 14:47:30 -07:00
pq d4d7e300f4 Flip .packages server support bit.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1253183015 .
2015-08-04 14:01:49 -07:00
Konstantin Shcheglov 60ab26dc30 Simplify directive's optimizer edit.
There was also a bug in computing common range.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1272013002 .
2015-08-04 13:14:27 -07:00
Konstantin Shcheglov ca28e0ff4b Forgotten test.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1259263004 .
2015-08-04 08:35:53 -07:00
Konstantin Shcheglov 92f49b892d Implementation of 'edit.organizeDirectives'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1255413003 .
2015-08-03 22:44:35 -07:00
danrubel fde3b1b335 better completions in switch statements
Closes #23527

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1255953004 .
2015-08-03 14:06:30 -07:00
danrubel e8e6cf823a fix completion replacement offset/length for invalid token in switch statement
Closes #23947

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1271723002 .
2015-08-03 14:02:40 -07:00
John McCutchan dfc35faaf9 Make exclude list also exclude contexts
- Only create a context if the directory/.packages/pubspec.yaml is not excluded.
- Add tests.

Fixes: https://github.com/dart-lang/sdk/issues/23941

R=brianwilkerson@google.com, devoncarew@google.com, paulberry@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org//1263443005 .
2015-08-03 13:54:17 -07:00
danrubel 9d5154a1fd include exported library namespace in prefixed import suggestions
Closes #23946

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1263093003 .
2015-08-03 13:52:44 -07:00
Konstantin Shcheglov 64ff591f56 Organize directives implementation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1266393002 .
2015-08-03 13:49:57 -07:00
Konstantin Shcheglov e5b4713f03 'Import library' and 'Create class' Quick Fixes for unresolved class-like name in list literals.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1269043003 .
2015-08-03 13:03:28 -07:00
Konstantin Shcheglov aa30cad380 Proposal for the 'edit.organizeDirectives' request.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23921

Review URL: https://codereview.chromium.org//1258563008 .
2015-08-03 07:59:26 -07:00
pq 88b8fb8e1e Server options handling.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1270593002 .
2015-07-30 12:58:58 -07:00
Brian Wilkerson f909ed8adf Add test for references in comments
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1256333008 .
2015-07-30 11:20:00 -07:00
Paul Berry f5dab3fd2b Convert ContextManager to recursively watch analysis roots.
Previously ContextManager watched the contents of each context folder
independently; this was redundant in the case where one context folder
was nested inside another.  Also it led to some race conditions, since
we had to examine the contents of a folder in order to determine
whether there should be a context associated with it, but we couldn't
begin watching those files for that context until after the context
was created; this left a small window of time where a change to the
files might go unnoticed.

Note that a minor functional change is introduced: if "pub list"
indicates that the package resolution for a given folder is dependent
upon a file outside that folder, we no longer watch that file for
changes.  This shouldn't be a problem, since in practice "pub list"
always lists exactly two files as dependencies, and both of those
files are inside the folder (pubspec.yaml and pubspec.lock).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1257933002 .
2015-07-26 20:56:43 -07:00
Paul Berry cdfa46faa5 Improve package root tests.
Partially fixes #23909.  Previously, these tests didn't work at all.
Now they verify that the FolderDisposition is based on the correct
package root, but they don't yet verify that the package map is
generated correctly.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1257913002 .
2015-07-26 15:08:58 -07:00
Konstantin Shcheglov 14e1cdc86c Fix for 'analysis.getNavigation' implementation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1260503002 .
2015-07-24 14:27:20 -07:00
Paul Berry 46c284abdf Stop optimizing uses of "pub list".
The use case which made this optimization necessary is now gone, and
it's getting in the way of refactoring ContextManager.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1256793006 .
2015-07-24 10:42:25 -07:00
Paul Berry 7fb62213cf Introduce FolderDisposition class hierarchy for use in ContextManagerCallback.
The new class hierarchy encapsulates the packageUriResolver and
packages parameters that were previously used in the
ContextManagerCallback API.  In a future CL, I intend to use it more
extensively within ContextManagerImpl in order to make the algorithm
for choosing contexts more declarative.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1258473003 .
2015-07-24 06:42:54 -07:00
Paul Berry 391741a2de Clean up bogus codepath in ContextManager._computePackageUriResolver.
This codepath was only exercised during unit tests and race
conditions.  The fact that it was executed during unit tests at all
was due to a bug (see #23909).  The behavior during race conditions
was incorrect (it tried to set up package resolution using a folder
that didn't exist).

This CL fixes the race condition behavior and disables the affected
tests.  In a future CL I will fix the underlying bug that caused the
unit tests to execute incorrectly, and re-enable the tests.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1253803002 .
2015-07-24 06:39:21 -07:00
Paul Berry 37bf862fe4 Get rid of ContextManager._contexts.
This data structure was redundant with the tree of contexts maintained
in ContextManager._rootInfo.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1243063003 .
2015-07-23 11:03:44 -07:00
danrubel e196c15ca1 performance measurement mods:
* apply source path translation in the order in which they are defined
* print elapse times in milliseconds
* log overlay content if server exception occurs
* simplify diagnostic port initialization
* add option to start server using new task model

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1249793007 .
2015-07-22 12:17:04 -04:00
pq f013d3868c Actual URI support for package URI resolution.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1245263002 .
2015-07-21 15:53:56 -07:00
Paul Berry e30ebf79e2 Remove redundant context lookups from option-processing code.
This required exposing the ContextInfo class for testing, but I don't think that's a problem because ContextInfo objects can't be reached through the public API of ContextManager.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1251663002 .
2015-07-21 15:06:11 -07:00
Brian Wilkerson 3d28c45311 Fix watch manager tests
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1248723002 .
2015-07-21 10:45:15 -07:00
Paul Berry 128dec84b5 Separate the API's used by ContextManager.
Previously, ContextManager had two API's: one used by analysis server
to tell the ContextManager what to do, and one used by the
ContextManager to make callbacks to analysis server in response to its
requests.  The first API was implemented in the class
AbstractContextManager, which derived from ContextManager, and the
second API was implemented in ServerContextManager, which derived from
AbstractContextManager.

In addition to causing confusion, this made it impossible to provide
an alternate implementation of ContextManager as a plug-in, since the
plug in would have had to re-implement the second API, and that would
have required accessing private implementation details of the
ContextManager.

This CL separates the API's: the first API is specified in
ContextManager and implemented in ContextManagerImpl, and the second
API is specified in ContextManagerCallbacks and implemented in
ServerContextManagerCallbacks.

In the long run I hope to eliminate the ContextManagerCallbacks class
entirely, by having the ContextManager tell its client what to do
using return values rather than callbacks.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1243893002 .
2015-07-21 10:40:57 -07:00
Konstantin Shcheglov d5d0017e21 Tweak for navigation for URIs.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1246833002 .
2015-07-20 15:07:00 -07:00
Konstantin Shcheglov 55cb93b422 Add '--useAnalysisHighlight2' option to generate version 2 of semantic highlight.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1241193002 .
2015-07-20 10:37:46 -07:00
Brian Wilkerson bc265ebe28 Implement support for watching directories containing implicitly analyzed files
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1244613004 .
2015-07-20 09:04:37 -07:00
pq 05d4206929 Server .packages support.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1242023008 .
2015-07-18 22:18:30 -07:00
John McCutchan 0300e2e9fd Make analysis_server use ignore patterns from .analysis_options file
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1234293003 .
2015-07-17 14:10:37 -07:00
John McCutchan cb5335dc4a Add a PathFilter to each context in analysis_server
BUG=
R=brianwilkerson@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org//1238173003 .
2015-07-17 12:42:57 -07:00
Brian Wilkerson 23f96f1916 Renames to move closer to the new API
R=danrubel@google.com

Review URL: https://codereview.chromium.org//1240433008 .
2015-07-17 12:20:02 -07:00
Paul Berry 2f6ebaa774 Only send "analysis.analyzedFiles" notification when the set of files changes.
R=jwren@google.com

Review URL: https://codereview.chromium.org//1233003002 .
2015-07-13 15:52:28 -07:00
Brian Wilkerson 2ffa8de794 Add notification of analyzed files
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1232393005 .
2015-07-13 15:07:33 -07:00
Brian Wilkerson 41f74711e0 (TBR) Fix a broken test
Review URL: https://codereview.chromium.org//1232913002 .
2015-07-13 12:45:56 -07:00
Brian Wilkerson 0c6872acef Hook for overriding the ContextManager and some code clean-up (with more to follow)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1223413003 .
2015-07-13 10:20:13 -07:00
Brian Wilkerson 10b7db100f Revert "Update Analysis Server highlight API and implementation."
This reverts commit 739847402b.

Rolling the wire protocol API version forward caused existing clients to break, so we're rolling it back until we can find a backward compatible way of adding the new functionality.

R=paulberry@google.com

Review URL: https://codereview.chromium.org//1236433003 .
2015-07-13 09:49:55 -07:00
Konstantin Shcheglov 3f99fc1744 Add test for 'getNavigation'.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//1229833004 .
2015-07-13 07:46:07 -07:00
Konstantin Shcheglov d7c2f4550b Issue 23640. Implement 'analysis.getNavigation' request.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23640

Review URL: https://codereview.chromium.org//1232683003 .
2015-07-10 15:31:25 -07:00
Konstantin Shcheglov 739847402b Update Analysis Server highlight API and implementation.
I think this is a good enough compromise between the existing and IDEA granilarity.

Eclipse plugin CL will follow.

(IN)VALID_STRING_ESCAPE are not implemented yet.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1227143003 .
2015-07-09 11:19:44 -07:00
John McCutchan 6ecf960c5e Move SdkExtUriResolver from analysis_server to analyzer so it can be used in analyzer_cli
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1214823003 .
2015-07-08 10:28:19 -07:00
Brian Wilkerson 27f600058e Improve propagation in binary expressions
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1226823003 .
2015-07-08 08:02:05 -07:00