[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul example plugin, and rename it 'sample' #654

Merged
merged 8 commits into from
Jan 29, 2020

Conversation

stuartmorgan
Copy link
Collaborator
@stuartmorgan stuartmorgan commented Jan 28, 2020

Renames the plugin from 'example_plugin' to 'sample' so that the naming is
consistent with all the actual plugins (which have 'plugin' in the class name,
but not the actual plugin name).

Also makes various improvements to the sample code and documentation,
as described in the associated bug.

Fixes #648

Having _plugin in the name made in inconsistent with all the actual
plugins, making it harder to see how to adjust it to a real plugin name.
- Remove channel ivar, since it's not used in the example.
- Add comments in the code for the things to change.
- Remove most of the README in favor of pointing to the code comments,
  to make it easier to keep updated over time, and to reduce the need to
  look back and forth between two places while using the sample.
@stuartmorgan stuartmorgan changed the title WIP: Rename 'example_plugin' to 'sample' Overhaul example plugin, and rename it 'sample' Jan 29, 2020
@@ -0,0 +1,41 @@
# sample_plugin
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is showing up as a new file rather than a modification of the old README because it both moved, and changed substantially due to moving a bunch of the specific instructions into comments in the code.

@@ -14,7 +14,7 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{95E21B2C-C18A-4CED-8509-585CB2570FDE}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>example_plugin</RootNamespace>
<RootNamespace>dev_flutter_plugin</RootNamespace>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this isn't currently used by anything, I just gave it a generic value instead of the plugin name, since I think it's likely to not get updated by people, in practice, so long as it's unused and not surfaced anywhere.


ExamplePlugin::RegisterWithRegistrar(plugin_registrar);
}
// Copyright 2019 Google LLC
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was using Windows line endings for some reason, unlike all our other code files, thus the everything-changed diff.

Copy link
Contributor
@franciscojma86 franciscojma86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some typos

plugins/sample/README.md Outdated Show resolved Hide resolved
plugins/sample/README.md Outdated Show resolved Hide resolved
@stuartmorgan stuartmorgan merged commit 1eac306 into google:master Jan 29, 2020
@stuartmorgan stuartmorgan deleted the example-plugin-rename branch January 29, 2020 16:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve example_plugin
2 participants