Browse Source

REPORT-20318 sonar问题修复

research/11.0
zack 5 years ago
parent
commit
6de343d39d
  1. 8
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
  2. 3
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  3. 25
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java
  4. 21
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  5. 5
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  6. 11
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  7. 2
      designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java
  8. 1
      designer-base/src/main/java/com/fr/design/designer/EditingState.java
  9. 4
      designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java
  10. 1
      designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java
  11. 19
      designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java
  12. 2
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java
  13. 1
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  14. 4
      designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java
  15. 12
      designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java
  16. 6
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java
  17. 1
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.java

8
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.setDefaultEditor(ParameterTableModel.ParameterEditor.class, new ParameterTableModel().new ParameterEditor());
this.setDefaultRenderer(StoreProcedureParameterValueEditor.class, new ProcedureParameterValueRenderer()); this.setDefaultRenderer(StoreProcedureParameterValueEditor.class, new ProcedureParameterValueRenderer());
} }
@Override
public boolean isCellEditable(int row, int col) { public boolean isCellEditable(int row, int col) {
if (ComparatorUtils.equals(getValueAt(row, col -1), "OUT")) { if (ComparatorUtils.equals(getValueAt(row, col -1), "OUT")) {
return false; return false;
@ -48,6 +49,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
return false; return false;
} }
@Override
public boolean shouldResponseDoubleClickAction () { public boolean shouldResponseDoubleClickAction () {
return false; return false;
} }
@ -77,15 +79,16 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
}, 100); }, 100);
} }
@Override
public void popupMenuCanceled(PopupMenuEvent e) { public void popupMenuCanceled(PopupMenuEvent e) {
//do nothing
} }
}); });
this.addCellEditorListener(new CellEditorListener() { this.addCellEditorListener(new CellEditorListener() {
@Override @Override
public void editingCanceled(ChangeEvent e) { public void editingCanceled(ChangeEvent e) {
//do nothing
} }
@Override @Override
@ -147,6 +150,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane(); editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane();
} }
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
editor.setCurrentEditor(0); editor.setCurrentEditor(0);
editor.populate(value); editor.populate(value);

3
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -124,6 +124,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
} }
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
java.util.List<ParameterProvider> oldParas = editorPane.update(); java.util.List<ParameterProvider> oldParas = editorPane.update();
oldParas.add(new Parameter()); oldParas.add(new Parameter());
@ -132,6 +133,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override @Override
public void checkEnabled() { public void checkEnabled() {
//do nothing
} }
} }
private class RemoveParaAction extends UITableEditAction { private class RemoveParaAction extends UITableEditAction {
@ -149,6 +151,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override @Override
public void checkEnabled() { public void checkEnabled() {
//do nothing
} }
} }

25
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java

