]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java
Deprecated methods in o.s.scl.compiler.Types class for parsing types
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / Types.java
index e1b89eece28ab21f14e87e3e2fd20745ec85e7c5..8817eb23c6979c25acefb81f7be30c4d87a8bc7c 100644 (file)
@@ -7,6 +7,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;
+import org.simantics.scl.compiler.environment.Environments;
 import org.simantics.scl.compiler.errors.Locations;
 import org.simantics.scl.compiler.internal.parsing.exceptions.SCLSyntaxErrorException;
 import org.simantics.scl.compiler.internal.parsing.parser.SCLParserImpl;
@@ -1183,14 +1184,27 @@ public class Types {
         return effect;
     }
 
+    /**
+     * Use {@link Environments#getType(org.simantics.scl.compiler.environment.Environment, String)} instead.
+     */
+    @Deprecated
     public static Type parseType(ITypeEnvironment environment, String text) throws SCLTypeParseException {
         return parseType(new TypeElaborationContext(environment), text);
     }
 
+    /**
+     * This method uses DUMMY_TYPE_ENVIRONMENT that almost does anything useful. Use
+     * {@link Environments#getType(org.simantics.scl.compiler.environment.Environment, String)} instead.
+     */
+    @Deprecated
     public static Type parseType(String text) throws SCLTypeParseException {
         return parseType(new TypeElaborationContext(DUMMY_TYPE_ENVIRONMENT), text);
     }
-    
+
+    /**
+     * Use {@link Environments#getType(org.simantics.scl.compiler.environment.Environment, String)} instead.
+     */
+    @Deprecated
     private static Type parseType(TypeElaborationContext context, String text) throws SCLTypeParseException {
         SCLParserImpl parser = new SCLParserImpl(new StringReader(text));
         try {