mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce new static method isEnabled
(cherry picked from commit 4d32ab9)
This commit is contained in:
+6
-5
@@ -26,10 +26,11 @@ import com.intellij.util.PlatformUtils;
|
||||
public class FlatWelcomeFrameProvider implements WelcomeFrameProvider {
|
||||
@Override
|
||||
public IdeFrame createFrame() {
|
||||
if (Registry.is("ide.new.welcome.screen")
|
||||
&& (PlatformUtils.isIntelliJ() || PlatformUtils.isCidr())) {
|
||||
return new FlatWelcomeFrame();
|
||||
}
|
||||
return null;
|
||||
return isAvailable() ? new FlatWelcomeFrame() : null;
|
||||
}
|
||||
|
||||
public static boolean isAvailable() {
|
||||
return Registry.is("ide.new.welcome.screen")
|
||||
&& (PlatformUtils.isIntelliJ() || PlatformUtils.isCidr());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user