]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet/src/org/simantics/spreadsheet/solver/SpreadsheetCellEditable.java
Spreadsheet changes
[simantics/platform.git] / bundles / org.simantics.spreadsheet / src / org / simantics / spreadsheet / solver / SpreadsheetCellEditable.java
similarity index 73%
rename from bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCellEditable.java
rename to bundles/org.simantics.spreadsheet/src/org/simantics/spreadsheet/solver/SpreadsheetCellEditable.java
index 81033f44cf15367b6da72ccc726267c0866126e5..d3d57c4988709d04cbf43eed31ca2840c9f6a8a1 100644 (file)
@@ -1,14 +1,17 @@
-package org.simantics.spreadsheet.graph;
+package org.simantics.spreadsheet.solver;
 
 import java.util.Collections;
 import java.util.Map;
 
 import org.simantics.databoard.binding.mutable.Variant;
 
+@SuppressWarnings("rawtypes")
 public class SpreadsheetCellEditable implements SheetNode {
 
-    public final SpreadsheetCell cell;
+    private static final long serialVersionUID = -5078387091775971986L;
     
+    public final SpreadsheetCell cell;
+
     public SpreadsheetCellEditable(SpreadsheetCell spreadsheetCell) {
         this.cell = spreadsheetCell;
     }
@@ -27,7 +30,7 @@ public class SpreadsheetCellEditable implements SheetNode {
     public Map getProperties() {
         return Collections.emptyMap();
     }
-    
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -57,19 +60,19 @@ public class SpreadsheetCellEditable implements SheetNode {
         if (cell.content == null || cell.content instanceof SpreadsheetFormula || cell.content instanceof SpreadsheetSCLConstant)
             return false;
         if (cell.content instanceof String) {
-               String content = (String) cell.content;
-               if (content.isEmpty())
-                       return false;
+            String content = (String) cell.content;
+            if (content.isEmpty())
+                return false;
         }
         if (cell.content instanceof Variant) {
-               Variant content = (Variant) cell.content;
-               if (content.getValue() == null)
-                       return false;
-               if (content.getValue() instanceof String) {
-                       String actualContent = (String) content.getValue();
-                       if (actualContent.isEmpty())
-                               return false;
-               }
+            Variant content = (Variant) cell.content;
+            if (content.getValue() == null)
+                return false;
+            if (content.getValue() instanceof String) {
+                String actualContent = (String) content.getValue();
+                if (actualContent.isEmpty())
+                    return false;
+            }
         }
 //        System.out.println("content is " + cell.content);
         return true;