Fix the warning 14/13114/2
Sylvestre Ledru [Fri, 8 Nov 2013 11:43:16 +0000 (12:43 +0100)]
warning: [static] static method should be qualified by type name, ClassFoo, instead of by an expression

Change-Id: Ib05e494efe78c07c6b9e838bf559c191f14109a4

14 files changed:
scilab/build.incl.xml
scilab/modules/console/src/java/org/scilab/modules/console/utils/ScilabLaTeXViewer.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/GraphicObjectBuilder.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/Editor.java
scilab/modules/gui/src/java/org/scilab/modules/gui/events/ScilabEventListener.java
scilab/modules/helptools/src/java/org/scilab/modules/helptools/scilab/HTMLScilabCodeHandler.java
scilab/modules/helptools/src/java/org/scilab/modules/helptools/scilab/ScilabLexer.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/DrawerVisitor.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotes.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.java
scilab/modules/types/src/java/org/scilab/modules/types/ScilabTypeUtils.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variablebrowser/SwingScilabVariableBrowser.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variableeditor/actions/CreateNewVariableAction.java

index 2f2478a..ed4478d 100644 (file)
             <compilerarg value="-Xlint" />
             <!--  Silent some warnings -->
             <compilerarg value="-Xlint:-unchecked" />
-             <!-- Too borring and painful to fix -->
+            <!-- Too borring and painful to fix -->
             <compilerarg value="-Xlint:-rawtypes" />
-             <!-- Too borring and painful to fix -->
+            <!-- Too borring and painful to fix -->
             <compilerarg value="-Xlint:-path" />
-             <!--  Silent the bad path element -->
+            <!--  Silent the bad path element -->
             <compilerarg value="-Xlint:-serial" />
-             <!--  Silent warning about the serializable -->
+            <!--  Silent warning about the serializable -->
             <compilerarg value="-Xlint:-options" />
-             <!-- Silent 'bootstrap class path not set in conjunction with -source 1.6'. We don't want to manage the detection of rt.jar. See https://blogs.oracle.com/darcy/entry/bootclasspath_older_source -->
+            <!-- Silent 'bootstrap class path not set in conjunction with -source 1.6'. We don't want to manage the detection of rt.jar. See https://blogs.oracle.com/darcy/entry/bootclasspath_older_source -->
         </javac>
     </target>
     
