Browse Source

Merge pull request #983 in DESIGN/design from ~RICHIE/design:release/10.0 to release/10.0

* commit 'aa50c2eaa3d91e6562f3f1aca54f4201006a3fdb':
  无JIRA任务 数据收集,为了规避获取username要在启动之后,写了个中转文件
bugfix/10.0
richie 5 years ago
parent
commit
f4b1a90c7a
  1. 15
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

15
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -3,8 +3,12 @@ package com.fr.start.module;
import com.fr.base.BaseFormula;
import com.fr.base.Formula;
import com.fr.base.MultiFieldParameter;
import com.fr.base.passport.FinePassportListenerAdapter;
import com.fr.base.passport.FinePassportManager;
import com.fr.base.process.ProcessOperator;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.NewFormAction;
import com.fr.design.actions.core.ActionFactory;
@ -129,6 +133,7 @@ public class DesignerActivator extends Activator {
loadLogAppender();
DesignerSocketIO.update();
UserInfoPane.getInstance().updateBBSUserInfo();
storePassport();
}
private void loadLogAppender() {
@ -392,6 +397,16 @@ public class DesignerActivator extends Activator {
StableFactory.registerMarkedObject(ElementCaseThumbnailProcessor.MARK_STRING, new ElementCaseThumbnail());
}
private static void storePassport() {
FinePassportManager.getInstance().storePassport(MarketConfig.getInstance().getBbsUsername(), DesignerEnvManager.getEnvManager().getActivationKey());
FinePassportManager.getInstance().addPassportListener(new FinePassportListenerAdapter() {
@Override
public void onLoginSuccess() {
FinePassportManager.getInstance().storePassport(MarketConfig.getInstance().getBbsUsername(), DesignerEnvManager.getEnvManager().getActivationKey());
}
});
}
@Override
public void stop() {
unloadLogAppender();

Loading…
Cancel
Save