mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
messaging_infrastructure.md: Use actual constant introduced in example
This commit is contained in:
parent
e7e15b1b99
commit
959d13aed8
@ -87,7 +87,8 @@ public interface ChangeActionNotifier {
|
||||
{style="note"}
|
||||
|
||||
```java
|
||||
project.getMessageBus().connect().subscribe(ActionTopics.CHANGE_ACTION_TOPIC,
|
||||
project.getMessageBus().connect().subscribe(
|
||||
ChangeActionNotifier.CHANGE_ACTION_TOPIC,
|
||||
new ChangeActionNotifier() {
|
||||
@Override
|
||||
public void beforeAction(Context context) {
|
||||
@ -109,8 +110,8 @@ Many standard interfaces implement returning a message bus, e.g., [`Application.
|
||||
|
||||
```java
|
||||
public void doChange(Context context) {
|
||||
ChangeActionNotifier publisher =
|
||||
project.getMessageBus().syncPublisher(ActionTopics.CHANGE_ACTION_TOPIC);
|
||||
ChangeActionNotifier publisher = project.getMessageBus()
|
||||
.syncPublisher(ChangeActionNotifier.CHANGE_ACTION_TOPIC);
|
||||
publisher.beforeAction(context);
|
||||
try {
|
||||
// do action
|
||||
|
Loading…
x
Reference in New Issue
Block a user