@ -1,22 +1,21 @@
package com.fr.design.data.tabledata.tabledatapane; package com.fr.design.data.tabledata.tabledatapane;
import java.awt.Component; import com.fr.design.gui.itableeditorpane.ActionStyle;
import java.awt.event.ActionEvent; import com.fr.design.gui.itableeditorpane.UIArrayTableModel;
import java.awt.event.ActionListener; import com.fr.design.gui.itableeditorpane.UITableEditAction;
import java.util.ArrayList; import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import java.util.List; import com.fr.design.gui.itextfield.UITextField;
import javax.swing.AbstractCellEditor; import javax.swing.AbstractCellEditor;
import javax.swing.JTable; import javax.swing.JTable;
import javax.swing.event.CellEditorListener; import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellEditor;
import java.awt.Component;
import com.fr.design.gui.itableeditorpane.ActionStyle; import java.awt.event.ActionEvent;
import com.fr.design.gui.itableeditorpane.UIArrayTableModel; import java.awt.event.ActionListener;
import com.fr.design.gui.itableeditorpane.UITableEditAction; import java.util.ArrayList;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter; import java.util.List;
import com.fr.design.gui.itextfield.UITextField;
public class CustomDictModel extends UITableModelAdapter<Object[]> implements ActionStyle { public class CustomDictModel extends UITableModelAdapter<Object[]> implements ActionStyle {
/** /**
@ -34,11 +33,13 @@ public class CustomDictModel extends UITableModelAdapter<Object[]> implements Ac
this.setDefaultEditor(ParameterEditor.class, new ParameterEditor()); this.setDefaultEditor(ParameterEditor.class, new ParameterEditor());
} }
@Override
public Object getValueAt(int row, int column) { public Object getValueAt(int row, int column) {
Object[] os = this.getList().get(row); Object[] os = this.getList().get(row);
return os[column]; return os[column];
} }
@Override
public void setValueAt(Object value, int row, int column) { public void setValueAt(Object value, int row, int column) {
Object[] os = this.getList().get(row); Object[] os = this.getList().get(row);
os[column] = value; os[column] = value;
@ -104,7 +105,7 @@ public class CustomDictModel extends UITableModelAdapter<Object[]> implements Ac
@Override @Override
public void editingCanceled(ChangeEvent e) { public void editingCanceled(ChangeEvent e) {
//do nothing
} }
@Override @Override

21
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -521,6 +521,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
@Override @Override
public void checkEnabled() { public void checkEnabled() {
//do nothing
} }
} }
@ -832,7 +833,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} }
private class XMLNodeTree extends JTree { private class XMLNodeTree extends JTree {
private DefaultTreeModel treeModel; private DefaultTreeModel xmlTreeModel;
private DefaultTreeModel waitTreeModel = null; private DefaultTreeModel waitTreeModel = null;
@ -854,7 +855,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private MouseListener treeMouseListener = new MouseAdapter() { private MouseListener treeMouseListener = new MouseAdapter() {
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (XMLNodeTree.this.getModel() != treeModel) { if (XMLNodeTree.this.getModel() != xmlTreeModel) {
return; return;
} }
int selRow = XMLNodeTree.this.getRowForLocation(e.getX(), e.getY()); int selRow = XMLNodeTree.this.getRowForLocation(e.getX(), e.getY());
@ -891,7 +892,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} }
public DefaultTreeModel getTreeModel() { public DefaultTreeModel getTreeModel() {
return treeModel; return xmlTreeModel;
} }
//防止界面卡死。 //防止界面卡死。
@ -908,7 +909,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
//wikky:为满足706设计时对不合法的xml文件(有多个根节点)的处理,把拿到的InputStream强制在最外层添加<XML></XML>作为唯一根节点而将文件转换为合法的xml。 //wikky:为满足706设计时对不合法的xml文件(有多个根节点)的处理,把拿到的InputStream强制在最外层添加<XML></XML>作为唯一根节点而将文件转换为合法的xml。
private void initData() { private void initData() {
params = getEditorPaneParameter(); // 生成tree结构放哪儿呢?放这里感觉不对撒 params = getEditorPaneParameter(); // 生成tree结构放哪儿呢?放这里感觉不对撒
treeModel = null; xmlTreeModel = null;
selectedNode = null; selectedNode = null;
xmlColumnsList.clear(); xmlColumnsList.clear();
DataSource dataSource = null; DataSource dataSource = null;
@ -949,17 +950,17 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
loadedTreeModel(); loadedTreeModel();
} }
if (treeModel == null) { if (xmlTreeModel == null) {
FineLoggerFactory.getLogger().info("The file is wrong or bad, can not create the XMLReader."); FineLoggerFactory.getLogger().info("The file is wrong or bad, can not create the XMLReader.");
return; return;
} }
if (treeModel.getChildCount(treeModel.getRoot()) == 1) { if (xmlTreeModel.getChildCount(xmlTreeModel.getRoot()) == 1) {
treeModel = new DefaultTreeModel((ExpandMutableTreeNode) treeModel.getChild(treeModel.getRoot(), 0)); xmlTreeModel = new DefaultTreeModel((ExpandMutableTreeNode) xmlTreeModel.getChild(xmlTreeModel.getRoot(), 0));
} else { } else {
ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) xmlTreeModel.getRoot();
root.setUserObject(StringUtils.EMPTY); root.setUserObject(StringUtils.EMPTY);
} }
this.setModel(treeModel); this.setModel(xmlTreeModel);
} }
private void loadedTreeModel() { private void loadedTreeModel() {
@ -1011,7 +1012,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} }
currentNode = new ExpandMutableTreeNode(nodeName); currentNode = new ExpandMutableTreeNode(nodeName);
if (layer == 0) { if (layer == 0) {
treeModel = new DefaultTreeModel(currentNode); xmlTreeModel = new DefaultTreeModel(currentNode);
} else { } else {
boolean conflict = false; boolean conflict = false;
for (int i = 0; i < parentNode.getChildCount(); i++) { for (int i = 0; i < parentNode.getChildCount(); i++) {

5
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -144,12 +144,14 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
} }
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
refresh(); refresh();
} }
@Override @Override
public void checkEnabled() { public void checkEnabled() {
//do nothing
} }
} }
@ -259,14 +261,17 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
private UIButton formulaButton; private UIButton formulaButton;
private DocumentListener documentListener = new DocumentListener() { private DocumentListener documentListener = new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) { public void changedUpdate(DocumentEvent e) {
updateFormula(formulaContentTextField.getText()); updateFormula(formulaContentTextField.getText());
} }
@Override
public void insertUpdate(DocumentEvent e) { public void insertUpdate(DocumentEvent e) {
updateFormula(formulaContentTextField.getText()); updateFormula(formulaContentTextField.getText());
} }
@Override
public void removeUpdate(DocumentEvent e) { public void removeUpdate(DocumentEvent e) {
updateFormula(formulaContentTextField.getText()); updateFormula(formulaContentTextField.getText());
} }

11
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -187,6 +187,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
} }
populateWorker = new SwingWorker<Void, Void>() { populateWorker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception { protected Void doInBackground() throws Exception {
try { try {
storeProcedureContext.setText(StringUtils.EMPTY); storeProcedureContext.setText(StringUtils.EMPTY);
@ -204,6 +205,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
return null; return null;
} }
@Override
public void done() { public void done() {
editorPane.populate(storeprocedure.getParameters()); editorPane.populate(storeprocedure.getParameters());
} }
@ -218,6 +220,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
* *
* @param listener 监听器 * @param listener 监听器
*/ */
@Override
public void addStoreProcedureWorkerListener(StoreProcedureWorkerListener listener) { public void addStoreProcedureWorkerListener(StoreProcedureWorkerListener listener) {
this.storeProcedureWorkerListener = listener; this.storeProcedureWorkerListener = listener;
@ -227,6 +230,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
/** /**
* 去除存储过程监听器 * 去除存储过程监听器
*/ */
@Override
public void removeStoreProcedureWorkerListener() { public void removeStoreProcedureWorkerListener() {
this.storeProcedureWorkerListener = null; this.storeProcedureWorkerListener = null;
@ -264,6 +268,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
} }
updateWorker = new SwingWorker<Void, Void>() { updateWorker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception { protected Void doInBackground() throws Exception {
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER);
sp.setCalculating(true); sp.setCalculating(true);
@ -271,6 +276,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
return null; return null;
} }
@Override
public void done() { public void done() {
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER);
sp.setCalculating(false); sp.setCalculating(false);
@ -328,6 +334,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
/** /**
* 响应数据集改变 * 响应数据集改变
*/ */
@Override
public void fireDSChanged() { public void fireDSChanged() {
fireDSChanged(new HashMap<String, String>()); fireDSChanged(new HashMap<String, String>());
} }
@ -337,6 +344,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
* *
* @param map 改变的map * @param map 改变的map
*/ */
@Override
public void fireDSChanged(Map<String, String> map) { public void fireDSChanged(Map<String, String> map) {
DesignTableDataManager.fireDSChanged(map); DesignTableDataManager.fireDSChanged(map);
} }
@ -348,6 +356,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
} }
@Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
StoreProcedure sp = updateBeanWithOutExecute(); StoreProcedure sp = updateBeanWithOutExecute();
StoreProcedureDataWrapper storeProcedureDataWrappe = new StoreProcedureDataWrapper(sp, StringUtils.EMPTY, queryText.getText()); StoreProcedureDataWrapper storeProcedureDataWrappe = new StoreProcedureDataWrapper(sp, StringUtils.EMPTY, queryText.getText());
@ -361,12 +370,14 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
} }
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
refresh(); refresh();
} }
@Override @Override
public void checkEnabled() { public void checkEnabled() {
//do nothing
} }
} }
} }

