mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-44706 make clear what's going on during app initialization preparation phase (third part, not fully covered)
This commit is contained in:
@@ -67,8 +67,7 @@ public class IdeaApplication {
|
||||
|
||||
@SuppressWarnings("SSBasedInspection")
|
||||
public static void initApplication(@NotNull String[] args) {
|
||||
PluginManager.startupStart.end();
|
||||
StartUpMeasurer.MeasureToken measureToken = StartUpMeasurer.start(StartUpMeasurer.Phases.INIT_APP);
|
||||
StartUpMeasurer.MeasureToken measureToken = PluginManager.startupStart.endAndStart(StartUpMeasurer.Phases.INIT_APP);
|
||||
IdeaApplication app = new IdeaApplication(args);
|
||||
// this invokeLater() call is needed to place the app starting code on a freshly minted IdeEventQueue instance
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
|
||||
@@ -169,7 +169,7 @@ public class StartupUtil {
|
||||
if (!Main.isHeadless()) {
|
||||
measureToken = StartUpMeasurer.start(Phases.UPDATE_WINDOW_ICON);
|
||||
AppUIUtil.updateWindowIcon(JOptionPane.getRootFrame());
|
||||
measureToken.endAndStart(Phases.REGISTER_BUNDLED_FONTS);
|
||||
measureToken = measureToken.endAndStart(Phases.REGISTER_BUNDLED_FONTS);
|
||||
AppUIUtil.registerBundledFonts();
|
||||
measureToken.end();
|
||||
AppUIUtil.showUserAgreementAndConsentsIfNeeded();
|
||||
|
||||
@@ -26,6 +26,7 @@ public final class StartUpMeasurer {
|
||||
public static final String INIT_DEFAULT_LAF = "init default LaF";
|
||||
public static final String UPDATE_WINDOW_ICON = "update window icon";
|
||||
public static final String REGISTER_BUNDLED_FONTS = "register bundled fonts";
|
||||
public static final String CHECK_LICENSE = "check license";
|
||||
|
||||
// this phase name is not fully clear - it is time from `IdeaApplication.initApplication` to `IdeaApplication.run`
|
||||
public static final String INIT_APP = "app initialization";
|
||||
@@ -177,6 +178,7 @@ public final class StartUpMeasurer {
|
||||
if (description != null) {
|
||||
this.description = description;
|
||||
}
|
||||
assert end == 0;
|
||||
end = System.nanoTime();
|
||||
items.add(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user