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"}
|
{style="note"}
|
||||||
|
|
||||||
```java
|
```java
|
||||||
project.getMessageBus().connect().subscribe(ActionTopics.CHANGE_ACTION_TOPIC,
|
project.getMessageBus().connect().subscribe(
|
||||||
|
ChangeActionNotifier.CHANGE_ACTION_TOPIC,
|
||||||
new ChangeActionNotifier() {
|
new ChangeActionNotifier() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeAction(Context context) {
|
public void beforeAction(Context context) {
|
||||||
@ -109,8 +110,8 @@ Many standard interfaces implement returning a message bus, e.g., [`Application.
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
public void doChange(Context context) {
|
public void doChange(Context context) {
|
||||||
ChangeActionNotifier publisher =
|
ChangeActionNotifier publisher = project.getMessageBus()
|
||||||
project.getMessageBus().syncPublisher(ActionTopics.CHANGE_ACTION_TOPIC);
|
.syncPublisher(ChangeActionNotifier.CHANGE_ACTION_TOPIC);
|
||||||
publisher.beforeAction(context);
|
publisher.beforeAction(context);
|
||||||
try {
|
try {
|
||||||
// do action
|
// do action
|
||||||
|
Loading…
x
Reference in New Issue
Block a user