2
designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java

@ -27,6 +27,6 @@ public class UniversalDatabaseDialog extends UIDialog {
@Override @Override
public void checkValid() throws Exception { public void checkValid() throws Exception {
//do nothing
} }
} }

1
designer-base/src/main/java/com/fr/design/designer/EditingState.java

@ -7,6 +7,7 @@ public interface EditingState {
@Override @Override
public void revert() { public void revert() {
//do nothing
} }
}; };

4
designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java

@ -121,12 +121,12 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
//do nothing
} }
@Override @Override
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
//do nothing
} }
@Override @Override

1
designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java

@ -363,5 +363,6 @@ public class JWizardDialog extends BasicDialog {
@Override @Override
public void checkValid() throws Exception { public void checkValid() throws Exception {
//do nothing
} }
} }

19
designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java

@ -1,18 +1,17 @@
package com.fr.design.editor.editor; 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.DesignModelAdapter;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icombobox.FilterComboBox; import com.fr.design.gui.icombobox.FilterComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.js.WidgetName; 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 * the editor to edit WidgetName
* *
@ -43,12 +42,12 @@ public class WidgetNameEditor extends Editor<WidgetName> {
@Override @Override
public void popupMenuCanceled(PopupMenuEvent e) { public void popupMenuCanceled(PopupMenuEvent e) {
//do nothing
} }
@Override @Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
//do nothing
} }
@Override @Override

