Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1190)

Side by Side Diff: pkg/analyzer_plugin/doc/tutorial/getting_started.md

Issue 2973753003: Initial documentation for the plugin package (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Getting Started
2
3 ## Creating a Minimal Plugin
4
5 To implement a plugin, start by creating a simple package and create a class
6 that is a subclass of `ServerPlugin`. This class will need to implement a
7 constructor, three getters, and two methods. The getters provide some basic
8 information about your plugin: the name and version, both of which are included
9 in error messages if there is a problem encountered, and a list of glob patterns
10 for the files that the plugin cares about. The methods ...
11
12 Here's an example of what a minimal plugin might look like.
13
14 ```dart
15 class MyPlugin extends ServerPlugin {
16 MyPlugin(ResourceProvider provider) : super(provider);
17
18 @override
19 List<String> get fileGlobsToAnalyze => <String>['**/*.dart'];
20
21 @override
22 String get name => 'My fantastic plugin';
23
24 @override
25 String get version => '1.0.0';
26
27 @override
28 AnalysisDriverGeneric createAnalysisDriver(ContextRoot contextRoot) {
29 // TODO: implement createAnalysisDriver
30 return null;
31 }
32
33 @override
34 void sendNotificationsForSubscriptions(
35 Map<String, List<AnalysisService>> subscriptions) {
36 // TODO: implement sendNotificationsForSubscriptions
37 }
38 }
39 ```
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698