From: Konstantin Bulenkov Date: Fri, 24 Oct 2014 14:16:35 +0000 (+0200) Subject: introduce new static method isEnabled X-Git-Tag: appcode/140.260~8^2~5 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=c6ba77b7029d6df5604c7a85eeb408af5ffe0dc7 introduce new static method isEnabled (cherry picked from commit 4d32ab9) --- diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrameProvider.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrameProvider.java index 0679762b3f46..6bf6c07a4e2b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrameProvider.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrameProvider.java @@ -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()); } }