2
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -64,7 +64,9 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
writer.attr("path", path); writer.attr("path", path);
} }
@Override @Override
@SuppressWarnings("squid:S2975")
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
LocalDesignerWorkspaceInfo object = (LocalDesignerWorkspaceInfo)super.clone(); LocalDesignerWorkspaceInfo object = (LocalDesignerWorkspaceInfo)super.clone();

1
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -79,6 +79,7 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
} }
@Override @Override
@SuppressWarnings("squid:S2975")
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
RemoteDesignerWorkspaceInfo object = (RemoteDesignerWorkspaceInfo) super.clone(); RemoteDesignerWorkspaceInfo object = (RemoteDesignerWorkspaceInfo) super.clone();

4
designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java

@ -10,10 +10,10 @@ package com.fr.design.extra;
public class AppStoreBuilder { public class AppStoreBuilder {
public void checkStoreJavaSciptVersion() { public void checkStoreJavaSciptVersion() {
//do nothing
} }
public void updateStoreJavaScript() { public void updateStoreJavaScript() {
//do nothing
} }
} }

12
designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java

@ -1,5 +1,6 @@
package com.fr.design.gui.ilable; package com.fr.design.gui.ilable;
import javax.swing.event.MouseInputAdapter;
import java.awt.Color; import java.awt.Color;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.Graphics; import java.awt.Graphics;
@ -7,9 +8,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.event.MouseInputAdapter;
/** /**
* Action label * Action label
*/ */
@ -31,6 +29,7 @@ public class ActionLabel extends UILabel {
/** /**
* Repaints the text. * Repaints the text.
*/ */
@Override
public void paintComponent(Graphics _gfx) { public void paintComponent(Graphics _gfx) {
super.paintComponent(_gfx); super.paintComponent(_gfx);
@ -39,12 +38,17 @@ public class ActionLabel extends UILabel {
} }
private MouseInputAdapter mouseInputAdapter = new MouseInputAdapter() { private MouseInputAdapter mouseInputAdapter = new MouseInputAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
//do nothing
} }
@Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
//do nothing
} }
@Override
public void mouseReleased(MouseEvent evt) { public void mouseReleased(MouseEvent evt) {
Object source = evt.getSource(); Object source = evt.getSource();
@ -65,6 +69,7 @@ public class ActionLabel extends UILabel {
} }
} }
@Override
public void mouseExited(MouseEvent evt) { public void mouseExited(MouseEvent evt) {
Object source = evt.getSource(); Object source = evt.getSource();
@ -73,6 +78,7 @@ public class ActionLabel extends UILabel {
} }
} }
@Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
} }

6
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java

@ -518,6 +518,8 @@ public class RSyntaxUtilities implements SwingConstants {
} }
numEmbedded--; numEmbedded--;
} }
} else {
//do nothing
} }
} // End of for (int i=segOffset; i<segOffset+charSegment.count; i++). } // End of for (int i=segOffset; i<segOffset+charSegment.count; i++).
@ -584,6 +586,8 @@ public class RSyntaxUtilities implements SwingConstants {
} }
numEmbedded--; numEmbedded--;
} }
} else {
//do nothing
} }
} }
@ -961,6 +965,8 @@ public class RSyntaxUtilities implements SwingConstants {
i--; i--;
} }
offs = lineStart + i; offs = lineStart + i;
} else {
//do nothing
} }
} }

1
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.java

@ -18,6 +18,7 @@ import java.io.IOException;
* on 9/18/19 6:12 PM from the specification file * on 9/18/19 6:12 PM from the specification file
* <tt>/Users/3dot141/Downloads/FolxDownload/App/jflex-1.4.1/bin/FormulaTokenMaker.flex</tt> * <tt>/Users/3dot141/Downloads/FolxDownload/App/jflex-1.4.1/bin/FormulaTokenMaker.flex</tt>
*/ */
@SuppressWarnings("squid:S1192")
public class FormulaTokenMaker extends AbstractJFlexCTokenMaker { public class FormulaTokenMaker extends AbstractJFlexCTokenMaker {
/** This character denotes the end of file */ /** This character denotes the end of file */

Loading…
Cancel
Save