Commit Graph

1875 Commits

Author SHA1 Message Date
Dan Rubel 99aefce48c do not allow built-in keywords to specified when refactoring
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2802433002 .
2017-04-04 17:13:42 -04:00
Brian Wilkerson 0ea61b64ab Bug fixes and added support for creating source edits
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2790173003 .
2017-04-03 10:56:41 -07:00
Brian Wilkerson dd49e79f74 Add context information to driver and add hooks for plugin management
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2795743002 .
2017-04-03 10:13:45 -07:00
Steve Messick 4a2cca3a52 Add getStatementCompletion to the API spec
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2784673003 .
2017-03-30 10:13:21 -07:00
Devon Carew 394a106074 Remove unused imports.
BUG=
R=danrubel@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2786553002 .
2017-03-29 07:10:44 -07:00
Konstantin Shcheglov 483066a697 Fix for Quick Fix to import SDK classes.
It's not 100% replacement, we handle SDK libraries just as any other
library, if it has not been imported yet somewhere, we don't know
about it. But probably this covers the most often case of using a
library in a new file of the project that already uses this SDK
library.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2781963002 .
2017-03-28 14:15:52 -07:00
Brian Wilkerson 84f2f4a677 Enhance the change builders
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2776233002 .
2017-03-28 08:29:30 -07:00
pq 5a237935f0 Fix tests to verify defaultArgListString specified as null are null.
* introduces a sentinel default value to ensure that we know when asserting if `null` was specified or the result of an excluded optional arg

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2769223004 .
2017-03-24 11:53:00 -07:00
pq 4a9cabf493 Arglist children: default value gen fixes.
* fixed arglist codegen (include params)
* fixed defaultTextRange generation (and added tests)
* cleanup (followup from https://codereview.chromium.org/2768273003/

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

See: https://github.com/flutter/flutter-intellij/issues/832
Review-Url: https://codereview.chromium.org/2771123002 .
2017-03-24 09:36:24 -07:00
pq 6f846bcd53 <Widget> boilerplate for Flutter children: suggestions.
Cleanup (tracked in TODOs) and consolidation to follow.

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

See: https://github.com/flutter/flutter-intellij/issues/832
Review-Url: https://codereview.chromium.org/2768273003 .
2017-03-23 15:20:42 -07:00
Brian Wilkerson 61d5c85b48 Allow navigation from var when there is an inferred type (issue 29091)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2769813005 .
2017-03-23 10:34:09 -07:00
pq 03398561a1 IdeOptions awareness for Driver (for access via IDEA registry).
R=brianwilkerson@google.com

See: https://github.com/flutter/flutter-intellij/issues/463
Review-Url: https://codereview.chromium.org/2768003003 .
2017-03-23 09:33:37 -07:00
pq df06af12eb Completion boilerplate for Flutter cons children (flutter-intellij#463)
* plumbs IDE options into completion requests
* simple POC test

More tests and a bit of cleanup to come.

R=brianwilkerson@google.com

See: https://github.com/flutter/flutter-intellij/issues/463
Review-Url: https://codereview.chromium.org/2771653002 .
2017-03-22 15:14:28 -07:00
Devon Carew a231501692 Format generated files.
BUG=
R=brianwilkerson@google.com, jacobr@google.com

Review-Url: https://codereview.chromium.org/2765953002 .
2017-03-21 15:54:16 -07:00
pq d95508183d Introducing IdeOptions.
* add simple `IdeOptions` class
* remove unused `ServerOptions`

R=brianwilkerson@google.com

See: https://github.com/flutter/flutter-intellij/issues/463
Review-Url: https://codereview.chromium.org/2765063002 .
2017-03-21 14:48:27 -07:00
Brian Wilkerson 9a66373ee9 Fix errors and warnings
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2760993002 .
2017-03-20 11:30:32 -07:00
Steve Messick 221125d1ac Add quick-fix to convert child: to children:
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2753123003 .
2017-03-17 14:49:42 -07:00
Mike Fairhurst 319b726f8b Guard analysis server's getAnalysisResult, must be dart
Otherwise spews errors inside html files when users do things like
autocomplete in the middle of them.

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

Review-Url: https://codereview.chromium.org/2755023002 .
2017-03-17 10:42:00 -07:00
Jacob Richman a993294503 Format all analyzer packages
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2753923003 .
2017-03-16 16:11:43 -07:00
Steve Messick 9a9074bf6b Add assist to convert child: to children: in Flutter new-exprs
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2749283004 .
2017-03-16 07:44:05 -07:00
Brian Wilkerson 550443f147 Improve performance of PluginLocator by caching results
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2754473005 .
2017-03-16 07:28:34 -07:00
pq f33d072d91 Correct target of ADD_MISSING_REQUIRED_ARGUMENT fixes (flutter-intellij#788)
* corrects insert target of `ADD_MISSING_REQUIRED_ARGUMENT` fixes
* updates `assertHasFix` to optionally verify fix target

R=brianwilkerson@google.com

Fixes: https://github.com/flutter/flutter-intellij/issues/788
Review-Url: https://codereview.chromium.org/2749373002 .
2017-03-15 13:27:27 -07:00
Brian Wilkerson 8afab37d55 Add PluginWatcher to watch for new plugins that need to be run
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2750483006 .
2017-03-15 11:26:14 -07:00
Mike Fairhurst 985160c08d Replace making getInnermostContext public with making a getFolder method
This way SingleContextManager can fulfill the interface too (it can't
provide a ContextInfo, and the concept of `innermost` doesn't really
exist).

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2754473004 .
2017-03-14 16:13:16 -07:00
Brian Wilkerson 72323291fe Add an object that can manage which plugins are associated with each context / driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2746293004 .
2017-03-14 12:09:53 -07:00
Mike Fairhurst ebab20824a Formalizing the hacks letting the angular analyzer plugin run for now.
Mostly just making private methods public. But also add in some hooks
(via streams and callbacks) that allow the angular analyzer to wrap
analysis drivers in new angular drivers.

This code will likely all be reverted at some point when a much much
better plugin API is available.

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2742343006 .
2017-03-14 12:09:24 -07:00
Devon Carew 8f36669937 Add instrumentation data to the analysis server diagnostics page.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2717253002 .
2017-03-10 14:08:14 -08:00
Konstantin Shcheglov 24d5466a72 Send error notifications only for files in analysis roots (and not excluded).
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2734673002 .
2017-03-05 15:01:27 -08:00
pq cc0036d5ad Calculate text ranges for default args.
Continued work on generating sensible default contents for args in completions.

Calculated text ranges allow us to produce linked edits in the IDE.

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

Review-Url: https://codereview.chromium.org/2727343002 .
2017-03-02 13:14:49 -08:00
pq b17f4b2b5d CompletionSuggestion API for arg list text ranges.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2726923003 .
2017-03-01 16:10:46 -08:00
pq d826b1f931 Default arg support continued (flutter-intellij#553).
Default arg support for:
  * inherited refs
  * imported refs
  * type members
  * local constructors

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

See: https://github.com/flutter/flutter-intellij/issues/553
Review-Url: https://codereview.chromium.org/2728653004 .
2017-03-01 15:00:47 -08:00
pq d1bfe8bccb Calculate default args for local reference completions.
First step towards wiring up default args for completions.

See: https://github.com/flutter/flutter-intellij/issues/553

Next up: similar enhancements for type_members, imported_refs, etc.

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

Review-Url: https://codereview.chromium.org/2722253002 .
2017-03-01 11:45:01 -08:00
Steve Messick b3ed30b822 Add assists to move Flutter widgets up and down one level.
Fixes:
https://github.com/flutter/flutter-intellij/issues/461

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2724473002 .
2017-02-27 15:03:51 -10:00
Konstantin Shcheglov 2816c93faf Ask Dart analysis results only for Dart files.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28905

Review-Url: https://codereview.chromium.org/2720023002 .
2017-02-27 11:50:42 -08:00
pq 8e6817f1da New Completion defaultArgumentListString protocol.
BUG=
R=brianwilkerson@google.com

See: https://github.com/flutter/flutter-intellij/issues/553.
Review-Url: https://codereview.chromium.org/2719083003 .
2017-02-27 11:36:30 -08:00
Konstantin Shcheglov 5c0bf9539c Await in DefaultFixContributor.internalComputeFixes() to catch exceptions.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2720013002 .
2017-02-27 10:40:24 -08:00
Devon Carew 25dfd0fa80 Deprecate execution.setSubscriptions.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2713513007 .
2017-02-24 11:01:00 -08:00
Devon Carew 0f7fc43df5 Remove the --no-error-notification flag.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2713053002 .
2017-02-23 16:55:46 -08:00
Brian Wilkerson 37c585e842 Make it safe to initialize the notificationManager in server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2708353008 .
2017-02-23 12:31:15 -08:00
Devon Carew 9dd2a6d452 Revert "Tweaks to the analyzer_cli."
This reverts commit a7ac08d0e7.

BUG=

Review-Url: https://codereview.chromium.org/2709163005 .
2017-02-23 09:39:25 -08:00
Devon Carew a7ac08d0e7 Tweaks to the analyzer_cli.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2709013005 .
2017-02-23 09:02:49 -08:00
Brian Wilkerson 5d6b742904 Initial integration of NotificationManager into server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2713533003 .
2017-02-22 10:41:13 -08:00
pq 56dbd3b1b4 Error state doc fix.
Follow-up from: https://codereview.chromium.org/2707223003/

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2710983002 .
2017-02-22 08:57:48 -08:00
pq 174a50bb89 Missing @required arg quick fix improvements.
* fixes missing `HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS` case
* improve quick fix message (add name)
* update codegen

BUG=
R=scheglov@google.com

Fixes: #28830
Review-Url: https://codereview.chromium.org/2707223003 .
2017-02-22 06:43:43 -08:00
Brian Wilkerson 5bb9fb5f96 Guard against NPE caused by invalid code (issue 28829)
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2704933002 .
2017-02-20 09:29:14 -08:00
Devon Carew 7f83d9d173 Add a diagnostic.getServerPort analysis server request.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2703033002 .
2017-02-19 15:19:40 -08:00
Devon Carew 6d0be707d0 Some re-organization to the analysis server diagnostics pages.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2699363002 .
2017-02-18 14:18:55 -08:00
Steve Messick 2da528aeac Add assist to reparent a list of Flutter widgets
Apparently I forgot to sort the test file, so there's a bit of code rearrangement there.

I added the optimization to the filter from the previous CL here, too.

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

Review-Url: https://codereview.chromium.org/2701023002 .
2017-02-17 13:11:30 -08:00
Konstantin Shcheglov 6d79ee2602 Issue 27214. Get any AnalysisDriver for getNavigation().
This means that we will able to analyze any file, even outside all
analysis roots.

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

Review-Url: https://codereview.chromium.org/2689213016 .
2017-02-17 09:13:59 -08:00
Steve Messick 7945b65449 Add assist to reparent Flutter widget
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2701563003 .
2017-02-17 08:35:47 -08:00