Commit Graph

2234 Commits

Author SHA1 Message Date
Brian Wilkerson 8c22a5f807 Format code in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1838933003 .
2016-03-29 08:27:14 -07:00
Brian Wilkerson 338c95be8c Sort the files in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1834423002 .
2016-03-28 18:25:29 -07:00
Konstantin Shcheglov c675ba270f Pass AnalysisOptions into SdkCreator, disable changing afterwards.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1830703002 .
2016-03-23 13:11:49 -07:00
Konstantin Shcheglov df5ca73f45 Fix for searching LocalVariableElement of DeclaredIdentifier.
This fixes rename refactoring of such local variables.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1828793002 .
2016-03-23 12:14:31 -07:00
Konstantin Shcheglov 5e4218b754 Issue 26063. Index declarations in even partically analyzed units.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26063

Review URL: https://codereview.chromium.org/1829463002 .
2016-03-22 17:24:17 -07:00
Konstantin Shcheglov c7531fb499 Issue 26050. Don't suggest to import an already imported (with 'show') library again.
R=pquitslund@google.com, brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26050

Review URL: https://codereview.chromium.org/1816163002 .
2016-03-21 10:21:29 -07:00
Konstantin Shcheglov 0f64fcdd6f Issue 26051. Fix for MethodDeclartion.beginToken for external.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26051

Review URL: https://codereview.chromium.org/1820743002 .
2016-03-20 15:21:03 -07:00
Jaime Wren 2a3acf94ec Fix in code completion for named parameters in constructor, method and function invocations, https://github.com/dart-lang/sdk/issues/25975
BUG=https://github.com/dart-lang/sdk/issues/25975
R=brianwilkerson@google.com, danrubel@google.com

Review URL: https://codereview.chromium.org/1806113002 .
2016-03-18 10:26:27 -07:00
Konstantin Shcheglov c0d40223bf Issue 25945. Include static/propagateInvokeType for MethodInvocation names into hover.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25945

Review URL: https://codereview.chromium.org/1814893002 .
2016-03-17 10:29:10 -07:00
Jaime Wren ecd5ddb734 Changes to test source in arglist_contributor_test.dart, to remove warnings from the source
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1804233002 .
2016-03-16 11:31:29 -07:00
Bob Nystrom cf3b9b9548 Fix analysis_server test to not expect redundant error.
R=brianwilkerson@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org/1803203002 .
2016-03-15 14:17:09 -07:00
Konstantin Shcheglov 8398960fb1 Fix visible range of local variables in 'for' loops.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1798223002 .
2016-03-14 14:43:15 -07:00
Konstantin Shcheglov 5051380a09 Fix for searching parameters of constructors.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1802023002 .
2016-03-14 14:39:54 -07:00
Brian Wilkerson e28c816855 Fix generation of getters and fields in quick fixes (issue 25691)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1804743002 .
2016-03-14 14:03:44 -07:00
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07:00
Konstantin Shcheglov feae2ba7c9 Fix the imported package library move test.
Files in package lib/ folders have package: URI scheme, so the test
should use it too.

This CL finishes fixing tests that were failing with the new index.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1800683002 .
2016-03-14 09:05:37 -07:00
Brian Wilkerson 93aa6f1ecf Deprecate the generated element library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1789233002 .
2016-03-12 09:13:44 -08:00
Konstantin Shcheglov 936722402d Fix for indexing synthetic enum fields.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1791493003 .
2016-03-12 08:54:22 -08:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Konstantin Shcheglov 222a11c290 Index unqualified unresolved used names.
This fixes one of the previously disabled tests.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1788673004 .
2016-03-11 15:10:43 -08:00
Konstantin Shcheglov 76f4578af8 Start using the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1786013004 .
2016-03-11 14:02:37 -08:00
Konstantin Shcheglov 30c49a0eab Improve used name relations and fields indexing.
I'm in the process of switching Analysis Server to the new index and
found that we need these changes to make search tests pass.
Refactorings don't need to know whether names are read or written,
but users might (or might not) want to know this.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1787803003 .
2016-03-11 10:42:01 -08:00
Konstantin Shcheglov 4e8e1e2e04 Improve search for constructors and import elements.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1778363003 .
2016-03-10 14:57:42 -08:00
Konstantin Shcheglov 5271cd3259 Fix for indexing synthetic elements.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1779233002 .
2016-03-10 10:57:08 -08:00
Brian Wilkerson 83df52b590 Move more behavior out of ContextManagerCallbacks and into ContextManager
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1784523002 .
2016-03-10 08:36:35 -08:00
Brian Wilkerson ef1c632679 Clean up some warnings (issue 25964)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1778663006 .
2016-03-09 17:32:49 -08:00
Konstantin Shcheglov 4d48fa56d0 Listen for context add/remove and unit invalidation to update the index.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1783503004 .
2016-03-09 14:52:19 -08:00
Konstantin Shcheglov 00b6f98166 Separate index objects for each analysis context.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1778113002 .
2016-03-09 13:24:12 -08:00
Brian Slesinsky ae009e0870 Fix regression for import suggestions
Imports weren't being suggested for implicit source files,
for example files from other analysis roots.

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