index d4dfb90..98e9b2e 100644 (file)
@@ -59,7 +59,7 @@ public final class ScilabLaTeXViewer extends JPanel {
      * @param size the font size
      */
     public static void setDefaultSize(int size) {
-        viewer.defaultSize = size;
+        ScilabLaTeXViewer.defaultSize = size;
     }
 
     /**
@@ -77,8 +77,8 @@ public final class ScilabLaTeXViewer extends JPanel {
      * @param sep the pane where to remove the LaTeXViewer
      */
     public static void removeLaTeXViewer(JTextComponent tc) {
-        if (viewer.icon != null) {
-            viewer.icon = null;
+        if (ScilabLaTeXViewer.icon != null) {
+            ScilabLaTeXViewer.icon = null;
             viewer.setVisible(false);
             tc.remove(viewer);
             tc.repaint();
@@ -114,13 +114,13 @@ public final class ScilabLaTeXViewer extends JPanel {
             latex = exp.substring(n, exp.length() - n);
         }
 
-        viewer.icon = ScilabSpecialTextUtilities.compilePartialLaTeXExpression(latex, defaultSize);
-        if (viewer.icon == null) {
+        ScilabLaTeXViewer.icon = ScilabSpecialTextUtilities.compilePartialLaTeXExpression(latex, defaultSize);
+        if (ScilabLaTeXViewer.icon == null) {
             return 0;
         }
 
-        width = viewer.icon.getIconWidth();
-        height = viewer.icon.getIconHeight();
+        width = ScilabLaTeXViewer.icon.getIconWidth();
+        height = ScilabLaTeXViewer.icon.getIconHeight();
         viewer.setSize(width + 2 * INSET, height + 2 * INSET);
         tc.add(viewer);
         Rectangle begin;
index c23240e..993ba9d 100644 (file)
@@ -30,8 +30,8 @@ public final class GraphicObjectBuilder {
         GraphicController controller = GraphicController.getController();
 
         final int[] props = new int[] {GraphicObjectProperties.__GO_X_AXIS_LABEL__, GraphicObjectProperties.__GO_Y_AXIS_LABEL__, GraphicObjectProperties.__GO_Z_AXIS_LABEL__, GraphicObjectProperties.__GO_TITLE__};
-        Integer figureModelUID = GraphicModel.getModel().getFigureModel().getIdentifier();
-        Integer axesModelUID = GraphicModel.getModel().getAxesModel().getIdentifier();
+        Integer figureModelUID = GraphicModel.getFigureModel().getIdentifier();
+        Integer axesModelUID = GraphicModel.getAxesModel().getIdentifier();
         Integer newFID = controller.createUID();
         Integer newAID = controller.createUID();
         GraphicModel.getModel().cloneObject(figureModelUID, newFID);
index 9b538c1..ac16bc7 100644 (file)
@@ -173,7 +173,7 @@ public class Editor {
                         onClickInsert(selectedLegend.polyline);
                     } else {
                         /*try pick a label and open the dialog*/
-                        onClickLabel(entityPicker.pickLabel(figureUid, lastClick));
+                        onClickLabel(EntityPicker.pickLabel(figureUid, lastClick));
                     }
                     break;
                 default:
index c6e623a..5c2ba4f 100644 (file)
@@ -158,7 +158,7 @@ public class ScilabEventListener implements KeyListener, MouseListener, MouseMot
     }
 
     public void mouseDragged(MouseEvent arg0) {
-        if (eventTranslator.getClickAction() == eventTranslator.javaButton2Scilab(MouseEvent.BUTTON1, SciTranslator.PRESSED, false)) { /* If LEFT BUTTON PRESSED */
+        if (eventTranslator.getClickAction() == SciTranslator.javaButton2Scilab(MouseEvent.BUTTON1, SciTranslator.PRESSED, false)) { /* If LEFT BUTTON PRESSED */
             this.freedom = false;
             mouseX = arg0.getX();
             mouseY = arg0.getY();
index ba26683..538c7e3 100644 (file)
@@ -40,7 +40,7 @@ public class HTMLScilabCodeHandler extends AbstractScilabCodeHandler {
      * @param lw the LinkWriter to use to handle links
      */
     public static void setLinkWriter(LinkWriter lw) {
-        handler.linkWriter = lw;
+        HTMLScilabCodeHandler.linkWriter = lw;
     }
 
     /**
index 83a4c6d..1ae1a1a 100644 (file)
@@ -219,7 +219,7 @@ public final class ScilabLexer {
 
     public ScilabLexer(Set<String> primitives, Set<String> macros) {
         commands = primitives;
-        this.macros = macros;
+        ScilabLexer.macros = macros;
     }
 
     private void loadNames(String[] files, Set<String> set) {
index 6cdfc59..7baa651 100755 (executable)
@@ -775,7 +775,7 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                 if (datatip.getMarkMode()) {
                     /* TODO: appearance can be not-null */
                     Texture texture = markManager.getMarkSprite(datatip, colorMap, null);
-                    Vector3d markPos = datatipTextDrawer.calculateAnchorPoint(datatip);
+                    Vector3d markPos = DatatipTextDrawer.calculateAnchorPoint(datatip);
                     drawingTools.draw(texture, AnchorPosition.CENTER, markPos);
                 }
                 if (datatip.getTipLabelMode()) {
index edcbd4e..273a58e 100644 (file)
@@ -1961,7 +1961,7 @@ public class SciNotes extends SwingScilabTab {
                         pane.setCaretPosition(sep.getCaretPosition());
                         pane.getXln().setWhereamiLineNumbering(SciNotesOptions.getSciNotesDisplay().showLineNumbers, SciNotesOptions.getSciNotesDisplay().whereami);
                         ed.tabPane.setComponentAt(i, pane.getEditorComponent());
-                        ed.activateHelpOnTyping(pane);
+                        SciNotes.activateHelpOnTyping(pane);
                         ed.initInputMap(pane);
                         if (((ScilabDocument) sep.getDocument()).getBinary()) {
                             pane.setBinary(true);
index 690f03e..bf25af8 100644 (file)
@@ -48,6 +48,6 @@ public final class OpenTabInNewWindowAction extends DefaultAction {
      * Action
      */
     public void doAction() {
-        getEditor().cloneAndCloseCurrentTab(getEditor(), false);
+        SciNotes.cloneAndCloseCurrentTab(getEditor(), false);
     }
 }
index 0114118..92bd7a7 100644 (file)
@@ -302,7 +302,7 @@ public class SearchWordInFilesAction extends DefaultAction implements WindowFocu
         gbc.gridx = gbc.gridy = 0;
         gbc.gridwidth = gbc.gridheight = 1;
         gbc.weightx = gbc.weighty = 0;
-        gbc.anchor = gbc.LINE_START;
+        gbc.anchor = GridBagConstraints.LINE_START;
         panelBase.add(baseDirLabel, gbc);
 
         gbc.gridx = 0;
@@ -327,13 +327,13 @@ public class SearchWordInFilesAction extends DefaultAction implements WindowFocu
         gbc.gridy = 1;
         gbc.gridwidth = 1;
         gbc.weightx = 0;
-        gbc.fill = gbc.NONE;
+        gbc.fill = GridBagConstraints.NONE;
         gbc.anchor = GridBagConstraints.BASELINE;
         panelBase.add(chooseBaseDirButton, gbc);
 
         gbc.gridx = 0;
         gbc.gridy = 3;
-        gbc.anchor = gbc.LINE_START;
+        gbc.anchor = GridBagConstraints.LINE_START;
         panelBase.add(filePatternLabel, gbc);
 
         gbc.gridy = 4;
@@ -356,7 +356,7 @@ public class SearchWordInFilesAction extends DefaultAction implements WindowFocu
         gbc.gridy = 6;
         gbc.gridwidth = 1;
         gbc.weightx = 0;
-        gbc.anchor = gbc.LINE_START;
+        gbc.anchor = GridBagConstraints.LINE_START;
         panelBase.add(wordPatternLabel, gbc);
 
         gbc.gridy = 7;
index 21c84d0..15f1abd 100644 (file)
@@ -295,7 +295,7 @@ final class ScilabTypeUtils {
             for (int i = 0; i < c; i++) {
                 buffer.position(r * i);
                 buffer.limit(r * i + r);
-                if (!buffer.equals(buffer.wrap(data[i]))) {
+                if (!buffer.equals(DoubleBuffer.wrap(data[i]))) {
                     buffer.clear();
                     return false;
                 }
@@ -331,7 +331,7 @@ final class ScilabTypeUtils {
             for (int i = 0; i < c; i++) {
                 buffer.position(r * i);
                 buffer.limit(r * i + r);
-                if (!buffer.equals(buffer.wrap(data[i]))) {
+                if (!buffer.equals(ByteBuffer.wrap(data[i]))) {
                     buffer.clear();
                     return false;
                 }
@@ -367,7 +367,7 @@ final class ScilabTypeUtils {
             for (int i = 0; i < c; i++) {
                 buffer.position(r * i);
                 buffer.limit(r * i + r);
-                if (!buffer.equals(buffer.wrap(data[i]))) {
+                if (!buffer.equals(ShortBuffer.wrap(data[i]))) {
                     buffer.clear();
                     return false;
                 }
@@ -403,7 +403,7 @@ final class ScilabTypeUtils {
             for (int i = 0; i < c; i++) {
                 buffer.position(r * i);
                 buffer.limit(r * i + r);
-                if (!buffer.equals(buffer.wrap(data[i]))) {
+                if (!buffer.equals(IntBuffer.wrap(data[i]))) {
                     buffer.clear();
                     return false;
                 }
@@ -439,7 +439,7 @@ final class ScilabTypeUtils {
             for (int i = 0; i < c; i++) {
                 buffer.position(r * i);
                 buffer.limit(r * i + r);
-                if (!buffer.equals(buffer.wrap(data[i]))) {
+                if (!buffer.equals(LongBuffer.wrap(data[i]))) {
                     buffer.clear();
                     return false;
                 }
index 875b5fb..7b5acfc 100644 (file)
@@ -402,8 +402,7 @@ public final class SwingScilabVariableBrowser extends SwingScilabTab implements
             DeleteAction delete = new DeleteAction(SwingScilabVariableBrowser.this);
             menu.add(delete.createMenuItem());
 
-            ExportToCsvAction csvExport = new ExportToCsvAction((SwingScilabTab)SwingScilabVariableBrowser.this, UiDataMessages.EXPORTCSV);
-            menu.add(csvExport.createMenuItem(SwingScilabVariableBrowser.this, UiDataMessages.EXPORTCSV));
+            menu.add(ExportToCsvAction.createMenuItem(SwingScilabVariableBrowser.this, UiDataMessages.EXPORTCSV));
 
             Menu menuPlot = ScilabMenu.createMenu();
             menuPlot.setText(UiDataMessages.PLOTALL);
index eb16d90..360008e 100644 (file)
@@ -86,7 +86,7 @@ public final class CreateNewVariableAction extends CommonCallBack {
         Object[] values = askForNewMatrix();
         if (!((String) values[0]).isEmpty()) {
             SwingEditvarTableModel model = (SwingEditvarTableModel) table.getModel();
-            String defaultValue = model.getDataAsScilabString(((String) values[3]));
+            String defaultValue = SwingEditvarTableModel.getDataAsScilabString(((String) values[3]));
             if (defaultValue.isEmpty()) {
                 defaultValue = "0";
             }