]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/NameExistenceChecks.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / compilation / NameExistenceChecks.java
index 090f200c437a7ff4049fb5d79127ddc5795d3df6..d21e215f6ac0e156d4135e93ded5e58eeeb9539e 100644 (file)
@@ -1,48 +1,48 @@
-package org.simantics.scl.compiler.compilation;\r
-\r
-import org.simantics.scl.compiler.elaboration.modules.SCLValue;\r
-import org.simantics.scl.compiler.elaboration.modules.TypeDescriptor;\r
-import org.simantics.scl.compiler.environment.AmbiguousNameException;\r
-import org.simantics.scl.compiler.environment.Environment;\r
-import org.simantics.scl.compiler.errors.ErrorLog;\r
-import org.simantics.scl.compiler.top.SCLCompilerConfiguration;\r
-\r
-public class NameExistenceChecks {\r
-    public static void checkIfValueExists(ErrorLog errorLog, long location,\r
-            Environment environment, String name) {\r
-        if(SCLCompilerConfiguration.ALLOW_OVERLOADING)\r
-            return;\r
-        else {\r
-            try {\r
-                SCLValue value = environment.getLocalNamespace().getValue(name);\r
-                if(value != null)\r
-                    errorLog.log(location,\r
-                            "Value " + name + " is already defined in the module " + \r
-                                    value.getName().module + \r
-                            " that is imported to the default namespace.");\r
-            } catch(AmbiguousNameException e) {\r
-                errorLog.log(location,\r
-                        "Value " + name + " is already defined in the modules " + \r
-                                e.conflictingModules[0] + " and  " + e.conflictingModules[1] +  \r
-                        " that are imported to the default namespace.");\r
-            }\r
-        }\r
-    }\r
-    \r
-    public static void checkIfTypeExists(ErrorLog errorLog, long location,\r
-            Environment environment, String name) {\r
-        try {\r
-            TypeDescriptor tdesc = environment.getLocalNamespace().getTypeDescriptor(name);\r
-            if(tdesc != null)\r
-                errorLog.log(location,\r
-                        "Type " + name + " is already defined in the module " + \r
-                                tdesc.name.module + \r
-                        " that is imported to the default namespace.");\r
-        } catch(AmbiguousNameException e) {\r
-            errorLog.log(location,\r
-                    "Type " + name + " is already defined in the modules " + \r
-                            e.conflictingModules[0] + " and  " + e.conflictingModules[1] +  \r
-                    " that are imported to the default namespace.");\r
-        }\r
-    }\r
-}\r
+package org.simantics.scl.compiler.compilation;
+
+import org.simantics.scl.compiler.elaboration.modules.SCLValue;
+import org.simantics.scl.compiler.elaboration.modules.TypeDescriptor;
+import org.simantics.scl.compiler.environment.AmbiguousNameException;
+import org.simantics.scl.compiler.environment.Environment;
+import org.simantics.scl.compiler.errors.ErrorLog;
+import org.simantics.scl.compiler.top.SCLCompilerConfiguration;
+
+public class NameExistenceChecks {
+    public static void checkIfValueExists(ErrorLog errorLog, long location,
+            Environment environment, String name) {
+        if(SCLCompilerConfiguration.ALLOW_OVERLOADING)
+            return;
+        else {
+            try {
+                SCLValue value = environment.getLocalNamespace().getValue(name);
+                if(value != null)
+                    errorLog.log(location,
+                            "Value " + name + " is already defined in the module " + 
+                                    value.getName().module + 
+                            " that is imported to the default namespace.");
+            } catch(AmbiguousNameException e) {
+                errorLog.log(location,
+                        "Value " + name + " is already defined in the modules " + 
+                                e.conflictingModules[0] + " and  " + e.conflictingModules[1] +  
+                        " that are imported to the default namespace.");
+            }
+        }
+    }
+    
+    public static void checkIfTypeExists(ErrorLog errorLog, long location,
+            Environment environment, String name) {
+        try {
+            TypeDescriptor tdesc = environment.getLocalNamespace().getTypeDescriptor(name);
+            if(tdesc != null)
+                errorLog.log(location,
+                        "Type " + name + " is already defined in the module " + 
+                                tdesc.name.module + 
+                        " that is imported to the default namespace.");
+        } catch(AmbiguousNameException e) {
+            errorLog.log(location,
+                    "Type " + name + " is already defined in the modules " + 
+                            e.conflictingModules[0] + " and  " + e.conflictingModules[1] +  
+                    " that are imported to the default namespace.");
+        }
+    }
+}