Review URL: https://codereview.chromium.org/1759333002 .
2016-03-09 12:59:46 -08:00
pq e7e205f00b Add error codes to server protocol (#25958).
See: https://github.com/dart-lang/sdk/issues/25958

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1774913006 .
2016-03-09 10:44:03 -08:00
pq 402f27e26d Fix enableConditionalDirectives option handling.
Net-net: we weren't copying this value over when copying context options.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1774213003 .
2016-03-09 10:01:28 -08:00
Konstantin Shcheglov 5b117e9e18 Use the fact that some index lists are sorted.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1776143002 .
2016-03-08 13:43:43 -08:00
Konstantin Shcheglov 3af20476d1 Add AnalysisContext.onResultInvalidated(descriptor).
This method will be used to remove index entries corresponding to
invalidated resolved units.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1776023002 .
2016-03-08 12:55:06 -08:00
Konstantin Shcheglov b9ee5c20eb Implement SearchEngine.searchMemberReferences().
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1768353002 .
2016-03-07 13:41:12 -08:00
Konstantin Shcheglov f2111c2497 Search for direct and indirect subclasses.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1770083002 .
2016-03-07 11:30:44 -08:00
Konstantin Shcheglov 2293a22b7f Implement searchMemberDeclarations() / searchTopLevelDeclarations().
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1770953002 .
2016-03-07 11:14:05 -08:00
Konstantin Shcheglov 8dbbb55a2e Implement search for names defined in index.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1771903002 .
2016-03-07 10:40:01 -08:00
Konstantin Shcheglov 28f8a64210 Remove SearchEngine.searchElementDeclarations().
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1769063002 .
2016-03-07 09:57:15 -08:00
pq f506639391 Back out ignore quick-fix.
As per, https://github.com/dart-lang/sdk/issues/25926, we'll migrate this behavior to the IDE side.

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1770733002 .
2016-03-07 09:25:28 -08:00
Konstantin Shcheglov 9f448d00fe Support for searching of libraries, import prefixes and import elements.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1767113002 .
2016-03-07 08:34:34 -08:00
Konstantin Shcheglov ec906bf12b Implement search for local elements.
We don't use Index for them, instead of visit coresponding AST subtrees
and add SearchMatch(es).

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1760243004 .
2016-03-05 07:50:11 -08:00
Konstantin Shcheglov aa7bea0d6a New SearchEngine implementation - references only.
And only for the elements for which we have information in the index.
References to other kinds of elements - local variables, parameters,
etc can be implemented using AST visitors. To be implemented in next CLs.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1763133002 .
2016-03-04 12:08:04 -08:00
pq 1f0a0b5a5c Quick fix to ignore a specific error (#25915).
See: https://github.com/dart-lang/sdk/issues/25915

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1764853002 .
2016-03-04 11:11:06 -08:00
Konstantin Shcheglov adcf43968f Ignore not ClassDeclaration target of an unknown method invocation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1764743002 .
2016-03-03 11:23:32 -08:00
Brian Slesinsky 5831cfb1bb Fix issue where errors aren't reported for a new overlay
A new overlay was not being marked as an explicitly added
source, even if it's within the directory of an analysis
context. As a result, errors were not being reported.

I believe this only happens if there's no underlying file.
Therefore it seems difficult to reproduce in an IDE, but
it comes up in a stress test.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1753083003 .
2016-03-03 10:42:45 -08:00
pq 8cd8d219ca Handle incomplete rule options gracefully.
Net-net: this fixes the case where we get storms of UNDEFINED_LINT_WARNINGs when parsed yaml nodes have null values.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1752183003 .
2016-03-03 09:58:30 -08:00
Konstantin Shcheglov 80531d974d Make SearchMatch usable for the new index - remove the element field.
The 'element' is still accessible, but as a computed property.

In many cases we don't need to know the containing element, and need
only the unit source, or the LibraryElement. So, by computing it on
demand we may save some time and make SearchMatch usable with the
new index - where we don't know the Element.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1764553002 .
2016-03-03 08:40:57 -08:00
Leaf Petersen 7d2976c7d5 Add instantiate method on ParameterizedType and InterfaceType,
and deprecate the old substitute4 in favor of instantiate.

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

Review URL: https://codereview.chromium.org/1758913002 .
2016-03-02 15:06:38 -08:00
Konstantin Shcheglov c9e82c7e67 Fill the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1749333004 .
2016-03-02 14:00:17 -08:00
Konstantin Shcheglov faf59757c8 Optimize ElementId search, rename the test file.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1755313002 .
2016-03-02 13:02:52 -08:00