mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[ui] Make DeferredSelection singleton non-lazy
#IDEA-335018 GitOrigin-RevId: 0599dc9cede32ae822361f64a348a593427c8a31
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1fd5a408bb
commit
d4b27bcc4e
@@ -368,7 +368,7 @@ public class EditorTextField extends NonOpaquePanel implements EditorTextCompone
|
||||
void execute(@NotNull Editor editor);
|
||||
|
||||
final class All implements DeferredSelection {
|
||||
private static @Nullable All instance;
|
||||
private static final @NotNull All INSTANCE = new DeferredSelection.All();
|
||||
|
||||
private All() {
|
||||
}
|
||||
@@ -379,15 +379,12 @@ public class EditorTextField extends NonOpaquePanel implements EditorTextCompone
|
||||
}
|
||||
|
||||
public static @NotNull All getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new DeferredSelection.All();
|
||||
}
|
||||
return instance;
|
||||
return INSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
final class None implements DeferredSelection {
|
||||
private static @Nullable None instance;
|
||||
private static final @NotNull None INSTANCE = new DeferredSelection.None();
|
||||
|
||||
private None() {
|
||||
}
|
||||
@@ -398,10 +395,7 @@ public class EditorTextField extends NonOpaquePanel implements EditorTextCompone
|
||||
}
|
||||
|
||||
public static @NotNull None getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new DeferredSelection.None();
|
||||
}
|
||||
return instance;
|
||||
return INSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user