Commit Graph

1474 Commits

Author SHA1 Message Date
Brian Wilkerson 97c613aad4 More strong mode changes in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1852113002 .
2016-04-03 17:56:30 -07:00
Brian Wilkerson f9b575e5b3 More strong mode changes to analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1855643002 .
2016-04-01 18:00:04 -07:00
Konstantin Shcheglov b8fc38e8a8 Issue 26167. Test for indexing a unit which is not attached to a library.
We had the corresponding check wider than tests.
So, the problem in the issue does not happen now.
But it's still good to have a test.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26167

Review URL: https://codereview.chromium.org/1854683003 .
2016-04-01 09:47:08 -07:00
Konstantin Shcheglov 559bc17535 Rework computing simple strings difference.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26140

Review URL: https://codereview.chromium.org/1849843002 .
2016-03-31 10:18:06 -07:00
Dan Rubel 3b18b656c3 tests to assert completion suggestion replacementLength includes entire URI
https://github.com/dart-lang/sdk/issues/26083

R=jwren@google.com

Review URL: https://codereview.chromium.org/1843513003 .
2016-03-31 12:38:38 -04:00
Konstantin Shcheglov 582c038940 Fix for sorting directives with documentation comments.
Stop trying to keep non-documentation directive comments after sorting.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1843763002 .
2016-03-30 17:21:30 -07:00
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 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
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
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 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
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 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
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
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
Konstantin Shcheglov 6d1bf8b0fa Initial new index implementation.
Only getRelations() is implemented, and maybe not the most performant
implementation yet.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1755263002 .
2016-03-02 12:05:05 -08:00
pq d223676c7f Fix @override quick-fix to respect doc comments.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1751163002 .
2016-03-01 13:01:57 -08:00
Konstantin Shcheglov e225e619cd Issue 25827. Don't propose to remove the type of an incomplete variable declaration.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25827

Review URL: https://codereview.chromium.org/1753893002 .
2016-03-01 12:20:24 -08:00
pq 549a7a4d00 Quick-fix for annotate_overrides lint (#25416).
An interim approach to shoe lint-awareness into the dart FixProcessor.  Once we have a a shareable processor base class we can migrate these bits into a dedicated LintFixProcessor contributed by the LintServerPlugin.

See: https://github.com/dart-lang/sdk/issues/25416

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1736383002 .
2016-02-26 14:23:05 -08:00