hzzz 7 years ago
parent
commit
3905318529
  1. 4
      designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  2. 34
      designer-realize/src/com/fr/start/module/DesignerActivator.java

4
designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -39,9 +39,11 @@ public class ErrorInfoUploader {
@Override @Override
public void envChanged() { public void envChanged() {
FineLoggerFactory.getLogger().addLogAppender(new LogHandler<ErrorInfoLogAppender>() { FineLoggerFactory.getLogger().addLogAppender(new LogHandler<ErrorInfoLogAppender>() {
private ErrorInfoLogAppender errorInfoLogAppender = new ErrorInfoLogAppender();
@Override @Override
public ErrorInfoLogAppender getHandler() { public ErrorInfoLogAppender getHandler() {
return new ErrorInfoLogAppender(); return errorInfoLogAppender;
} }
}); });
} }

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

@ -5,7 +5,6 @@ import com.fr.base.Formula;
import com.fr.base.MultiFieldParameter; import com.fr.base.MultiFieldParameter;
import com.fr.base.process.ProcessOperator; import com.fr.base.process.ProcessOperator;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.BiasCellAction; import com.fr.design.actions.insert.cell.BiasCellAction;
@ -21,8 +20,6 @@ import com.fr.design.actions.insert.flot.FormulaFloatAction;
import com.fr.design.actions.insert.flot.ImageFloatAction; import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction; import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.bridge.DesignToolbarProvider; import com.fr.design.bridge.DesignToolbarProvider;
import com.fr.design.chart.ChartDialog;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.form.parameter.FormParaDesigner; import com.fr.design.form.parameter.FormParaDesigner;
import com.fr.design.fun.ElementUIProvider; import com.fr.design.fun.ElementUIProvider;
@ -36,7 +33,6 @@ import com.fr.design.javascript.ParameterJavaScriptPane;
import com.fr.design.javascript.ProcessTransitionAdapter; import com.fr.design.javascript.ProcessTransitionAdapter;
import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.design.mainframe.CellElementPropertyPane;
import com.fr.design.mainframe.ChartPropertyPane;
import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.ElementCaseThumbnail; import com.fr.design.mainframe.ElementCaseThumbnail;
@ -54,15 +50,12 @@ import com.fr.design.mainframe.form.FormReportComponentComposite;
import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.DesignerLogAppender;
import com.fr.design.mainframe.loghandler.DesignerLogImpl; import com.fr.design.mainframe.loghandler.DesignerLogImpl;
import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.loghandler.LogMessageBar;
import com.fr.design.module.ChartHyperlinkGroup;
import com.fr.design.module.ChartPreStyleAction;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.FormParameterReader;
import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.parameter.WorkBookParameterReader; import com.fr.design.parameter.WorkBookParameterReader;
import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane; import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane;
import com.fr.form.stable.ElementCaseThumbnailProcessor; import com.fr.form.stable.ElementCaseThumbnailProcessor;
import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.WidgetInfoConfig; import com.fr.form.ui.WidgetInfoConfig;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
@ -77,7 +70,6 @@ import com.fr.log.FineLoggerFactory;
import com.fr.log.LogHandler; import com.fr.log.LogHandler;
import com.fr.module.Activator; import com.fr.module.Activator;
import com.fr.module.extension.Prepare; import com.fr.module.extension.Prepare;
import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent;
import com.fr.quickeditor.cellquick.CellBiasTextPainterEditor; import com.fr.quickeditor.cellquick.CellBiasTextPainterEditor;
import com.fr.quickeditor.cellquick.CellDSColumnEditor; import com.fr.quickeditor.cellquick.CellDSColumnEditor;
import com.fr.quickeditor.cellquick.CellFormulaQuickEditor; import com.fr.quickeditor.cellquick.CellFormulaQuickEditor;
@ -99,18 +91,15 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.fun.LogProvider; import com.fr.stable.fun.LogProvider;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import com.fr.stable.script.CalculatorProviderContext; import com.fr.stable.script.CalculatorProviderContext;
import com.fr.stable.script.ValueConverter; import com.fr.stable.script.ValueConverter;
import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.xml.ObjectTokenizer;
import com.fr.stable.xml.ObjectXMLWriterFinder; import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.start.BBSGuestPaneProvider; import com.fr.start.BBSGuestPaneProvider;
import com.fr.van.chart.DownloadOnlineSourcesHelper;
import com.fr.van.chart.map.server.ChartMapEditorAction;
import com.fr.xml.ReportXMLUtils; import com.fr.xml.ReportXMLUtils;
import java.awt.*; import java.awt.Image;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -127,6 +116,8 @@ import static com.fr.stable.module.Module.ENGINE_MODULE;
*/ */
public class DesignerActivator extends Activator implements Prepare { public class DesignerActivator extends Activator implements Prepare {
private LogHandler<DesignerLogAppender> logHandler = null;
@Override @Override
public void start() { public void start() {
designerModuleStart(); designerModuleStart();
@ -134,13 +125,22 @@ public class DesignerActivator extends Activator implements Prepare {
loadLogAppender(); loadLogAppender();
} }
private static void loadLogAppender() { private void loadLogAppender() {
FineLoggerFactory.getLogger().addLogAppender(new LogHandler<DesignerLogAppender>() { logHandler = new LogHandler<DesignerLogAppender>() {
final DesignerLogAppender logAppender = new DesignerLogAppender();
@Override @Override
public DesignerLogAppender getHandler() { public DesignerLogAppender getHandler() {
return new DesignerLogAppender(); return logAppender;
}
};
FineLoggerFactory.getLogger().addLogAppender(logHandler);
}
private void unloadLogAppender() {
if (logHandler != null) {
FineLoggerFactory.getLogger().removeLogAppender(logHandler);
} }
});
} }
private static void designerModuleStart() { private static void designerModuleStart() {
@ -165,6 +165,7 @@ public class DesignerActivator extends Activator implements Prepare {
ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance()); StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance());
} }
private static void preLoadPane() { private static void preLoadPane() {
ExecutorService service = Executors.newCachedThreadPool(); ExecutorService service = Executors.newCachedThreadPool();
service.submit(new Runnable() { service.submit(new Runnable() {
@ -398,6 +399,7 @@ public class DesignerActivator extends Activator implements Prepare {
@Override @Override
public void stop() { public void stop() {
unloadLogAppender();
} }
@Override @Override

Loading…
Cancel
Save