diff --git a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java index 2b4b137451..946cfe450f 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java @@ -7,11 +7,12 @@ import com.fr.design.data.datapane.connect.DatabaseConnectionPane; import com.fr.design.dialog.BasicDialog; import com.fr.design.gui.NameInspector; import com.fr.design.menu.MenuKeySet; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.DatabaseDialogAction; import com.fr.file.ConnectionConfig; import com.fr.general.IOUtils; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; + import javax.swing.*; import java.awt.event.ActionEvent; import java.util.Map; @@ -52,11 +53,6 @@ public class ConnectionListAction extends UpdateAction { * @param evt 事件 */ public void actionPerformed(ActionEvent evt) { - /* if (ServerPreferenceConfig.getInstance().isUseUniverseDBM() && !OperatingSystem.isLinux()) { - UniversalDatabaseOpener.showUniverseDatabaseDialog(); - } else { - openDesignDatabaseManager(); - }*/ OSBasedAction osBasedAction = OSSupportCenter.getAction(DatabaseDialogAction.class); osBasedAction.execute(); } diff --git a/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java b/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java index 17ab3bdb2e..96e17fa753 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java @@ -2,10 +2,11 @@ package com.fr.design.actions.server; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.PMDialogAction; import com.fr.general.IOUtils; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; + import javax.swing.*; import java.awt.event.ActionEvent; diff --git a/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java b/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java index f091bccc02..1480d7f120 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java +++ b/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java @@ -3,13 +3,11 @@ package com.fr.design.gui.iprogressbar; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.UIDialog; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.SupportOSImpl; -import com.fr.design.upm.UpmFinder; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; -import com.fr.stable.os.OperatingSystem; import javax.swing.JDialog; import javax.swing.JLabel; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 17cb23273c..ee2cc2f2e3 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -40,6 +40,8 @@ import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.vcs.common.VcsHelper; import com.fr.design.menu.MenuManager; import com.fr.design.menu.ShortCut; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.event.EventDispatcher; @@ -49,8 +51,6 @@ import com.fr.file.FILEFactory; import com.fr.file.FileFILE; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; import com.fr.log.FineLoggerFactory; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; @@ -473,9 +473,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { ad.createAlphaFinePane().setVisible(false); } - /*if(Arch.getArch() != Arch.ARM) { - - }*/ OSSupportCenter.buildAction(new OSBasedAction() { @Override public void execute() { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 18b248ffda..fafc89efa3 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -54,6 +54,8 @@ import com.fr.design.menu.MenuDef; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.remote.action.RemoteDesignAuthManagerAction; import com.fr.design.update.actions.SoftwareUpdateAction; @@ -62,8 +64,6 @@ import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.locale.LocaleAction; import com.fr.general.locale.LocaleCenter; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; import com.fr.log.FineLoggerFactory; import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginRuntime; @@ -73,7 +73,6 @@ import com.fr.plugin.observer.PluginEventListener; import com.fr.plugin.observer.PluginEventType; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import com.fr.stable.os.OperatingSystem; import com.fr.start.OemHandler; import com.fr.workspace.WorkContext; import org.jetbrains.annotations.Nullable; diff --git a/designer-base/src/test/java/com/fr/design/OSBasedAction.java b/designer-base/src/main/java/com/fr/design/os/OSBasedAction.java similarity index 68% rename from designer-base/src/test/java/com/fr/design/OSBasedAction.java rename to designer-base/src/main/java/com/fr/design/os/OSBasedAction.java index 4e31afab6f..3a7540d5e4 100644 --- a/designer-base/src/test/java/com/fr/design/OSBasedAction.java +++ b/designer-base/src/main/java/com/fr/design/os/OSBasedAction.java @@ -1,6 +1,5 @@ -package com.fr.design; +package com.fr.design.os; public interface OSBasedAction { void execute(); } - diff --git a/designer-base/src/test/java/com/fr/design/OSSupportCenter.java b/designer-base/src/main/java/com/fr/design/os/OSSupportCenter.java similarity index 59% rename from designer-base/src/test/java/com/fr/design/OSSupportCenter.java rename to designer-base/src/main/java/com/fr/design/os/OSSupportCenter.java index dc031c7238..9945e2dd72 100644 --- a/designer-base/src/test/java/com/fr/design/OSSupportCenter.java +++ b/designer-base/src/main/java/com/fr/design/os/OSSupportCenter.java @@ -1,21 +1,20 @@ -package com.fr.design; +package com.fr.design.os; import com.fr.invoke.Reflect; - import java.util.HashMap; import java.util.Map; public class OSSupportCenter { - private static Map osBasedActionMap = new HashMap(); + private static Map,OSBasedAction> osBasedActionMap = new HashMap,OSBasedAction>(); public static void buildAction(OSBasedAction action, SupportOS supportOS){ if(supportOS.support()){ action.execute(); } } - public static T getAction(Class clazz) { - OSBasedAction action = osBasedActionMap.get(clazz); + public static T getAction(Class clazz) { + OSBasedAction action = osBasedActionMap.get(clazz); if(action == null){ action = Reflect.on(clazz).create().get(); osBasedActionMap.put(clazz,action); diff --git a/designer-base/src/test/java/com/fr/design/SupportOS.java b/designer-base/src/main/java/com/fr/design/os/SupportOS.java similarity index 73% rename from designer-base/src/test/java/com/fr/design/SupportOS.java rename to designer-base/src/main/java/com/fr/design/os/SupportOS.java index a50688341b..9f25b39a26 100644 --- a/designer-base/src/test/java/com/fr/design/SupportOS.java +++ b/designer-base/src/main/java/com/fr/design/os/SupportOS.java @@ -1,6 +1,6 @@ -package com.fr.design; +package com.fr.design.os; public interface SupportOS { //判断是否支持 boolean support(); -} \ No newline at end of file +} diff --git a/designer-base/src/main/java/com/fr/design/os/impl/DatabaseDialogAction.java b/designer-base/src/main/java/com/fr/design/os/impl/DatabaseDialogAction.java index aede9edd9c..1e7ef3566e 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/DatabaseDialogAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/DatabaseDialogAction.java @@ -7,8 +7,8 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrame; +import com.fr.design.os.OSBasedAction; import com.fr.file.ConnectionConfig; -import com.fr.general.os.OSBasedAction; import com.fr.stable.os.OperatingSystem; import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.Configurations; diff --git a/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java b/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java index 03a111c3d5..e853e2aebe 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java @@ -2,9 +2,9 @@ package com.fr.design.os.impl; import com.fr.config.ServerPreferenceConfig; import com.fr.design.extra.WebViewDlgHelper; +import com.fr.design.os.OSBasedAction; import com.fr.design.upm.UpmFinder; import com.fr.design.utils.DesignUtils; -import com.fr.general.os.OSBasedAction; import com.fr.stable.os.Arch; import com.fr.stable.os.OperatingSystem; diff --git a/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java b/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java index f65ad71eb1..0f1665be08 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java @@ -1,6 +1,6 @@ package com.fr.design.os.impl; -import com.fr.general.os.SupportOS; +import com.fr.design.os.SupportOS; import com.fr.stable.os.Arch; import com.fr.stable.os.OperatingSystem; diff --git a/designer-base/src/main/java/com/fr/design/os/impl/UpdateDialogAction.java b/designer-base/src/main/java/com/fr/design/os/impl/UpdateDialogAction.java index ff437e8585..8047528bfa 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/UpdateDialogAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/UpdateDialogAction.java @@ -1,9 +1,9 @@ package com.fr.design.os.impl; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.os.OSBasedAction; import com.fr.design.update.ui.dialog.UpdateMainDialog; import com.fr.design.utils.DesignUtils; -import com.fr.general.os.OSBasedAction; import com.fr.stable.os.OperatingSystem; //更新升级窗口 diff --git a/designer-base/src/main/java/com/fr/design/update/actions/SoftwareUpdateAction.java b/designer-base/src/main/java/com/fr/design/update/actions/SoftwareUpdateAction.java index 9e21afefb2..eda560ce59 100644 --- a/designer-base/src/main/java/com/fr/design/update/actions/SoftwareUpdateAction.java +++ b/designer-base/src/main/java/com/fr/design/update/actions/SoftwareUpdateAction.java @@ -2,9 +2,10 @@ package com.fr.design.update.actions; import com.fr.base.BaseUtils; import com.fr.design.actions.UpdateAction; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.UpdateDialogAction; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; + import java.awt.event.ActionEvent; /** diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 70dae1f024..76a4f394a8 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -54,14 +54,14 @@ import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.socketio.DesignerSocketIO; import com.fr.design.module.DesignModuleFactory; +import com.fr.design.os.OSBasedAction; +import com.fr.design.os.OSSupportCenter; import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.WorkBookParameterReader; import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane; import com.fr.form.stable.ElementCaseThumbnailProcessor; -import com.fr.general.os.OSBasedAction; -import com.fr.general.os.OSSupportCenter; import com.fr.general.xml.GeneralXMLTools; import com.fr.js.EmailJavaScript; import com.fr.js.JavaScriptImpl; @@ -94,7 +94,6 @@ import com.fr.report.cell.painter.CellImagePainter; import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; import com.fr.stable.bridge.StableFactory; -import com.fr.stable.os.Arch; import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import com.fr.stable.script.CalculatorProviderContext; import com.fr.stable.script.ValueConverter;