diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index 615854088..eaff26ba5 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -14,6 +14,7 @@ import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.GeneralUtils; +import com.fr.i18n.UrlI18nManager; import com.fr.locale.InterProviderFactory; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; @@ -82,7 +83,7 @@ public class AboutPane extends JPanel { addPhoneAndQQPane(contentPane); // 官网 - JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), CloudCenter.getInstance().acquireConf("website." + GeneralContext.getLocale(), ProductConstants.WEBSITE_URL)); + JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), UrlI18nManager.getInstance().getI18nUrl("website")); // 支持邮箱 String defaultEmail = CloudCenter.getInstance().acquireConf("support.email", ProductConstants.SUPPORT_EMAIL); diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java index 51a390c82..5a1439114 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java @@ -3,9 +3,9 @@ package com.fr.design.actions.help; import com.fr.design.i18n.Toolkit; import com.fr.design.login.AbstractDesignerSSO; import com.fr.design.menu.MenuKeySet; -import com.fr.general.CloudCenter; import com.fr.general.GeneralContext; import com.fr.general.http.HttpToolbox; +import com.fr.i18n.UrlI18nManager; import com.fr.stable.CommonUtils; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; @@ -28,7 +28,7 @@ public class TutorialAction extends AbstractDesignerSSO { @Override public String getJumpUrl() { - return CloudCenter.getInstance().acquireUrlByKind(createDocKey(), "http://help.finereport.com"); + return UrlI18nManager.getInstance().getI18nUrl("help"); } // 生成帮助文档 sitecenter key, help.zh_CN.10 diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 4ce851295..8c49a915d 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -12,6 +12,7 @@ import com.fr.design.fun.ConnectionProvider; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.i18n.Toolkit; import com.fr.event.EventDispatcher; import com.fr.file.ConnectionConfig; @@ -27,13 +28,14 @@ import com.fr.third.org.apache.commons.collections4.MapUtils; import com.fr.workspace.WorkContext; import com.fr.file.ConnectionOperator; import java.awt.Window; -import javax.swing.*; +import javax.swing.SwingUtilities; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.UUID; /** * Connection List Pane. @@ -202,4 +204,18 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionConfig)); connectionListDialog.setVisible(true); } + + @Override + public void onCopyItem() { + super.onCopyItem(); + ListModelElement selectedValue = getSelectedValue(); + // identity 需要重置 + if (selectedValue != null && selectedValue.wrapper != null) { + Object temp = ((NameObject) selectedValue.wrapper).getObject(); + if (temp instanceof JDBCDatabaseConnection) { + JDBCDatabaseConnection object = (JDBCDatabaseConnection) temp; + object.setIdentity(UUID.randomUUID().toString()); + } + } + } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 0da46965b..1f9b90dbb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -16,8 +16,8 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.BrowseUtils; import com.fr.file.filter.ChooseFileFilter; -import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; +import com.fr.i18n.UrlI18nManager; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; @@ -159,7 +159,7 @@ public class JDBCDefPane extends JPanel { odbcTipsLink.setPreferredSize(new Dimension(GraphHelper.getWidth(Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")), odbcTipsLink.getPreferredSize().height)); odbcTipsLink.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { - String url = CloudCenter.getInstance().acquireUrlByKind("odbc.help"); + String url = UrlI18nManager.getInstance().getI18nUrl("odbc.help"); BrowseUtils.browser(url); } }); diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java index bb3ccf38b..20e47f556 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java @@ -26,6 +26,7 @@ import com.fr.design.style.color.NewColorSelectBox; import com.fr.env.utils.DesignerInteractionHistory; import com.fr.general.Background; import com.fr.general.IOUtils; +import com.fr.i18n.UrlI18nManager; import com.fr.general.act.BorderPacker; import com.fr.stable.Constants; import com.fr.stable.GraphDrawHelper; @@ -117,7 +118,7 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple public void actionPerformed(ActionEvent e) { Desktop desktop = Desktop.getDesktop(); try { - desktop.browse(new URI(TWEAK_NINE_POINT_HELP_URL)); + desktop.browse(new URI(UrlI18nManager.getInstance().getI18nUrl("nine.point.help"))); } catch (IOException | URISyntaxException ioException) { ioException.printStackTrace(); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index 0671ed1b6..a8c19c697 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java @@ -7,8 +7,8 @@ import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.CloudCenter; import com.fr.general.IOUtils; +import com.fr.i18n.UrlI18nManager; import javax.swing.BorderFactory; import javax.swing.JDialog; @@ -49,7 +49,8 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"), Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"), - CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html")); + UrlI18nManager.getInstance().getI18nUrl("help.install.font") + ); linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink")); messagePanel.add(linkMessage); diff --git a/designer-base/src/main/java/com/fr/env/HelpLink.java b/designer-base/src/main/java/com/fr/env/HelpLink.java index c717ce6ea..133a23490 100644 --- a/designer-base/src/main/java/com/fr/env/HelpLink.java +++ b/designer-base/src/main/java/com/fr/env/HelpLink.java @@ -1,7 +1,7 @@ package com.fr.env; -import com.fr.general.locale.LocaleCenter; -import com.fr.general.locale.LocaleMark; + +import com.fr.i18n.UrlI18nManager; import com.fr.locale.InterProviderFactory; import com.fr.stable.StringUtils; import java.util.HashMap; @@ -18,8 +18,7 @@ public class HelpLink { public static String getLink(String solution) { Map map = new HashMap<>(); - LocaleMark linkMark = LocaleCenter.getMark(RemoteDesignLocaleMark.class); - String link = linkMark.getValue(); + String link = UrlI18nManager.getInstance().getI18nUrl("help.remote.design"); map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Change_PassWord"), StringUtils.EMPTY); map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Cert_Error_Solution"), link); map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Connection_Unknown_Error_Solution"), link);