From 9dba941e9146647e714d49559669834288c8d238 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Thu, 7 Nov 2019 16:49:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8Cson?= =?UTF-8?q?ar=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/AppStoreBuilder.java | 19 -------------- .../java/com/fr/design/extra/LoginDialog.java | 9 +++---- .../com/fr/design/extra/LoginWebBridge.java | 7 +++-- .../extra/PluginAbstractLoadingViewPane.java | 3 +-- .../fr/design/extra/PluginControlPane.java | 5 ++-- .../fr/design/extra/PluginFromStorePane.java | 10 +++---- .../com/fr/design/extra/PluginUpdatePane.java | 3 +-- .../com/fr/design/extra/PluginWebBridge.java | 10 +++---- .../com/fr/design/extra/QQLoginDialog.java | 2 +- .../java/com/fr/design/extra/ShopDialog.java | 1 + .../fr/design/file/MutilTempalteTabPane.java | 26 +++++-------------- .../com/fr/design/file/NodeAuthProcessor.java | 2 +- .../com/fr/design/formula/FormulaPane.java | 22 +++++----------- .../main/java/com/fr/file/FileNodeFILE.java | 8 +++--- 14 files changed, 37 insertions(+), 90 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java diff --git a/designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java b/designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java deleted file mode 100644 index ba8950ec2..000000000 --- a/designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.fr.design.extra; - -/** - * Created by richie on 16/3/18. - * 应用商店构建器,需要负责去检查是否有最新的版本的应用商店,如果有且适合当前设计器版本,则弹窗提示用户是否升级到最新的应用商店. - * 用户点击更新后,构建器把最新版本的JavaScript以及HTML代码下载到安装目录下的scripts/store目录下 - * 初步想法,设计器中所有的URL请求,都从http(s)://support.finereport.com/config获取,然后存入设计器中,防止修改了某个url导致一系列无法兼容问题 - * 而我们需要做的仅仅是保持兼容support这个服务器的持续维护和兼容,相对来说就简单多了 - */ -public class AppStoreBuilder { - - public void checkStoreJavaSciptVersion() { - - } - - public void updateStoreJavaScript() { - - } -} diff --git a/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java b/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java index 33983baf2..42791ad52 100644 --- a/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java +++ b/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java @@ -4,12 +4,8 @@ import com.fr.design.dialog.UIDialog; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.StableUtils; -import javax.swing.JPanel; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Dialog; -import java.awt.Dimension; -import java.awt.Frame; +import javax.swing.*; +import java.awt.*; /** * Created by vito on 2017/5/5. @@ -41,5 +37,6 @@ public class LoginDialog extends UIDialog { @Override public void checkValid() throws Exception { + // do nothing } } diff --git a/designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java b/designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java index 50add423f..471e25109 100644 --- a/designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java +++ b/designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java @@ -14,10 +14,8 @@ import javafx.concurrent.Task; import javafx.scene.web.WebEngine; import netscape.javascript.JSObject; -import javax.swing.JDialog; -import javax.swing.SwingUtilities; -import java.awt.Color; -import java.awt.Desktop; +import javax.swing.*; +import java.awt.*; import java.net.URI; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -221,5 +219,6 @@ public class LoginWebBridge { } public void openUrlAtLocalWebBrowser(WebEngine eng, String url) { + // do nothing } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java index 0eb114466..3f06ffb9c 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java @@ -4,7 +4,6 @@ import com.fr.base.BaseUtils; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.ilable.UILabel; - import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; @@ -88,7 +87,7 @@ public abstract class PluginAbstractLoadingViewPane extends PluginAbstract @Override public void pressInstallButton() { - + // do nothing } @Override diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java index e5b4feba2..312d83347 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java @@ -7,7 +7,6 @@ import com.fr.design.gui.ilist.UIList; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; - import com.fr.plugin.context.PluginMarker; import com.fr.plugin.license.Licensed; import com.fr.plugin.manage.PluginManager; @@ -23,7 +22,7 @@ import javax.swing.event.DocumentListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.*; -import java.util.*; +import java.util.ArrayList; import java.util.List; /** @@ -155,7 +154,7 @@ public class PluginControlPane extends BasicPane { PluginManager.getController().uninstall(PluginMarker.create(id, version), true, new PluginTaskCallback() { @Override public void done(PluginTaskResult result) { - + // do nothing } }); } diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java b/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java index 115cc87dc..83ee0a16f 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java @@ -13,11 +13,7 @@ import com.fr.plugin.manage.control.ProgressCallback; import com.fr.plugin.view.PluginView; import com.fr.stable.StringUtils; -import javax.swing.JComponent; -import javax.swing.JFileChooser; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.SwingConstants; +import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.File; import java.util.List; @@ -98,7 +94,7 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane config; private WebEngine webEngine; @@ -94,10 +94,10 @@ public class PluginWebBridge { * @return 配置信息 */ public String getRunConfig() { - if (action != null) { + if (actions != null) { JSONObject jsonObject = new JSONObject(); try { - jsonObject.put(ACTION, action.getContext()); + jsonObject.put(ACTION, actions.getContext()); Set keySet = config.keySet(); for (String key : keySet) { jsonObject.put(key, config.get(key).toString()); @@ -117,7 +117,7 @@ public class PluginWebBridge { * @param config 参数 */ public void setRunConfig(ACTIONS action, Map config) { - this.action = action; + this.actions = action; this.config = config; } @@ -125,7 +125,7 @@ public class PluginWebBridge { * 清楚打开动作 */ public void clearRunConfig() { - this.action = null; + this.actions = null; this.config = null; } diff --git a/designer-base/src/main/java/com/fr/design/extra/QQLoginDialog.java b/designer-base/src/main/java/com/fr/design/extra/QQLoginDialog.java index 4773aff68..3ba60054f 100644 --- a/designer-base/src/main/java/com/fr/design/extra/QQLoginDialog.java +++ b/designer-base/src/main/java/com/fr/design/extra/QQLoginDialog.java @@ -3,7 +3,6 @@ package com.fr.design.extra; import com.fr.design.dialog.UIDialog; import com.fr.design.utils.gui.GUICoreUtils; - import javax.swing.*; import java.awt.*; @@ -27,6 +26,7 @@ public class QQLoginDialog extends UIDialog { @Override public void checkValid() throws Exception { + // do nothing } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java b/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java index e2fb97b62..72fa6149b 100644 --- a/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java +++ b/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java @@ -29,5 +29,6 @@ public class ShopDialog extends UIDialog { @Override public void checkValid() throws Exception { + // do nothing } } diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index e83cc85d4..e0a3dd547 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -21,26 +21,9 @@ import com.fr.third.javax.annotation.Nonnull; import com.fr.workspace.WorkContext; import com.fr.workspace.server.lock.TplOperator; -import javax.swing.BorderFactory; -import javax.swing.ButtonModel; -import javax.swing.Icon; -import javax.swing.JComponent; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSeparator; +import javax.swing.*; import javax.swing.plaf.basic.BasicMenuItemUI; -import java.awt.AWTEvent; -import java.awt.AlphaComposite; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.GradientPaint; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; +import java.awt.*; import java.awt.event.AWTEventListener; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -854,7 +837,7 @@ public class MutilTempalteTabPane extends JComponent { */ @Override public void mouseEntered(MouseEvent e) { - + // do nothing } /** @@ -877,6 +860,7 @@ public class MutilTempalteTabPane extends JComponent { */ @Override public void mouseReleased(MouseEvent e) { + // do nothing } /** @@ -886,6 +870,7 @@ public class MutilTempalteTabPane extends JComponent { */ @Override public void mouseClicked(MouseEvent e) { + // do nothing } /** @@ -957,6 +942,7 @@ public class MutilTempalteTabPane extends JComponent { */ @Override public void mouseDragged(MouseEvent e) { + // do nothing } /** diff --git a/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java b/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java index a1082b62f..c3b8d3e4d 100644 --- a/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java +++ b/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java @@ -135,7 +135,7 @@ public class NodeAuthProcessor { * @param fileNode file nodes * @return 带权限信息的文件节点 */ - public boolean fixFileNodeAuth(FileNode fileNode) { + public boolean checkFileNodeAuth(FileNode fileNode) { boolean isLocal = WorkContext.getCurrent().isLocal(); boolean isRoot = WorkContext.getCurrent().isRoot(); diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index 2cf6efa91..c4433ab80 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -27,17 +27,7 @@ import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.script.Expression; -import javax.swing.BorderFactory; -import javax.swing.DefaultListCellRenderer; -import javax.swing.DefaultListModel; -import javax.swing.Icon; -import javax.swing.JComponent; -import javax.swing.JList; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JTree; -import javax.swing.SwingUtilities; +import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.event.TreeSelectionEvent; @@ -47,10 +37,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.MutableTreeNode; import javax.swing.tree.TreePath; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; @@ -148,10 +135,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { keyWordTextField.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { + //do nothing } @Override public void keyReleased(KeyEvent e) { + //do nothing } @Override @@ -236,7 +225,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { protected void extendCheckBoxPane(JPanel checkBoxPane) { - + // do nothing } private void configFormulaArea() { @@ -412,6 +401,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { @Override public void keyTyped(KeyEvent e) { + // do nothing } protected void search(String keyWord, boolean findDescription) { diff --git a/designer-base/src/main/java/com/fr/file/FileNodeFILE.java b/designer-base/src/main/java/com/fr/file/FileNodeFILE.java index dce2c38e0..138cfe345 100644 --- a/designer-base/src/main/java/com/fr/file/FileNodeFILE.java +++ b/designer-base/src/main/java/com/fr/file/FileNodeFILE.java @@ -23,7 +23,7 @@ import com.fr.workspace.WorkspaceEvent; import com.fr.workspace.resource.WorkResourceTempRenameStream; import com.fr.workspace.server.lock.TplOperator; -import javax.swing.Icon; +import javax.swing.*; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.OutputStream; @@ -68,14 +68,14 @@ public class FileNodeFILE implements FILE { this.node = new FileNode(StableUtils.pathJoin(parentDir, name), isDir); this.envPath = WorkContext.getCurrent().getPath(); - this.hasFullAuth = NodeAuthProcessor.getInstance().fixFileNodeAuth(node); + this.hasFullAuth = NodeAuthProcessor.getInstance().checkFileNodeAuth(node); } public FileNodeFILE(FileNode node) { this.node = node; this.envPath = WorkContext.getCurrent().getPath(); - this.hasFullAuth = NodeAuthProcessor.getInstance().fixFileNodeAuth(node); + this.hasFullAuth = NodeAuthProcessor.getInstance().checkFileNodeAuth(node); } public FileNodeFILE(FileNode node, boolean hasFullAuth) { @@ -91,7 +91,7 @@ public class FileNodeFILE implements FILE { public FileNodeFILE(FileNode node, String envPath) { this.node = node; this.envPath = envPath; - this.hasFullAuth = NodeAuthProcessor.getInstance().fixFileNodeAuth(node); + this.hasFullAuth = NodeAuthProcessor.getInstance().checkFileNodeAuth(node); } public FileNodeFILE(FileNode node, String envPath, boolean hasFullAuth) { From 07e47c3a6cee3ae513717211c5a638c8a459a48d Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Fri, 8 Nov 2019 11:09:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8Cson?= =?UTF-8?q?ar=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoStoreProcedureTableModel.java | 8 ++++-- .../tabledatapane/ClassTableDataPane.java | 3 +++ .../tabledatapane/CustomDictModel.java | 25 ++++++++++--------- .../tabledatapane/FileTableDataPane.java | 21 ++++++++-------- .../tabledatapane/MultiTDTableDataPane.java | 5 ++++ .../tabledatapane/ProcedureDataPane.java | 11 ++++++++ .../design/dcm/UniversalDatabaseDialog.java | 2 +- .../com/fr/design/designer/EditingState.java | 1 + .../com/fr/design/dialog/BasicScrollPane.java | 4 +-- .../com/fr/design/dialog/JWizardDialog.java | 1 + .../editor/editor/WidgetNameEditor.java | 19 +++++++------- .../env/LocalDesignerWorkspaceInfo.java | 2 ++ .../env/RemoteDesignerWorkspaceInfo.java | 1 + .../com/fr/design/extra/AppStoreBuilder.java | 19 ++++++++++++++ .../com/fr/design/gui/ilable/ActionLabel.java | 12 ++++++--- .../ui/rsyntaxtextarea/RSyntaxUtilities.java | 6 +++++ .../modes/FormulaTokenMaker.java | 1 + .../diff/MultiPieCellDataFieldsPane.java | 22 +++++++++++++++- .../diff/MultiPieDataSetFieldsPane.java | 25 +++++++++++++++++-- 19 files changed, 145 insertions(+), 43 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java index a3248ba1d..1cb7cd35c 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java @@ -38,6 +38,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel { this.setDefaultEditor(ParameterTableModel.ParameterEditor.class, new ParameterTableModel().new ParameterEditor()); this.setDefaultRenderer(StoreProcedureParameterValueEditor.class, new ProcedureParameterValueRenderer()); } + @Override public boolean isCellEditable(int row, int col) { if (ComparatorUtils.equals(getValueAt(row, col -1), "OUT")) { return false; @@ -48,6 +49,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel { return false; } + @Override public boolean shouldResponseDoubleClickAction () { return false; } @@ -77,15 +79,16 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel { }, 100); } + @Override public void popupMenuCanceled(PopupMenuEvent e) { - + //do nothing } }); this.addCellEditorListener(new CellEditorListener() { @Override public void editingCanceled(ChangeEvent e) { - + //do nothing } @Override @@ -147,6 +150,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel { editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane(); } + @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { editor.setCurrentEditor(0); editor.populate(value); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java index 7cd8dec3e..871b762b9 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java @@ -124,6 +124,7 @@ public class ClassTableDataPane extends AbstractTableDataPane { this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); } + @Override public void actionPerformed(ActionEvent e) { java.util.List oldParas = editorPane.update(); oldParas.add(new Parameter()); @@ -132,6 +133,7 @@ public class ClassTableDataPane extends AbstractTableDataPane { @Override public void checkEnabled() { + //do nothing } } private class RemoveParaAction extends UITableEditAction { @@ -149,6 +151,7 @@ public class ClassTableDataPane extends AbstractTableDataPane { @Override public void checkEnabled() { + //do nothing } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java index fdf44df23..3d9fbad2a 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java @@ -1,22 +1,21 @@ package com.fr.design.data.tabledata.tabledatapane; -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.List; +import com.fr.design.gui.itableeditorpane.ActionStyle; +import com.fr.design.gui.itableeditorpane.UIArrayTableModel; +import com.fr.design.gui.itableeditorpane.UITableEditAction; +import com.fr.design.gui.itableeditorpane.UITableModelAdapter; +import com.fr.design.gui.itextfield.UITextField; import javax.swing.AbstractCellEditor; import javax.swing.JTable; import javax.swing.event.CellEditorListener; import javax.swing.event.ChangeEvent; import javax.swing.table.TableCellEditor; - -import com.fr.design.gui.itableeditorpane.ActionStyle; -import com.fr.design.gui.itableeditorpane.UIArrayTableModel; -import com.fr.design.gui.itableeditorpane.UITableEditAction; -import com.fr.design.gui.itableeditorpane.UITableModelAdapter; -import com.fr.design.gui.itextfield.UITextField; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; public class CustomDictModel extends UITableModelAdapter implements ActionStyle { /** @@ -34,11 +33,13 @@ public class CustomDictModel extends UITableModelAdapter implements Ac this.setDefaultEditor(ParameterEditor.class, new ParameterEditor()); } + @Override public Object getValueAt(int row, int column) { Object[] os = this.getList().get(row); return os[column]; } + @Override public void setValueAt(Object value, int row, int column) { Object[] os = this.getList().get(row); os[column] = value; @@ -104,7 +105,7 @@ public class CustomDictModel extends UITableModelAdapter implements Ac @Override public void editingCanceled(ChangeEvent e) { - + //do nothing } @Override diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java index f55195d3b..947ac15ab 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java @@ -521,6 +521,7 @@ public class FileTableDataPane extends AbstractTableDataPane { @Override public void checkEnabled() { + //do nothing } } @@ -832,7 +833,7 @@ public class FileTableDataPane extends AbstractTableDataPane { } private class XMLNodeTree extends JTree { - private DefaultTreeModel treeModel; + private DefaultTreeModel xmlTreeModel; private DefaultTreeModel waitTreeModel = null; @@ -854,7 +855,7 @@ public class FileTableDataPane extends AbstractTableDataPane { private MouseListener treeMouseListener = new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { - if (XMLNodeTree.this.getModel() != treeModel) { + if (XMLNodeTree.this.getModel() != xmlTreeModel) { return; } int selRow = XMLNodeTree.this.getRowForLocation(e.getX(), e.getY()); @@ -891,7 +892,7 @@ public class FileTableDataPane extends AbstractTableDataPane { } public DefaultTreeModel getTreeModel() { - return treeModel; + return xmlTreeModel; } //防止界面卡死。 @@ -908,7 +909,7 @@ public class FileTableDataPane extends AbstractTableDataPane { //wikky:为满足706设计时对不合法的xml文件(有多个根节点)的处理,把拿到的InputStream强制在最外层添加作为唯一根节点而将文件转换为合法的xml。 private void initData() { params = getEditorPaneParameter(); // 生成tree结构放哪儿呢?放这里感觉不对撒 - treeModel = null; + xmlTreeModel = null; selectedNode = null; xmlColumnsList.clear(); DataSource dataSource = null; @@ -949,17 +950,17 @@ public class FileTableDataPane extends AbstractTableDataPane { FineLoggerFactory.getLogger().error(e.getMessage(), e); loadedTreeModel(); } - if (treeModel == null) { + if (xmlTreeModel == null) { FineLoggerFactory.getLogger().info("The file is wrong or bad, can not create the XMLReader."); return; } - if (treeModel.getChildCount(treeModel.getRoot()) == 1) { - treeModel = new DefaultTreeModel((ExpandMutableTreeNode) treeModel.getChild(treeModel.getRoot(), 0)); + if (xmlTreeModel.getChildCount(xmlTreeModel.getRoot()) == 1) { + xmlTreeModel = new DefaultTreeModel((ExpandMutableTreeNode) xmlTreeModel.getChild(xmlTreeModel.getRoot(), 0)); } else { - ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); + ExpandMutableTreeNode root = (ExpandMutableTreeNode) xmlTreeModel.getRoot(); root.setUserObject(StringUtils.EMPTY); } - this.setModel(treeModel); + this.setModel(xmlTreeModel); } private void loadedTreeModel() { @@ -1011,7 +1012,7 @@ public class FileTableDataPane extends AbstractTableDataPane { } currentNode = new ExpandMutableTreeNode(nodeName); if (layer == 0) { - treeModel = new DefaultTreeModel(currentNode); + xmlTreeModel = new DefaultTreeModel(currentNode); } else { boolean conflict = false; for (int i = 0; i < parentNode.getChildCount(); i++) { diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java index 4a5b33033..2cf170c55 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java @@ -144,12 +144,14 @@ public class MultiTDTableDataPane extends AbstractTableDataPane imp } populateWorker = new SwingWorker() { + @Override protected Void doInBackground() throws Exception { try { storeProcedureContext.setText(StringUtils.EMPTY); @@ -204,6 +205,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp return null; } + @Override public void done() { editorPane.populate(storeprocedure.getParameters()); } @@ -218,6 +220,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp * * @param listener 监听器 */ + @Override public void addStoreProcedureWorkerListener(StoreProcedureWorkerListener listener) { this.storeProcedureWorkerListener = listener; @@ -227,6 +230,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp /** * 去除存储过程监听器 */ + @Override public void removeStoreProcedureWorkerListener() { this.storeProcedureWorkerListener = null; @@ -264,6 +268,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp } updateWorker = new SwingWorker() { + @Override protected Void doInBackground() throws Exception { DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); sp.setCalculating(true); @@ -271,6 +276,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp return null; } + @Override public void done() { DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); sp.setCalculating(false); @@ -328,6 +334,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp /** * 响应数据集改变 */ + @Override public void fireDSChanged() { fireDSChanged(new HashMap()); } @@ -337,6 +344,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp * * @param map 改变的map */ + @Override public void fireDSChanged(Map map) { DesignTableDataManager.fireDSChanged(map); } @@ -348,6 +356,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); } + @Override public void actionPerformed(ActionEvent evt) { StoreProcedure sp = updateBeanWithOutExecute(); StoreProcedureDataWrapper storeProcedureDataWrappe = new StoreProcedureDataWrapper(sp, StringUtils.EMPTY, queryText.getText()); @@ -361,12 +370,14 @@ public class ProcedureDataPane extends AbstractTableDataPane imp this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); } + @Override public void actionPerformed(ActionEvent e) { refresh(); } @Override public void checkEnabled() { + //do nothing } } } diff --git a/designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java b/designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java index 1a01a8641..f035d7e41 100644 --- a/designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java +++ b/designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java @@ -27,6 +27,6 @@ public class UniversalDatabaseDialog extends UIDialog { @Override public void checkValid() throws Exception { - + //do nothing } } diff --git a/designer-base/src/main/java/com/fr/design/designer/EditingState.java b/designer-base/src/main/java/com/fr/design/designer/EditingState.java index 3f4fdf6f0..8bd46d4bd 100644 --- a/designer-base/src/main/java/com/fr/design/designer/EditingState.java +++ b/designer-base/src/main/java/com/fr/design/designer/EditingState.java @@ -7,6 +7,7 @@ public interface EditingState { @Override public void revert() { + //do nothing } }; diff --git a/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java b/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java index d67b05d26..025574897 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java @@ -121,12 +121,12 @@ public abstract class BasicScrollPane extends BasicBeanPane{ @Override public void addLayoutComponent(String name, Component comp) { - + //do nothing } @Override public void removeLayoutComponent(Component comp) { - + //do nothing } @Override diff --git a/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java b/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java index 95894bd01..891e1bf75 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java @@ -363,5 +363,6 @@ public class JWizardDialog extends BasicDialog { @Override public void checkValid() throws Exception { + //do nothing } } diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java index 9258ce589..80c545e92 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java @@ -1,18 +1,17 @@ package com.fr.design.editor.editor; -import java.awt.BorderLayout; -import java.awt.Component; - -import javax.swing.JList; -import javax.swing.event.PopupMenuEvent; -import javax.swing.event.PopupMenuListener; - import com.fr.design.DesignModelAdapter; -import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.FilterComboBox; +import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.stable.js.WidgetName; +import javax.swing.JList; +import javax.swing.event.PopupMenuEvent; +import javax.swing.event.PopupMenuListener; +import java.awt.BorderLayout; +import java.awt.Component; + /** * the editor to edit WidgetName * @@ -43,12 +42,12 @@ public class WidgetNameEditor extends Editor { @Override public void popupMenuCanceled(PopupMenuEvent e) { - + //do nothing } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { - + //do nothing } @Override diff --git a/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java b/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java index efba8a2df..19b085781 100644 --- a/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java +++ b/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java @@ -64,7 +64,9 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo { writer.attr("path", path); } + @Override + @SuppressWarnings("squid:S2975") public Object clone() throws CloneNotSupportedException { LocalDesignerWorkspaceInfo object = (LocalDesignerWorkspaceInfo)super.clone(); diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java b/designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java index ffc80cb08..08477c600 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java @@ -79,6 +79,7 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo { } @Override + @SuppressWarnings("squid:S2975") public Object clone() throws CloneNotSupportedException { RemoteDesignerWorkspaceInfo object = (RemoteDesignerWorkspaceInfo) super.clone(); diff --git a/designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java b/designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java new file mode 100644 index 000000000..5599c7553 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java @@ -0,0 +1,19 @@ +package com.fr.design.extra; + +/** + * Created by richie on 16/3/18. + * 应用商店构建器,需要负责去检查是否有最新的版本的应用商店,如果有且适合当前设计器版本,则弹窗提示用户是否升级到最新的应用商店. + * 用户点击更新后,构建器把最新版本的JavaScript以及HTML代码下载到安装目录下的scripts/store目录下 + * 初步想法,设计器中所有的URL请求,都从http(s)://support.finereport.com/config获取,然后存入设计器中,防止修改了某个url导致一系列无法兼容问题 + * 而我们需要做的仅仅是保持兼容support这个服务器的持续维护和兼容,相对来说就简单多了 + */ +public class AppStoreBuilder { + + public void checkStoreJavaSciptVersion() { + //do nothing + } + + public void updateStoreJavaScript() { + //do nothing + } +} diff --git a/designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java b/designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java index 432628f0f..ebccd24f4 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java @@ -1,5 +1,6 @@ package com.fr.design.gui.ilable; +import javax.swing.event.MouseInputAdapter; import java.awt.Color; import java.awt.Cursor; import java.awt.Graphics; @@ -7,9 +8,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; -import com.fr.design.gui.ilable.UILabel; -import javax.swing.event.MouseInputAdapter; - /** * Action label */ @@ -31,6 +29,7 @@ public class ActionLabel extends UILabel { /** * Repaints the text. */ + @Override public void paintComponent(Graphics _gfx) { super.paintComponent(_gfx); @@ -39,12 +38,17 @@ public class ActionLabel extends UILabel { } private MouseInputAdapter mouseInputAdapter = new MouseInputAdapter() { + @Override public void mouseClicked(MouseEvent e) { + //do nothing } + @Override public void mousePressed(MouseEvent e) { + //do nothing } + @Override public void mouseReleased(MouseEvent evt) { Object source = evt.getSource(); @@ -65,6 +69,7 @@ public class ActionLabel extends UILabel { } } + @Override public void mouseExited(MouseEvent evt) { Object source = evt.getSource(); @@ -73,6 +78,7 @@ public class ActionLabel extends UILabel { } } + @Override public void mouseDragged(MouseEvent e) { } diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java index ddb3ddfa3..596c5d9bd 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java +++ b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java @@ -518,6 +518,8 @@ public class RSyntaxUtilities implements SwingConstants { } numEmbedded--; } + } else { + //do nothing } } // End of for (int i=segOffset; i/Users/3dot141/Downloads/FolxDownload/App/jflex-1.4.1/bin/FormulaTokenMaker.flex */ +@SuppressWarnings("squid:S1192") public class FormulaTokenMaker extends AbstractJFlexCTokenMaker { /** This character denotes the end of file */ diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java index 950f49401..32ab6e604 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java @@ -4,10 +4,19 @@ import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection; import com.fr.design.chartx.component.MultiTinyFormulaPaneWithUISpinner; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import javax.swing.BorderFactory; import javax.swing.JPanel; +import javax.swing.JSeparator; +import javax.swing.SwingConstants; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by shine on 2019/6/18. @@ -30,7 +39,18 @@ public class MultiPieCellDataFieldsPane extends AbstractCellDataFieldsPane