Commit Graph

2342 Commits

Author SHA1 Message Date
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
Brian Wilkerson 0d743fbacf Start making server strong mode clean
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1842063003 .
2016-03-31 08:27:05 -07: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 d097a6e1cd Allow Analysis Server crawl up the folders to search .analysis_options file.
R=brianwilkerson@google.com, jwren@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org/1832643002 .
2016-03-23 17:09:48 -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 08989ce327 Disable using SDK summaries in Analysis Server.
Rollbacks https://codereview.chromium.org/1812013002/

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

Review URL: https://codereview.chromium.org/1831503002 .
2016-03-23 10:18:16 -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
Brian Wilkerson 0720a24af7 Add information to the status pages about the options for the context associated with the SDK being used by each context.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1814233006 .
2016-03-19 16:25:15 -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 e3e2ef0ace Enable using SDK summaries in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1812013002 .
2016-03-17 12:25:42 -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
Konstantin Shcheglov 6eb900838b Prepare for turning on SDK summaries in Analysis Server.
1. Move plugins registering before SDK creation so that when SDK
   creates AnalysisContext and initializes EnginePlugin, all tasks are
   already registered.

2. Provide additional results which are used by the strong mode.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1814723002 .
2016-03-17 08:37:53 -07:00
Brian Wilkerson 9b0fcd3a39 Remove more calls to safelyVisit methods
checkpoint

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1814453002 .
2016-03-16 11:25:38 -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
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
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 ec08de7df8 Get more data to track down issue 25884
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1775913005 .
2016-03-10 08:21:40 -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
Brian Wilkerson d03381c587 Fix NPE in rename local (issue 25933)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1776743006 .
2016-03-09 17:02:15 -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
Konstantin Shcheglov 21ed1750ce Issue 25962. Check for the number of arguments vs. number of required parameters.
Unfortunately I was not able to reproduce the problem.

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

Review URL: https://codereview.chromium.org/1776353003 .
2016-03-09 11:33:01 -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
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
Bob Nystrom cb7aa02116 Type check for-in statements.
This does nominal checking on the iterable expression used in a for-in
statement:

1. It must implement Iterable.
2. The type argument to Iterable must be assignable to the variable's
   type.

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

Review URL: https://codereview.chromium.org/1771153002 .
2016-03-08 11:25:49 -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 6510065262 Check that target of a new constructor is a ClassDeclaration.
For an exception #10 from the list.

Cannot reproduce though.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1757393002 .
2016-03-03 13:19:40 -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