Xcos GUI: minor Java code cleanup 68/17368/3
Paul Bignier [Thu, 22 Oct 2015 08:31:42 +0000 (10:31 +0200)]
Change-Id: I7974c96697ff43e7315a8a8905254a38fc42dcbc

scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/BlockHandler.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/CustomHandler.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/PortHandler.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/RawDataHandler.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/SAXHandler.java

index adad6cc..e706449 100644 (file)
@@ -48,6 +48,7 @@ class BlockHandler implements ScilabHandler {
         this.saxHandler = saxHandler;
     }
 
+    @Override
     public BasicBlock startElement(HandledElement found, Attributes atts) {
         String v;
         BasicBlock block;
@@ -158,6 +159,7 @@ class BlockHandler implements ScilabHandler {
         return block;
     }
 
+    @Override
     public void endElement(HandledElement found) {
     }
 }
\ No newline at end of file
index c015e70..2c1ac33 100644 (file)
@@ -123,7 +123,7 @@ class CustomHandler implements ScilabHandler {
 
                 saxHandler.controller.setObjectProperty(uid, Kind.DIAGRAM, ObjectProperties.PROPERTIES, properties);
 
-            // no break on purpose, we decode non-root specific properties later
+                // no break on purpose, we decode non-root specific properties later
             case SuperBlockDiagram:
                 final Kind kind;
                 if (uid == 0l) {
index 68ef046..4c73e68 100644 (file)
@@ -42,6 +42,7 @@ class PortHandler implements ScilabHandler {
         this.saxHandler = saxHandler;
     }
 
+    @Override
     public BasicPort startElement(HandledElement found, Attributes atts) {
         BasicPort port;
         ObjectProperties relatedProperty;
@@ -179,6 +180,7 @@ class PortHandler implements ScilabHandler {
         return port;
     }
 
+    @Override
     public void endElement(HandledElement found) {
     }
 }
\ No newline at end of file
index 85014e0..585c7cd 100644 (file)
@@ -99,13 +99,13 @@ class RawDataHandler implements ScilabHandler {
 
         switch (found) {
             case ScilabBoolean:
-            // no break on purpose
+                // no break on purpose
             case ScilabDouble:
-            // no break on purpose
+                // no break on purpose
             case ScilabInteger:
-            // no break on purpose
+                // no break on purpose
             case ScilabString:
-            // no break on purpose
+                // no break on purpose
             case Array: {
                 String as = atts.getValue("as");
 
@@ -305,25 +305,25 @@ class RawDataHandler implements ScilabHandler {
                     switch (ScilabIntegerTypeEnum.valueOf(v)) {
                         case sci_int8:
                             unsigned = false;
-                        // no break on purpose
+                            // no break on purpose
                         case sci_uint8:
                             container = new ScilabInteger(new byte[height][width], unsigned);
                             break;
                         case sci_int16:
                             unsigned = false;
-                        // no break on purpose
+                            // no break on purpose
                         case sci_uint16:
                             container = new ScilabInteger(new short[height][width], unsigned);
                             break;
                         case sci_int32:
                             unsigned = false;
-                        // no break on purpose
+                            // no break on purpose
                         case sci_uint32:
                             container = new ScilabInteger(new int[height][width], unsigned);
                             break;
                         case sci_int64:
                             unsigned = false;
-                        // no break on purpose
+                            // no break on purpose
                         case sci_uint64:
                             container = new ScilabInteger(new long[height][width], unsigned);
                             break;
@@ -357,13 +357,13 @@ class RawDataHandler implements ScilabHandler {
     public void endElement(HandledElement found) {
         switch (found) {
             case Array:
-            // no break on purpose
+                // no break on purpose
             case ScilabBoolean:
-            // no break on purpose
+                // no break on purpose
             case ScilabDouble:
-            // no break on purpose
+                // no break on purpose
             case ScilabInteger:
-            // no break on purpose
+                // no break on purpose
             case ScilabString: {
                 // defensive programming
                 if (!(saxHandler.parents.peek() instanceof RawDataDescriptor)) {
index d3f242c..8bfec8c 100644 (file)
@@ -13,7 +13,6 @@
 package org.scilab.modules.xcos.io.sax;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.HashMap;
@@ -28,7 +27,6 @@ import org.scilab.modules.xcos.VectorOfScicosID;
 import org.scilab.modules.xcos.graph.XcosDiagram;
 import org.scilab.modules.xcos.graph.model.ScicosObjectOwner;
 import org.scilab.modules.xcos.graph.model.XcosCell;
-import org.scilab.modules.xcos.io.sax.SAXHandler.UnresolvedReference;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;