class MainApp extends Application {

    private static final Logger LOGGER = LoggerManager.getLogger(MainApp.class);

    public static void setInjector(Injector injector) {
        InjectorHolder.INSTANCE.setInjector(injector);
    }

    @Override
    public void start(Stage stage) {<FILL_FUNCTION_BODY>}
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
}

        requireNonNull(stage);

        InjectorBuilder.logger().setLevel(DEBUG);
        
        if (InjectorHolder.INSTANCE.getInjector() == null) {
            LOGGER.warn("Creating new Speedment instance for UI session.");
            final Injector newInjector = new DefaultApplicationBuilder(
                    getClass().getClassLoader(),
                    DefaultApplicationMetadata.class
                )
                .withBundle(GeneratorBundle.class)
                .withComponent(ToolBundle.class)
                .build().getOrThrow(Injector.class);
            InjectorHolder.INSTANCE.setInjector(newInjector);
        }

        final Injector injector = InjectorHolder.INSTANCE.getInjector();

        final UserInterfaceComponentImpl ui = injector.getOrThrow(UserInterfaceComponentImpl.class);
        final ProjectComponent projects     = injector.getOrThrow(ProjectComponent.class);
        final EventComponent events         = injector.getOrThrow(EventComponent.class);
        final InjectionLoader loader        = injector.getOrThrow(InjectionLoader.class);

        events.on(UIEvent.class, ev -> {
            if (ev == UIEvent.OPEN_MAIN_WINDOW) {
                ui.showNotification(
                    "You are running Speedment Open Source. Click here to " +
                    "upgrade to Speedment Enterprise.",
                    FontAwesome.PLUS, Palette.SUCCESS,
                    () -> ui.browse("https://speedment.com/pricing")
                );
            }
        });
        
        ui.start(this, stage);

        if (EmailUtil.hasEmail()) {
            if (projects.getProject().dbmses().noneMatch(dbms -> true)) {
                loader.loadAndShow("Connect");
                stage.setTitle("Connect to database");
            } else {
                loader.loadAndShow("Scene");
                events.notify(UIEvent.OPEN_MAIN_WINDOW);
                ui.showNotification(
                    "Metadata has been loaded from an offline file. Click " +
                    "here to reload from database.",
                    FontAwesome.REFRESH,
                    Palette.INFO,
                    ui::reload
                );
            }
        } else {
            loader.loadAndShow("MailPrompt");
        }
    
<methods>public void <init>() ,public final javafx.application.HostServices getHostServices() ,public final javafx.application.Application.Parameters getParameters() ,public static java.lang.String getUserAgentStylesheet() ,public void init() throws java.lang.Exception,public static transient void launch(java.lang.String[]) ,public static transient void launch(Class<? extends javafx.application.Application>, java.lang.String[]) ,public final void notifyPreloader(javafx.application.Preloader.PreloaderNotification) ,public static void setUserAgentStylesheet(java.lang.String) ,public abstract void start(javafx.stage.Stage) throws java.lang.Exception,public void stop() throws java.lang.Exception<variables>public static final java.lang.String STYLESHEET_CASPIAN,public static final java.lang.String STYLESHEET_MODENA,private javafx.application.HostServices hostServices,private static java.lang.String userAgentStylesheet