introduce new static method isEnabled

(cherry picked from commit 4d32ab9)
This commit is contained in:
Konstantin Bulenkov
2014-10-24 18:24:53 +02:00
parent dbd9dadac5
commit c6ba77b702
@@ -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());
}
}