]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorExpressionVisitor.java
Externalize strings
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / diagram / monitor / MonitorExpressionVisitor.java
index f528035e5b260a1fdec84709f56ab55396f9b3cc..3a96e1e7c05e9915fb973132ddbaafb5e5b621f5 100644 (file)
@@ -69,32 +69,32 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
        }
 
        public void outAConstantValue(AConstantValue node) {
-               if(DEBUG) System.out.println("outAConstantValue " + node);
+               if(DEBUG) System.out.println("outAConstantValue " + node); //$NON-NLS-1$
                stack.push(Double.valueOf(node.toString()));
        }
 
        public void outAStringValue(AStringValue node) {
-               if(DEBUG) System.out.println("outAStringValue " + node);
+               if(DEBUG) System.out.println("outAStringValue " + node); //$NON-NLS-1$
                String value = node.toString();
                stack.push(value.substring(1, value.length() - 2));
        }
 
        public void outAAddressValue(AAddressValue node) {
-               if(DEBUG) System.out.println("outAAddressValue " + node);
+               if(DEBUG) System.out.println("outAAddressValue " + node); //$NON-NLS-1$
                stack.push('&' + node.getRange().toString());
        }
 
        @Override
        public void outASingleRange(ASingleRange node) {
                
-               if(DEBUG) System.out.println("outASingleRange " + node);
+               if(DEBUG) System.out.println("outASingleRange " + node); //$NON-NLS-1$
                
        }
        
        @Override
        public void outARviValue(ARviValue node) {
                
-               if(DEBUG) System.out.println("outARviValue " + node);
+               if(DEBUG) System.out.println("outARviValue " + node); //$NON-NLS-1$
                
                String rvi = node.toString().trim();
                
@@ -103,7 +103,7 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
                        stack.push(format(var.getValue(graph)));
                } catch (DatabaseException e) {
                        Logger.defaultLogError(e);
-                       stack.push("<No value for '" + rvi + "'>");
+                       stack.push("<No value for '" + rvi + "'>"); //$NON-NLS-1$ //$NON-NLS-2$
                }
                
        }
@@ -111,10 +111,10 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
        @Override
        public void outAVariablePrimary(AVariablePrimary node) {
                
-               if(DEBUG) System.out.println("outAVariablePrimary " + node);
+               if(DEBUG) System.out.println("outAVariablePrimary " + node); //$NON-NLS-1$
                
                String identifier = node.toString().trim();
-               if("value".equals(identifier)) {
+               if("value".equals(identifier)) { //$NON-NLS-1$
                        try {
                                stack.push(format(variable.getValue(graph)));
                        } catch (DatabaseException e) {
@@ -128,7 +128,7 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
        
        public void outARangeValue(ARangeValue node) {
 
-               if(DEBUG) System.out.println("outARangeValue " + node);
+               if(DEBUG) System.out.println("outARangeValue " + node); //$NON-NLS-1$
 
                String identifier = node.getRange().toString().trim();
                stack.push(identifier);
@@ -138,7 +138,7 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
        private String format(Object o) {
                if(formatter != null)
                        return formatter.format(o);
-               else return o != null ? o.toString() : "";
+               else return o != null ? o.toString() : ""; //$NON-NLS-1$
        }
 
        private double extractValue(Object o) {
@@ -170,7 +170,7 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
 
        public void outAPlusExpression(APlusExpression node) {
                
-               if(DEBUG) System.out.println("outAPlusExpression " + node);
+               if(DEBUG) System.out.println("outAPlusExpression " + node); //$NON-NLS-1$
                
                Object o2 = stack.pop();
                Object o1 = stack.pop();
@@ -182,7 +182,7 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
 
        public void outAMultMultiplicative(AMultMultiplicative node) {
                
-               if(DEBUG) System.out.println("outAMultiplicative " + node);
+               if(DEBUG) System.out.println("outAMultiplicative " + node); //$NON-NLS-1$
                
                Object o1 = stack.pop();
                Object o2 = stack.pop();
@@ -203,14 +203,14 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
 
        public void outAFunctionPrimary(AFunctionPrimary node) {
 
-               if(DEBUG) System.out.println("outAFunctionPrimary " + node);
+               if(DEBUG) System.out.println("outAFunctionPrimary " + node); //$NON-NLS-1$
 
                try {
 
-                       String functionName = node.getFunc().getText().replace("(", "");
+                       String functionName = node.getFunc().getText().replace("(", ""); //$NON-NLS-1$ //$NON-NLS-2$
 
                        if (DEBUG_APPLICATION)
-                           System.out.println("function apply " + functionName);
+                           System.out.println("function apply " + functionName); //$NON-NLS-1$
 
                        Function function = builtins.get(functionName);
                        if (function != null) {
@@ -261,7 +261,7 @@ public class MonitorExpressionVisitor extends DepthFirstAdapter {
                                } else {
 
                                    //stack.push(null);
-                                   throw new EvaluationException("Function not found in dependencies: '" + functionName + "'");
+                                   throw new EvaluationException("Function not found in dependencies: '" + functionName + "'"); //$NON-NLS-1$ //$NON-NLS-2$
 
                                }