mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cmd: unify ApplicationStarter initialisation
This commit is contained in:
@@ -94,6 +94,8 @@ public class IdeaApplication {
|
||||
boolean headless = Main.isHeadless();
|
||||
patchSystem(headless);
|
||||
|
||||
myStarter = getStarter();
|
||||
|
||||
if (Main.isCommandLine()) {
|
||||
if (CommandLineApplication.ourInstance == null) {
|
||||
new CommandLineApplication(isInternal, isUnitTest, headless);
|
||||
@@ -104,20 +106,13 @@ public class IdeaApplication {
|
||||
}
|
||||
else {
|
||||
Splash splash = null;
|
||||
//if (myArgs.length == 0) {
|
||||
myStarter = getStarter();
|
||||
if (isShowSplash && myStarter instanceof IdeStarter) {
|
||||
splash = ((IdeStarter)myStarter).showSplash();
|
||||
}
|
||||
//}
|
||||
|
||||
ApplicationManagerEx.createApplication(isInternal, isUnitTest, false, false, ApplicationManagerEx.IDEA_APPLICATION, splash);
|
||||
}
|
||||
|
||||
if (myStarter == null) {
|
||||
myStarter = getStarter();
|
||||
}
|
||||
|
||||
if (headless && myStarter instanceof ApplicationStarterEx && !((ApplicationStarterEx)myStarter).isHeadless()) {
|
||||
Main.showMessage("Startup Error", "Application cannot start in headless mode", true);
|
||||
System.exit(Main.NO_GRAPHICS);
|
||||
|
||||
Reference in New Issue
Block a user