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

chore: remove deprecated plugin wrapper #379

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/developer-guide/plugin/examples/todolist.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ description: 这个例子展示了如何开发 Todo List 插件
```java
package run.halo.tutorial;

import org.pf4j.PluginWrapper;
import run.halo.app.plugin.PluginContext;
import org.springframework.stereotype.Component;
import run.halo.app.plugin.BasePlugin;

@Component
public class TodoListPlugin extends BasePlugin {
public TodoListPlugin(PluginWrapper wrapper) {
super(wrapper);
public TodoListPlugin(PluginContext pluginContext) {
super(pluginContext);
}
}
```
Expand Down Expand Up @@ -154,9 +154,9 @@ public class Todo extends AbstractExtension {
public class TodoListPlugin extends BasePlugin {
+ private final SchemeManager schemeManager;

- public TodoListPlugin(PluginWrapper wrapper) {
+ public TodoListPlugin(PluginWrapper wrapper, SchemeManager schemeManager) {
super(wrapper);
- public TodoListPlugin(PluginContext pluginContext) {
+ public TodoListPlugin(PluginContext pluginContext, SchemeManager schemeManager) {
super(pluginContext);
+ this.schemeManager = schemeManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ description: 这个例子展示了如何开发 Todo List 插件
```java
package run.halo.tutorial;

import org.pf4j.PluginWrapper;
import run.halo.app.plugin.PluginContext;
import org.springframework.stereotype.Component;
import run.halo.app.plugin.BasePlugin;

@Component
public class TodoListPlugin extends BasePlugin {
public TodoListPlugin(PluginWrapper wrapper) {
super(wrapper);
public TodoListPlugin(PluginContext pluginContext) {
super(pluginContext);
}
}
```
Expand Down Expand Up @@ -154,9 +154,9 @@ public class Todo extends AbstractExtension {
public class TodoListPlugin extends BasePlugin {
+ private final SchemeManager schemeManager;

- public TodoListPlugin(PluginWrapper wrapper) {
+ public TodoListPlugin(PluginWrapper wrapper, SchemeManager schemeManager) {
super(wrapper);
- public TodoListPlugin(PluginContext pluginContext) {
+ public TodoListPlugin(PluginContext pluginContext, SchemeManager schemeManager) {
super(pluginContext);
+ this.schemeManager = schemeManager;
}

Expand Down