]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Remove some prints
authorAntti Villberg <antti.villberg@semantum.fi>
Sun, 18 Nov 2018 05:48:51 +0000 (07:48 +0200)
committerAntti Villberg <antti.villberg@semantum.fi>
Tue, 20 Nov 2018 07:17:09 +0000 (09:17 +0200)
Change-Id: Ie37cb663eab85812f54d50de10b738b6eda97004

bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/function/All.java
bundles/org.simantics.spreadsheet/src/org/simantics/spreadsheet/solver/SpreadsheetBook.java

index 976f2aa07c57ae0dfac018b3507c3ffad4b3a03c..52b7cab5cea0e542218d1a4ec666a0dbf7232f09 100644 (file)
@@ -182,12 +182,6 @@ public class SpreadsheetGraphUtils {
                        
         SpreadsheetSynchronizationEventHandler handler = new SpreadsheetSynchronizationEventHandler(graph, book);
         
-//        System.err.println("sessionName : " + sessionName);
-//        System.err.println("bookResource : " + graph.getURI(bookResource));
-//        System.err.println("configuration : " + configuration.getURI(graph));
-//        System.err.println("realm : " + realm);
-//        System.err.println("book : " + book);
-        
         if (changeFlags == null) {
             synchronizer.fullSynchronization(configuration, handler);
         } else {
@@ -207,14 +201,6 @@ public class SpreadsheetGraphUtils {
             synchronizer.partialSynchronization(configuration, handler, changeFlags);
         }
         
-//        book.accept(new InvalidateAll());
-//        realm.getNodeManager().refreshVariables();
-//        mapping.currentRevision = synchronizer.getHeadRevisionId();
-//        mapping.setTrustUids(true);
-        // Clean up queries
-//        QueryControl qc = g.getService(QueryControl.class);
-//        qc.flush(g);
-//        TimeLogger.log("Finished full synchronization");
         realm.getNodeManager().fireNodeListeners();
         return handler.getDidChanges();
         
@@ -492,7 +478,6 @@ public class SpreadsheetGraphUtils {
     }
     
     public static Variant extRefVariable(ReadGraph graph, Variable var) throws DatabaseException {
-        System.err.println("extRefVariable " + var.getURI(graph));
         return new Variant(Bindings.VOID, new ExternalRefVariable(graph, var));
     }
     
@@ -506,13 +491,11 @@ public class SpreadsheetGraphUtils {
         
         @Override
         public void listen(Object context, ExternalRefListener listener) {
-            System.err.println("listen " + listener);
             Simantics.getSession().asyncRequest(new UnaryRead<String, Variant>(uri) {
 
                 @Override
                 public Variant perform(ReadGraph graph) throws DatabaseException {
                     Variable variable = Variables.getVariable(graph, parameter);
-                    System.err.println("ExternalRef value for " + variable.getURI(graph));
                     return variable.getVariantValue(graph);
                 }
                 
@@ -520,7 +503,6 @@ public class SpreadsheetGraphUtils {
 
                 @Override
                 public void execute(Variant result) {
-                    System.err.println("execute " + result);
                     listener.newValue(result);
                 }
 
@@ -540,7 +522,6 @@ public class SpreadsheetGraphUtils {
     }
 
     public static Variant extRefActiveVariable(ReadGraph graph, Variable var) throws DatabaseException {
-        System.err.println("extRefActiveVariable " + var.getURI(graph));
         return new Variant(Bindings.VOID, new ExternalRefActiveVariable(graph, var));
     }
     
@@ -554,24 +535,19 @@ public class SpreadsheetGraphUtils {
         
         @Override
         public void listen(Object context, ExternalRefListener listener) {
-            System.err.println("listen " + context + " " + listener);
             Simantics.getSession().asyncRequest(new BinaryRead<String, String, Variant>((String)context, uri) {
 
                 @Override
                 public Variant perform(ReadGraph graph) throws DatabaseException {
                     Variable contextVariable = Variables.getVariable(graph, parameter);
-                    System.err.println("extref1 " + contextVariable.getURI(graph));
                     Variable configVariable = Variables.getVariable(graph, parameter2);
-                    System.err.println("extref2 " + configVariable.getURI(graph));
                     Variable activeVariable = Variables.switchPossibleContext(graph, configVariable, contextVariable.getRepresents(graph));
-                    System.err.println("ExternalRef value for " + activeVariable.getURI(graph));
                     return activeVariable.getVariantValue(graph);
                 }
             }, new Listener<Variant>() {
 
                 @Override
                 public void execute(Variant result) {
-                    System.err.println("execute " + result);
                     listener.newValue(result);
                 }
 
index 9b0f708df8c11628fbb1c13af1dabf76bf46b669..865a60ebe8c89e0d56eeb95024be98ceda1512e9 100644 (file)
@@ -113,7 +113,6 @@ public class All {
 
         @Override
         public void setValue(WriteGraph graph, Variable context, Object value, Binding binding) throws DatabaseException {
-            System.out.println("contentValueAccessor.context=" + context.getURI(graph));
             if(value instanceof String) {
 
                 // Expressions are given as string
@@ -134,7 +133,6 @@ public class All {
                 } else {
 
                     Variable cell = context.getParent(graph);
-                    System.out.println("setValue : " + cell.getURI(graph));
 
                     String formula = text.substring(1);
 
@@ -153,7 +151,7 @@ public class All {
 
                     Variant v = new Variant(ExcelFormula.BINDING, new ExcelFormula(formula));
                     Layer0Utils.claimLiteral(graph, cell.getRepresents(graph), SHEET.Cell_content, SHEET.Cell_content_Inverse, Layer0.getInstance(graph).Variant, v, Bindings.VARIANT);
-                    
+
                 }
             } else {
 
@@ -195,9 +193,6 @@ public class All {
         private void setValueToEngine(WriteGraph graph, Variable cell, Variable context, Object value, Binding binding) throws DatabaseException {
             Variable sheet = cell.getParent(graph);
 
-            if(Bindings.STRING.equals(binding) && !(value instanceof String))
-                System.err.println("asd");
-
             SpreadsheetResource SHEET = SpreadsheetResource.getInstance(graph);
 
             while(!sheet.getType(graph).equals(SHEET.Spreadsheet)) {
@@ -433,17 +428,11 @@ public class All {
 
             return super.getVariable(graph, context, name);
 
-//                     TMap<String, Variable> map = new THashMap<String, Variable>();
-//                     getVariables(graph, context, map);
-//                     return map.get(name);
-
         }
 
         @Override
         public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
 
-            System.err.println("getVariables " + context.getURI(graph));
-
             if(ProxyVariables.isProxy(graph, context))
                 return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, Collections.emptyMap(), map);
 
@@ -751,9 +740,7 @@ public class All {
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> CellEditor")
     public static CellEditor<Write> textCellEditor(ReadGraph graph, Resource resource, final Variable context_) throws DatabaseException {
 
-        System.out.println("Context URI : " + context_.getURI(graph));
         Variable cells = context_.getParent(graph);
-        System.out.println("Cell URI : " + cells.getURI(graph));
 
         return new GraphCellEditorAdapter(cells) {
 
@@ -777,7 +764,6 @@ public class All {
                     if (runCell != null)
                         runCell.setPropertyValue(graph, SHEET.Cell_content, value, Bindings.VARIANT);
                 } else if(ClientModel.CONTENT_EXPRESSION.equals(property)) {
-                    System.err.println("cell: " + cell.getURI(graph));
                     cell.setPropertyValue(graph, SHEET.Cell_content, value, Bindings.STRING);
                     Variable runCell = null;
                     Object transactionContext = transaction.getContext();
@@ -920,7 +906,6 @@ public class All {
                     runCell = Variables.switchRealization(graph, cell, context.getRepresents(graph), context);
                 }
 
-                //Variant content = cell.getPropertyValue(graph, SHEET.Cell_content, Bindings.VARIANT);
                 Object object = cell.getPropertyValue(graph, SHEET.Cell_content);
                 Variant content = null;
                 if (object instanceof Variant) {
index 912f8646591511a3fb812774a2fb9eb72180d9e0..8f6b9d80c676185989e4c1f0f82dd274f57c3ae4 100644 (file)
@@ -64,7 +64,6 @@ public class SpreadsheetBook implements StandardNodeManagerSupport<SheetNode>, S
 
     public SpreadsheetBook(String context) {
         getNewId(this);
-        System.err.println("SpreadsheetBook, context is " + context);
         mapping = new SpreadsheetMapping(new SheetLineComponent(""));
         this.context = context;
     }
@@ -464,7 +463,6 @@ public class SpreadsheetBook implements StandardNodeManagerSupport<SheetNode>, S
     class ExternalRefData {
         private Variant value = DEFAULT;
         public ExternalRefData(long referenceKey, ExternalRef ref) {
-            System.err.println("listen to " + ref);
             ref.listen(context, new ExternalRefListener() {
                 
                 boolean isDisposed = false;
@@ -505,7 +503,6 @@ public class SpreadsheetBook implements StandardNodeManagerSupport<SheetNode>, S
     }
 
     Variant getExternalRefValue(long referenceKey, ExternalRef ref) {
-        System.err.println("getExternalRefValue " + ref);
         ExternalRefData data = externalRefMap.get(ref);
         if(data == null) {
             registerListening(referenceKey, ref);