mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Added factory method to the Update
IDEA-CR-26236
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.intellij.util.ui.update;
|
||||
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -99,4 +100,13 @@ public abstract class Update extends ComparableObject.Impl implements Runnable {
|
||||
public boolean isRejected() {
|
||||
return myRejected;
|
||||
}
|
||||
|
||||
public static Update create(@NonNls Object identity, @NotNull Runnable runnable) {
|
||||
return new Update(identity) {
|
||||
@Override
|
||||
public void run() {
|
||||
runnable.run();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user