mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-04 17:38:08 +07:00
GitOrigin-RevId: 924cc6d64e19bbd645b106d7164011c8fcf33170
35 lines
1.1 KiB
Java
35 lines
1.1 KiB
Java
package com.sample;
|
|
|
|
import com.intellij.openapi.actionSystem.*;
|
|
import static com.intellij.openapi.actionSystem.ActionUpdateThread.*;
|
|
|
|
// plain
|
|
class <warning descr="Override 'getActionUpdateThread' and choose 'EDT' or 'BGT'">AwareError</warning> implements ActionUpdateThreadAware {
|
|
}
|
|
|
|
class AwareNoError implements ActionUpdateThreadAware {
|
|
public ActionUpdateThread getActionUpdateThread() { return EDT; }
|
|
}
|
|
|
|
// inherited
|
|
class <warning descr="Override 'getActionUpdateThread' and choose 'EDT' or 'BGT'">AwareChildError</warning> extends AwareError {}
|
|
class AwareChildNoError extends AwareNoError {}
|
|
|
|
// anonymous
|
|
class Holder {
|
|
ActionUpdateThreadAware awareError = new <warning descr="Override 'getActionUpdateThread' and choose 'EDT' or 'BGT'">AwareError</warning>() {
|
|
};
|
|
|
|
ActionUpdateThreadAware awareNoError = new AwareError() {
|
|
public ActionUpdateThread getActionUpdateThread() { return EDT; }
|
|
};
|
|
}
|
|
|
|
// default method (applicable)
|
|
interface WithDefaultMethod extends ActionUpdateThreadAware {
|
|
default ActionUpdateThread getActionUpdateThread() { return BGT; }
|
|
}
|
|
|
|
class AwareNoErrorDueDefault implements WithDefaultMethod {
|
|
}
|