X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftypes%2FTypes.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftypes%2FTypes.java;h=8817eb23c6979c25acefb81f7be30c4d87a8bc7c;hp=e1b89eece28ab21f14e87e3e2fd20745ec85e7c5;hb=d100a7b3f99b0595190d707c1b72f012e1ab7836;hpb=7396956f115b87067970f690588017fc05393e7a diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java index e1b89eece..8817eb23c 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java @@ -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 {