Skip to content

Commit

Permalink
Update writing-plugins.md doc (scalapb#1161)
Browse files Browse the repository at this point in the history
Update writing-plugins.md
  • Loading branch information
eugeniyk authored May 27, 2021
1 parent d834da0 commit 84acc9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/main/markdown/writing-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ via options. To add custom options, follow this process:
```protobuf
syntax = "proto2";
package myplugin;
package myorg.myplugin;
import "google/protobuf/descriptor.proto";
Expand Down Expand Up @@ -277,14 +277,14 @@ via options. To add custom options, follow this process:
look for the `registerExtensions` method, and add a call to register your own extension:

```scala
myplugin.Myplugin.registerExtensin(registry)
myorg.myplugin.Myplugin.registerAllExtensions(registry)
```

5. Now you are able to extract the extension value in your generator using the standard protobuf-java
APIs:

```scsala
messageDescriptor.getOptions.getExtension(myplugin.Myplugin.myopts).getMyOption
messageDescriptor.getOptions.getExtension(myorg.myplugin.Myplugin.myopts).getMyOption
```

6. You can now use the new option in your e2e tests. Also the newly added proto will be automatically
Expand Down

0 comments on commit 84acc9d

Please sign in to comment.