Browse Source

REPORT-19946 Linux设计器

persist/11.0
pengda 5 years ago
parent
commit
db8e23ec40
  1. 10
      designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
  2. 5
      designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java
  3. 6
      designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java
  4. 7
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  5. 5
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  6. 3
      designer-base/src/main/java/com/fr/design/os/OSBasedAction.java
  7. 9
      designer-base/src/main/java/com/fr/design/os/OSSupportCenter.java
  8. 2
      designer-base/src/main/java/com/fr/design/os/SupportOS.java
  9. 2
      designer-base/src/main/java/com/fr/design/os/impl/DatabaseDialogAction.java
  10. 2
      designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java
  11. 2
      designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java
  12. 2
      designer-base/src/main/java/com/fr/design/os/impl/UpdateDialogAction.java
  13. 5
      designer-base/src/main/java/com/fr/design/update/actions/SoftwareUpdateAction.java
  14. 5
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

10
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.dialog.BasicDialog;
import com.fr.design.gui.NameInspector; import com.fr.design.gui.NameInspector;
import com.fr.design.menu.MenuKeySet; 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.design.os.impl.DatabaseDialogAction;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.os.OSBasedAction;
import com.fr.general.os.OSSupportCenter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.Map; import java.util.Map;
@ -52,11 +53,6 @@ public class ConnectionListAction extends UpdateAction {
* @param evt 事件 * @param evt 事件
*/ */
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
/* if (ServerPreferenceConfig.getInstance().isUseUniverseDBM() && !OperatingSystem.isLinux()) {
UniversalDatabaseOpener.showUniverseDatabaseDialog();
} else {
openDesignDatabaseManager();
}*/
OSBasedAction osBasedAction = OSSupportCenter.getAction(DatabaseDialogAction.class); OSBasedAction osBasedAction = OSSupportCenter.getAction(DatabaseDialogAction.class);
osBasedAction.execute(); osBasedAction.execute();
} }

5
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.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; 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.design.os.impl.PMDialogAction;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.os.OSBasedAction;
import com.fr.general.os.OSSupportCenter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;

6
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.constants.UIConstants;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ilable.UILabel; 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.os.impl.SupportOSImpl;
import com.fr.design.upm.UpmFinder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; 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.JDialog;
import javax.swing.JLabel; import javax.swing.JLabel;

7
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.mainframe.vcs.common.VcsHelper;
import com.fr.design.menu.MenuManager; import com.fr.design.menu.MenuManager;
import com.fr.design.menu.ShortCut; 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.os.impl.SupportOSImpl;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
@ -49,8 +51,6 @@ import com.fr.file.FILEFactory;
import com.fr.file.FileFILE; import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; 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.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
@ -473,9 +473,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
ad.createAlphaFinePane().setVisible(false); ad.createAlphaFinePane().setVisible(false);
} }
/*if(Arch.getArch() != Arch.ARM) {
}*/
OSSupportCenter.buildAction(new OSBasedAction() { OSSupportCenter.buildAction(new OSBasedAction() {
@Override @Override
public void execute() { public void execute() {

5
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.SeparatorDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; 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.os.impl.SupportOSImpl;
import com.fr.design.remote.action.RemoteDesignAuthManagerAction; import com.fr.design.remote.action.RemoteDesignAuthManagerAction;
import com.fr.design.update.actions.SoftwareUpdateAction; 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.GeneralContext;
import com.fr.general.locale.LocaleAction; import com.fr.general.locale.LocaleAction;
import com.fr.general.locale.LocaleCenter; 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.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginRuntime; 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.plugin.observer.PluginEventType;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.start.OemHandler; import com.fr.start.OemHandler;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;

3
designer-base/src/test/java/com/fr/design/OSBasedAction.java → 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 { public interface OSBasedAction {
void execute(); void execute();
} }

9
designer-base/src/test/java/com/fr/design/OSSupportCenter.java → 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 com.fr.invoke.Reflect;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class OSSupportCenter { public class OSSupportCenter {
private static Map<Class,OSBasedAction> osBasedActionMap = new HashMap<Class,OSBasedAction>(); private static Map<Class<? extends OSBasedAction>,OSBasedAction> osBasedActionMap = new HashMap<Class<? extends OSBasedAction>,OSBasedAction>();
public static void buildAction(OSBasedAction action, SupportOS supportOS){ public static void buildAction(OSBasedAction action, SupportOS supportOS){
if(supportOS.support()){ if(supportOS.support()){
action.execute(); action.execute();
} }
} }
public static <T extends OSBasedAction> T getAction(Class clazz) { public static <T extends OSBasedAction> T getAction(Class<T> clazz) {
OSBasedAction action = osBasedActionMap.get(clazz); OSBasedAction action = osBasedActionMap.get(clazz);
if(action == null){ if(action == null){
action = Reflect.on(clazz).create().get(); action = Reflect.on(clazz).create().get();
osBasedActionMap.put(clazz,action); osBasedActionMap.put(clazz,action);

2
designer-base/src/test/java/com/fr/design/SupportOS.java → designer-base/src/main/java/com/fr/design/os/SupportOS.java

@ -1,4 +1,4 @@
package com.fr.design; package com.fr.design.os;
public interface SupportOS { public interface SupportOS {
//判断是否支持 //判断是否支持

2
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.dialog.DialogActionAdapter;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.os.OSBasedAction;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.os.OSBasedAction;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;

2
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.config.ServerPreferenceConfig;
import com.fr.design.extra.WebViewDlgHelper; import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.os.OSBasedAction;
import com.fr.design.upm.UpmFinder; import com.fr.design.upm.UpmFinder;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.os.OSBasedAction;
import com.fr.stable.os.Arch; import com.fr.stable.os.Arch;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;

2
designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java

@ -1,6 +1,6 @@
package com.fr.design.os.impl; 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.Arch;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;

2
designer-base/src/main/java/com/fr/design/os/impl/UpdateDialogAction.java

@ -1,9 +1,9 @@
package com.fr.design.os.impl; package com.fr.design.os.impl;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.OSBasedAction;
import com.fr.design.update.ui.dialog.UpdateMainDialog; import com.fr.design.update.ui.dialog.UpdateMainDialog;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.os.OSBasedAction;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
//更新升级窗口 //更新升级窗口

5
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.base.BaseUtils;
import com.fr.design.actions.UpdateAction; 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.design.os.impl.UpdateDialogAction;
import com.fr.general.os.OSBasedAction;
import com.fr.general.os.OSSupportCenter;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
/** /**

5
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.loghandler.DesignerLogAppender;
import com.fr.design.mainframe.socketio.DesignerSocketIO; import com.fr.design.mainframe.socketio.DesignerSocketIO;
import com.fr.design.module.DesignModuleFactory; 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.os.impl.SupportOSImpl;
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.general.os.OSBasedAction;
import com.fr.general.os.OSSupportCenter;
import com.fr.general.xml.GeneralXMLTools; import com.fr.general.xml.GeneralXMLTools;
import com.fr.js.EmailJavaScript; import com.fr.js.EmailJavaScript;
import com.fr.js.JavaScriptImpl; 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.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.os.Arch;
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;

Loading…
Cancel
Save