Browse Source

REPORT-76068【迭代】【起始页】埋点没记

feature/x
Harrison 2 years ago
parent
commit
e8b6186b86
  1. 8
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java
  2. 47
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java
  3. 5
      designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java

8
designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

@ -333,8 +333,7 @@ public class StartupPageWindow extends JFrame {
@Override
public void mouseClicked(MouseEvent e) {
DesignerEnvManager.getEnvManager().setLastOpenFile(recentFile);
pageModel.getOpenLastTemplateRunnable().run();
doOpenLastTemplateAction(recentFile, pageModel);
}
});
Dimension preferredSize = recentItemPanel.getPreferredSize();
@ -366,4 +365,9 @@ public class StartupPageWindow extends JFrame {
return FRGUIPaneFactory.createCenterLayout(centerBody);
}
private void doOpenLastTemplateAction(String recentFile, StartupPageModel pageModel) {
DesignerEnvManager.getEnvManager().setLastOpenFile(recentFile);
pageModel.getOpenLastTemplateRunnable().run();
}
}

47
designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java

@ -194,17 +194,7 @@ public class StartupPageWorkspacePanel extends JPanel {
@Override
public void mousePressed(MouseEvent e) {
if (showMore) {
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Collapse_Workspace"));
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_less.svg"));
showMoreContent();
showMore = !showMore;
} else {
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Expand_All"));
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_more.svg"));
showLessContent();
showMore = !showMore;
}
doShowAllAction(fontLabel, iconLabel);
}
});
tailPanel.add(showAllPanel);
@ -382,13 +372,10 @@ public class StartupPageWorkspacePanel extends JPanel {
int clickCount = e.getClickCount();
if (clickCount == DOUBLE_CLICK_COUNT) {
pageModel.setSelectWorkspaceInfo(workspaceInfo);
openEmptyTemplateRunnable.run();
doOpenEmptyTemplate(workspaceInfo);
return;
}
// selectWorkspaceRunnable
pageModel.setSelectWorkspaceInfo(workspaceInfo);
selectWorkspaceRunnable.run();
doSwitchWorkspace(workspaceInfo);
}
};
@ -415,7 +402,7 @@ public class StartupPageWorkspacePanel extends JPanel {
@Override
public void mousePressed(MouseEvent e) {
openEmptyTemplateRunnable.run();
doOpenEmptyTemplate(workspaceInfo);
}
});
descPanel.add(arrowLabel, BorderLayout.EAST);
@ -515,4 +502,30 @@ public class StartupPageWorkspacePanel extends JPanel {
this.selectWorkspaceRunnable = selectWorkspaceRunnable;
}
private void doOpenEmptyTemplate(StartupWorkspaceBean workspaceInfo) {
pageModel.setSelectWorkspaceInfo(workspaceInfo);
openEmptyTemplateRunnable.run();
}
private void doSwitchWorkspace(StartupWorkspaceBean workspaceInfo) {
// selectWorkspaceRunnable
pageModel.setSelectWorkspaceInfo(workspaceInfo);
selectWorkspaceRunnable.run();
}
private void doShowAllAction(UILabel fontLabel, UILabel iconLabel) {
if (showMore) {
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Collapse_Workspace"));
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_less.svg"));
showMoreContent();
showMore = !showMore;
} else {
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Expand_All"));
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_more.svg"));
showLessContent();
showMore = !showMore;
}
}
}

5
designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java

@ -139,8 +139,9 @@ public class DesignerStartupPageActivator extends Activator {
}
private void recordStartupEnd(StopWatch stopWatch) {
DesignerMetrics designerMetrics = DesignerStartupContext.getInstance().getDesignerMetrics();
DesignerStartupContext context = DesignerStartupContext.getInstance();
DesignerMetrics designerMetrics = context.getDesignerMetrics();
DesignerStartupModel model = designerMetrics.getModel();
model.setStartingTime(stopWatch.getTime(TimeUnit.MILLISECONDS));
model.fill();

Loading…
Cancel
Save