diff --git a/ReadMe.md b/ReadMe.md index a773e696606..e499805f7d9 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -96,7 +96,7 @@ Currently only committers can assign issues to themselves so just add a comment A nice gentle way to contribute would be to review the [API docs](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/index.html) and find classes or functions which are not documented very well and submit a patch. -In particular it'd be great if all functions included a nice example of how to use it such as for the filter() function on Collection. This is implemented using the @includeFunctionBody macro to include code from a test function. This serves as a double win; the API gets better documented with nice examples to help new users and the code gets more test coverage. +In particular it'd be great if all functions included a nice example of how to use it such as for the filter() function on Collection. This is implemented using the @includeFunctionBody macro to include code from a test function. This serves as a double win; the API gets better documented with nice examples to help new users and the code gets more test coverage. Also the [JavaScript translation](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) could really use your help. See the [JavaScript contribution section](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) for more details. diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/state/JetTypeMapper.java b/compiler/backend/src/org/jetbrains/jet/codegen/state/JetTypeMapper.java index 03099cf067f..4d1ceaf4a4c 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/state/JetTypeMapper.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/state/JetTypeMapper.java @@ -40,7 +40,6 @@ import org.jetbrains.jet.lang.resolve.calls.util.ExpressionAsFunctionDescriptor; import org.jetbrains.jet.lang.resolve.java.AsmTypeConstants; import org.jetbrains.jet.lang.resolve.java.JvmAbi; import org.jetbrains.jet.lang.resolve.java.PackageClassUtils; -import org.jetbrains.jet.lang.resolve.java.descriptor.JavaClassDescriptor; import org.jetbrains.jet.lang.resolve.java.descriptor.JavaClassStaticsPackageFragmentDescriptor; import org.jetbrains.jet.lang.resolve.java.mapping.KotlinToJavaTypesMap; import org.jetbrains.jet.lang.resolve.name.FqNameUnsafe; @@ -75,15 +74,15 @@ public class JetTypeMapper extends BindingTraceAware { */ IMPL, /** - * jet.Int is mapped to I + * kotlin.Int is mapped to I */ VALUE, /** - * jet.Int is mapped to Ljava/lang/Integer; + * kotlin.Int is mapped to Ljava/lang/Integer; */ TYPE_PARAMETER, /** - * jet.Int is mapped to Ljava/lang/Integer; + * kotlin.Int is mapped to Ljava/lang/Integer; * No projections allowed in immediate arguments */ SUPER_TYPE diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/mapping/KotlinToJavaTypesMap.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/mapping/KotlinToJavaTypesMap.java index 06985c24696..e07b1552560 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/mapping/KotlinToJavaTypesMap.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/mapping/KotlinToJavaTypesMap.java @@ -25,7 +25,6 @@ import org.jetbrains.jet.lang.resolve.java.AsmTypeConstants; import org.jetbrains.jet.lang.resolve.java.JvmClassName; import org.jetbrains.jet.lang.resolve.java.JvmPrimitiveType; import org.jetbrains.jet.lang.resolve.name.FqName; -import org.jetbrains.jet.lang.resolve.name.FqNameUnsafe; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; import org.jetbrains.jet.lang.types.lang.PrimitiveType; @@ -84,10 +83,10 @@ public class KotlinToJavaTypesMap extends JavaToKotlinClassMapBuilder { /** * E.g. - * jet.Throwable -> java.lang.Throwable - * jet.Deprecated -> java.lang.annotation.Deprecated - * jet.Int -> java.lang.Integer - * jet.IntArray -> null + * kotlin.Throwable -> java.lang.Throwable + * kotlin.deprecated -> java.lang.annotation.Deprecated + * kotlin.Int -> java.lang.Integer + * kotlin.IntArray -> null */ @Nullable public FqName getKotlinToJavaFqName(@NotNull FqName fqName) { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/CastDiagnosticsUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/CastDiagnosticsUtil.java index 7a5d69b179b..150b6a18c51 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/CastDiagnosticsUtil.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/CastDiagnosticsUtil.java @@ -38,11 +38,11 @@ public class CastDiagnosticsUtil { /** * Two types are related, roughly, when one is a subtype or supertype of the other. *

- * Note that some types have platform-specific counterparts, i.e. jet.String is mapped to java.lang.String, + * Note that some types have platform-specific counterparts, i.e. kotlin.String is mapped to java.lang.String, * such types (and all their sub- and supertypes) are related too. *

* Due to limitations in PlatformToKotlinClassMap, we only consider mapping of platform classes to Kotlin classed - * (i.e. java.lang.String -> jet.String) and ignore mappings that go the other way. + * (i.e. java.lang.String -> kotlin.String) and ignore mappings that go the other way. */ private static boolean isRelated(@NotNull JetType a, @NotNull JetType b, @NotNull PlatformToKotlinClassMap platformToKotlinClassMap) { List aTypes = mapToPlatformIndependentTypes(a, platformToKotlinClassMap); diff --git a/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/LightClassUtil.java b/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/LightClassUtil.java index 19ddcbce7ec..cc6db84fc2d 100644 --- a/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/LightClassUtil.java +++ b/compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/LightClassUtil.java @@ -41,8 +41,8 @@ import org.jetbrains.jet.lang.resolve.java.PackageClassUtils; import org.jetbrains.jet.lang.resolve.java.jetAsJava.KotlinLightMethod; import org.jetbrains.jet.lang.resolve.name.FqName; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; -import org.jetbrains.jet.utils.UtilsPackage; import org.jetbrains.jet.utils.KotlinVfsUtil; +import org.jetbrains.jet.utils.UtilsPackage; import java.io.File; import java.net.MalformedURLException; @@ -56,7 +56,7 @@ public class LightClassUtil { /** * Checks whether the given file is loaded from the location where Kotlin's built-in classes are defined. - * As of today, this is core/builtins/native/jet directory and files such as Any.kt, Nothing.kt etc. + * As of today, this is core/builtins/native/kotlin directory and files such as Any.kt, Nothing.kt etc. * * Used to skip JetLightClass creation for built-ins, because built-in classes have no Java counterparts */ diff --git a/compiler/tests/org/jetbrains/jet/FqNameTest.java b/compiler/tests/org/jetbrains/jet/FqNameTest.java index cbdb0474839..cc3544ced46 100644 --- a/compiler/tests/org/jetbrains/jet/FqNameTest.java +++ b/compiler/tests/org/jetbrains/jet/FqNameTest.java @@ -39,48 +39,48 @@ public class FqNameTest { @Test public void pathLevel1() { - List path = new FqName("com").path(); + List path = new FqName("org").path(); Assert.assertEquals(2, path.size()); Assert.assertEquals("", path.get(0).asString()); - Assert.assertEquals("com", path.get(1).asString()); - Assert.assertEquals("com", path.get(1).shortName().asString()); + Assert.assertEquals("org", path.get(1).asString()); + Assert.assertEquals("org", path.get(1).shortName().asString()); Assert.assertEquals("", path.get(1).parent().asString()); } @Test public void pathLevel2() { - List path = new FqName("com.jetbrains").path(); + List path = new FqName("org.jetbrains").path(); Assert.assertEquals(3, path.size()); Assert.assertEquals("", path.get(0).asString()); - Assert.assertEquals("com", path.get(1).asString()); - Assert.assertEquals("com", path.get(1).shortName().asString()); + Assert.assertEquals("org", path.get(1).asString()); + Assert.assertEquals("org", path.get(1).shortName().asString()); Assert.assertEquals("", path.get(1).parent().asString()); - Assert.assertEquals("com.jetbrains", path.get(2).asString()); + Assert.assertEquals("org.jetbrains", path.get(2).asString()); Assert.assertEquals("jetbrains", path.get(2).shortName().asString()); - Assert.assertEquals("com", path.get(2).parent().asString()); + Assert.assertEquals("org", path.get(2).parent().asString()); } @Test public void pathLevel3() { - List path = new FqName("com.jetbrains.jet").path(); + List path = new FqName("org.jetbrains.kotlin").path(); Assert.assertEquals(4, path.size()); Assert.assertEquals("", path.get(0).asString()); - Assert.assertEquals("com", path.get(1).asString()); - Assert.assertEquals("com", path.get(1).shortName().asString()); + Assert.assertEquals("org", path.get(1).asString()); + Assert.assertEquals("org", path.get(1).shortName().asString()); Assert.assertEquals("", path.get(1).parent().asString()); - Assert.assertEquals("com.jetbrains", path.get(2).asString()); + Assert.assertEquals("org.jetbrains", path.get(2).asString()); Assert.assertEquals("jetbrains", path.get(2).shortName().asString()); - Assert.assertEquals("com", path.get(2).parent().asString()); - Assert.assertEquals("com.jetbrains.jet", path.get(3).asString()); - Assert.assertEquals("jet", path.get(3).shortName().asString()); - Assert.assertEquals("com.jetbrains", path.get(3).parent().asString()); + Assert.assertEquals("org", path.get(2).parent().asString()); + Assert.assertEquals("org.jetbrains.kotlin", path.get(3).asString()); + Assert.assertEquals("kotlin", path.get(3).shortName().asString()); + Assert.assertEquals("org.jetbrains", path.get(3).parent().asString()); } @Test public void pathSegments() { Assert.assertEquals(Lists.newArrayList(), new FqName("").pathSegments()); - for (String name : new String[] { "com", "com.jetbrains", "com.jetbrains.jet" }) { + for (String name : new String[] { "org", "org.jetbrains", "org.jetbrains.kotlin" }) { List segments = new FqName(name).pathSegments(); List segmentsStrings = new ArrayList(); for (Name segment : segments) { diff --git a/compiler/tests/org/jetbrains/jet/codegen/PackageGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/PackageGenTest.java index b6dfd30385a..403bce80bd9 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PackageGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PackageGenTest.java @@ -23,6 +23,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import static org.jetbrains.jet.codegen.CodegenTestUtil.assertIsCurrentTime; @@ -194,37 +195,37 @@ public class PackageGenTest extends CodegenTestCase { public void testJavaEquals() throws Exception { loadText("fun foo(s1: String, s2: String) = s1 == s2"); Method main = generateFunction(); - assertEquals(Boolean.TRUE, main.invoke(null, new String("jet"), new String("jet"))); - assertEquals(Boolean.FALSE, main.invoke(null, new String("jet"), new String("ceylon"))); + assertEquals(Boolean.TRUE, main.invoke(null, new String("kotlin"), new String("kotlin"))); + assertEquals(Boolean.FALSE, main.invoke(null, new String("kotlin"), new String("ceylon"))); } public void testJavaNotEquals() throws Exception { loadText("fun foo(s1: String, s2: String) = s1 != s2"); Method main = generateFunction(); - assertEquals(Boolean.FALSE, main.invoke(null, new String("jet"), new String("jet"))); - assertEquals(Boolean.TRUE, main.invoke(null, new String("jet"), new String("ceylon"))); + assertEquals(Boolean.FALSE, main.invoke(null, new String("kotlin"), new String("kotlin"))); + assertEquals(Boolean.TRUE, main.invoke(null, new String("kotlin"), new String("ceylon"))); } public void testJavaEqualsNull() throws Exception { loadText("fun foo(s1: String?, s2: String?) = s1 == s2"); Method main = generateFunction(); assertEquals(Boolean.TRUE, main.invoke(null, null, null)); - assertEquals(Boolean.FALSE, main.invoke(null, "jet", null)); - assertEquals(Boolean.FALSE, main.invoke(null, null, "jet")); + assertEquals(Boolean.FALSE, main.invoke(null, "kotlin", null)); + assertEquals(Boolean.FALSE, main.invoke(null, null, "kotlin")); } public void testEqualsNullLiteral() throws Exception { loadText("fun foo(s: String?) = s == null"); Method main = generateFunction(); assertEquals(Boolean.TRUE, main.invoke(null, new Object[] { null })); - assertEquals(Boolean.FALSE, main.invoke(null, "jet")); + assertEquals(Boolean.FALSE, main.invoke(null, "kotlin")); } public void testTripleEq() throws Exception { loadText("fun foo(s1: String?, s2: String?) = s1 === s2"); Method main = generateFunction(); - String s1 = new String("jet"); - String s2 = new String("jet"); + String s1 = new String("kotlin"); + String s2 = new String("kotlin"); assertEquals(Boolean.TRUE, main.invoke(null, s1, s1)); assertEquals(Boolean.FALSE, main.invoke(null, s1, s2)); } @@ -232,8 +233,8 @@ public class PackageGenTest extends CodegenTestCase { public void testTripleNotEq() throws Exception { loadText("fun foo(s1: String?, s2: String?) = s1 !== s2"); Method main = generateFunction(); - String s1 = new String("jet"); - String s2 = new String("jet"); + String s1 = new String("kotlin"); + String s2 = new String("kotlin"); assertEquals(Boolean.FALSE, main.invoke(null, s1, s1)); assertEquals(Boolean.TRUE, main.invoke(null, s1, s2)); } @@ -247,7 +248,7 @@ public class PackageGenTest extends CodegenTestCase { public void testStringPlus() throws Exception { loadText("fun foo(s1: String, s2: String) = s1 + s2"); Method main = generateFunction(); - assertEquals("jetLang", main.invoke(null, "jet", "Lang")); + assertEquals("kotlinLang", main.invoke(null, "kotlin", "Lang")); } public void testStringPlusChained() throws Exception { @@ -256,7 +257,7 @@ public class PackageGenTest extends CodegenTestCase { int firstStringBuilderCreation = text.indexOf("NEW java/lang/StringBuilder"); assertEquals(-1, text.indexOf("NEW java/lang/StringBuilder", firstStringBuilderCreation + 1)); Method main = generateFunction(); - assertEquals("jet Lang", main.invoke(null, "jet", " ", "Lang")); + assertEquals("kotlin Lang", main.invoke(null, "kotlin", " ", "Lang")); } public void testStringPlusEq() throws Exception { @@ -269,13 +270,13 @@ public class PackageGenTest extends CodegenTestCase { loadText("fun foo(s1: String, s2: String) = s1 < s2"); Method main = generateFunction(); assertEquals(Boolean.TRUE, main.invoke(null, "Ceylon", "Java")); - assertEquals(Boolean.FALSE, main.invoke(null, "Jet", "Java")); + assertEquals(Boolean.FALSE, main.invoke(null, "Kotlin", "Java")); } public void testElvis() throws Exception { loadText("fun foo(s: String?) = s ?: \"null\""); Method main = generateFunction(); - assertEquals("jet", main.invoke(null, "jet")); + assertEquals("kotlin", main.invoke(null, "kotlin")); assertEquals("null", main.invoke(null, new Object[] { null })); } @@ -289,7 +290,7 @@ public class PackageGenTest extends CodegenTestCase { public void testVarargs() throws Exception { loadText("fun foo() = java.util.Arrays.asList(\"IntelliJ\", \"IDEA\")"); Method main = generateFunction(); - java.util.List list = (java.util.List) main.invoke(null); + List list = (List) main.invoke(null); assertEquals(Arrays.asList("IntelliJ", "IDEA"), list); } @@ -339,11 +340,11 @@ public class PackageGenTest extends CodegenTestCase { } public void testArrayWrite() throws Exception { - loadText("fun foo(c: Array) { c[0] = \"jet\"; }"); + loadText("fun foo(c: Array) { c[0] = \"kotlin\"; }"); Method main = generateFunction(); String[] array = new String[] { null }; main.invoke(null, new Object[] { array }); - assertEquals("jet", array[0]); + assertEquals("kotlin", array[0]); } public void testArrayAugAssign() throws Exception { @@ -450,12 +451,12 @@ public class PackageGenTest extends CodegenTestCase { } public void testArrayAccessForArrayList() throws Exception { - loadText("import java.util.*; fun foo(l: ArrayList) { l[0] = \"Jet\" + l[0]; }"); + loadText("import java.util.*; fun foo(l: ArrayList) { l[0] = \"Kotlin\" + l[0]; }"); Method main = generateFunction(); ArrayList list = new ArrayList(); list.add("Language"); main.invoke(null, list); - assertEquals("JetLanguage", list.get(0)); + assertEquals("KotlinLanguage", list.get(0)); } public void testEscapeSequence() throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java index b3f95025791..ad109c6392f 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java @@ -77,7 +77,7 @@ public class JdkAnnotationsValidityTest extends UsefulTestCase { // // // KAnnotator produces above annotations and validation of TabularDataSupport results into: - // public open fun keySet(): jet.MutableSet defined in javax.management.openmbean.TabularDataSupport : + // public open fun keySet(): kotlin.MutableSet defined in javax.management.openmbean.TabularDataSupport : // [Incompatible types in superclasses: [Any?, Any, Any], Incompatible projection kinds in type arguments of super methods' return types: [out Any?, Any, Any]] private static final Set classesToIgnore = new HashSet(Arrays.asList("javax.management.openmbean.TabularDataSupport")); diff --git a/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/JvmClassName.java b/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/JvmClassName.java index 82ca42951fa..68ff909c0d9 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/JvmClassName.java +++ b/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/JvmClassName.java @@ -43,8 +43,8 @@ public class JvmClassName { private final static String CLASS_OBJECT_REPLACE_GUARD = ""; private final static String TRAIT_IMPL_REPLACE_GUARD = ""; - // Internal name: jet/Map$Entry - // FqName: jet.Map.Entry + // Internal name: kotlin/Map$Entry + // FqName: kotlin.Map.Entry private final String internalName; private FqName fqName; diff --git a/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/mapping/JavaToKotlinClassMap.java b/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/mapping/JavaToKotlinClassMap.java index 06d62aacc1a..a3c078a65f5 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/mapping/JavaToKotlinClassMap.java +++ b/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/mapping/JavaToKotlinClassMap.java @@ -24,9 +24,9 @@ import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor; import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor; import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor; import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptorImpl; -import org.jetbrains.jet.lang.resolve.java.AnnotationLoadingUtil; import org.jetbrains.jet.lang.resolve.DescriptorUtils; import org.jetbrains.jet.lang.resolve.constants.StringValue; +import org.jetbrains.jet.lang.resolve.java.AnnotationLoadingUtil; import org.jetbrains.jet.lang.resolve.java.JvmPrimitiveType; import org.jetbrains.jet.lang.resolve.java.resolver.DescriptorResolverUtils; import org.jetbrains.jet.lang.resolve.java.resolver.TypeUsage; @@ -110,7 +110,7 @@ public class JavaToKotlinClassMap extends JavaToKotlinClassMapBuilder implements annotation.setAnnotationType(annotationClass.getDefaultType()); ValueParameterDescriptor value = DescriptorResolverUtils.getAnnotationParameterByName( AnnotationLoadingUtil.DEFAULT_ANNOTATION_MEMBER_NAME, annotationClass); - assert value != null : "jet.deprecated must have one parameter called value"; + assert value != null : "kotlin.deprecated must have one parameter called value"; annotation.setValueArgument(value, new StringValue("Deprecated in Java", true)); return annotation; } diff --git a/idea/src/org/jetbrains/jet/plugin/caches/JetFromJavaDescriptorHelper.java b/idea/src/org/jetbrains/jet/plugin/caches/JetFromJavaDescriptorHelper.java index 83558e3909a..c5abd36ee52 100644 --- a/idea/src/org/jetbrains/jet/plugin/caches/JetFromJavaDescriptorHelper.java +++ b/idea/src/org/jetbrains/jet/plugin/caches/JetFromJavaDescriptorHelper.java @@ -38,16 +38,13 @@ import java.util.Collection; import java.util.Set; /** - * Number of helper methods for searching jet element prototypes in java. Methods use java indices for search. + * Number of helper methods for searching kotlin element prototypes in java. Methods use java indices for search. */ public class JetFromJavaDescriptorHelper { private JetFromJavaDescriptorHelper() { } - /** - * Get java equivalents for jet top level classes. - */ static Collection getClassesForKotlinPackages(Project project, GlobalSearchScope scope) { /* Will iterate through short name caches Kotlin packages from jar a class files will be collected from java cache diff --git a/idea/src/org/jetbrains/jet/plugin/caches/JetShortNamesCache.java b/idea/src/org/jetbrains/jet/plugin/caches/JetShortNamesCache.java index 63bd642afad..04c0f9912cc 100644 --- a/idea/src/org/jetbrains/jet/plugin/caches/JetShortNamesCache.java +++ b/idea/src/org/jetbrains/jet/plugin/caches/JetShortNamesCache.java @@ -56,7 +56,7 @@ import java.util.*; import static org.jetbrains.jet.plugin.caches.JetFromJavaDescriptorHelper.getTopLevelFunctionFqNames; /** - * Will provide both java elements from jet context and some special declarations special to jet. + * Will provide both java elements from kotlin context and some declarations special to kotlin. * All those declaration are planned to be used in completion. */ public class JetShortNamesCache extends PsiShortNamesCache { @@ -80,7 +80,7 @@ public class JetShortNamesCache extends PsiShortNamesCache { } /** - * Return jet class names form jet project sources which should be visible from java. + * Return kotlin class names from project sources which should be visible from java. */ @NotNull @Override @@ -97,7 +97,7 @@ public class JetShortNamesCache extends PsiShortNamesCache { } /** - * Return class names form jet sources in given scope which should be visible as Java classes. + * Return class names form kotlin sources in given scope which should be visible as Java classes. */ @NotNull @Override @@ -146,7 +146,7 @@ public class JetShortNamesCache extends PsiShortNamesCache { } /** - * Get jet non-extension top-level function names. Method is allowed to give invalid names - all result should be + * Get kotlin non-extension top-level function names. Method is allowed to give invalid names - all result should be * checked with getTopLevelFunctionDescriptorsByName(). * * @return diff --git a/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java b/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java index 2af5c3ae5c2..0a30231aca3 100644 --- a/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java +++ b/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java @@ -30,7 +30,7 @@ import org.jetbrains.jet.plugin.JetPluginUtil; import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache; /** - * Quick showing possible problems with jet internals in IDEA with a tooltips + * Quick showing possible problems with Kotlin internals in IDEA with tooltips */ public class DebugInfoAnnotator implements Annotator { diff --git a/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java b/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java index 80fc6265ff3..22675f9511c 100644 --- a/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java +++ b/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java @@ -230,12 +230,12 @@ public class DeprecatedAnnotationVisitor extends AfterAnalysisHighlightingVisito private static String getMessageFromAnnotationDescriptor(@NotNull AnnotationDescriptor descriptor) { ClassDescriptor classDescriptor = TypeUtils.getClassDescriptor(descriptor.getType()); - assert classDescriptor != null : "ClassDescriptor for jet.deprecated mustn't be null"; + assert classDescriptor != null : "ClassDescriptor for kotlin.deprecated mustn't be null"; ValueParameterDescriptor parameter = DescriptorResolverUtils.getAnnotationParameterByName( AnnotationLoadingUtil.DEFAULT_ANNOTATION_MEMBER_NAME, classDescriptor); - assert parameter != null : "jet.deprecated must have one parameter called value"; + assert parameter != null : "kotlin.deprecated must have one parameter called value"; CompileTimeConstant valueArgument = descriptor.getValueArgument(parameter); - assert valueArgument != null : "jet.deprecated must have value argument"; + assert valueArgument != null : "kotlin.deprecated must have value argument"; return (String) valueArgument.getValue(); } diff --git a/idea/src/org/jetbrains/jet/plugin/references/BuiltInsReferenceResolver.java b/idea/src/org/jetbrains/jet/plugin/references/BuiltInsReferenceResolver.java index 78543864bed..3a4dc9d955e 100644 --- a/idea/src/org/jetbrains/jet/plugin/references/BuiltInsReferenceResolver.java +++ b/idea/src/org/jetbrains/jet/plugin/references/BuiltInsReferenceResolver.java @@ -125,7 +125,7 @@ public class BuiltInsReferenceResolver extends AbstractProjectComponent { if (ApplicationManager.getApplication().isUnitTestMode()) { // In production, the above URL is enough as it contains sources for both native and compilable built-ins - // (it's simply "jet" directory in kotlin-plugin.jar) + // (it's simply the "kotlin" directory in kotlin-plugin.jar) // But in tests, sources of built-ins are not added to the classpath automatically, so we manually specify URLs for both: // LightClassUtil.getBuiltInsDirUrl() does so for native built-ins and the code below for compilable built-ins try { diff --git a/js/js.translator/src/org/jetbrains/k2js/translate/intrinsic/functions/factories/TopLevelFIF.java b/js/js.translator/src/org/jetbrains/k2js/translate/intrinsic/functions/factories/TopLevelFIF.java index e78eb9e0f26..2b97feaf281 100644 --- a/js/js.translator/src/org/jetbrains/k2js/translate/intrinsic/functions/factories/TopLevelFIF.java +++ b/js/js.translator/src/org/jetbrains/k2js/translate/intrinsic/functions/factories/TopLevelFIF.java @@ -56,7 +56,7 @@ public final class TopLevelFIF extends CompositeFIF { public JsExpression apply( @Nullable JsExpression receiver, @NotNull List arguments, @NotNull TranslationContext context ) { - assert arguments.size() == 1 : "Unexpected argument size for jet.identityEquals: " + arguments.size(); + assert arguments.size() == 1 : "Unexpected argument size for kotlin.identityEquals: " + arguments.size(); return new JsBinaryOperation(JsBinaryOperator.REF_EQ, receiver, arguments.get(0)); } }; diff --git a/libraries/stdlib/src/kotlin/ReadMe.md b/libraries/stdlib/src/kotlin/ReadMe.md index 4d853bbae74..5e2847f08a9 100644 --- a/libraries/stdlib/src/kotlin/ReadMe.md +++ b/libraries/stdlib/src/kotlin/ReadMe.md @@ -2,19 +2,19 @@ There are a number of extension functions on [Collection](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Collection-extensions.html), [Iterator](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Iterator-extensions.html), [Map](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Map-extensions.html) and arrays to allow easy composition collections using familiar combinators like -* filter() -* flatMap() -* map() -* fold() +* filter() +* flatMap() +* map() +* fold() -Functions on [Collection](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Collection-extensions.html), [Map](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Map-extensions.html) and arrays are all *eager*, in that methods like map() will create a complete result List when the method completes. +Functions on [Collection](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Collection-extensions.html), [Map](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Map-extensions.html) and arrays are all *eager*, in that methods like map() will create a complete result List when the method completes. -Functions on [Iterator](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Iterator-extensions.html) are *lazy* so that they try to return new iterators that lazily evaluate things. For example map() returns a new Iterator that lazily maps the values in the original iterator. +Functions on [Iterator](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Iterator-extensions.html) are *lazy* so that they try to return new iterators that lazily evaluate things. For example map() returns a new Iterator that lazily maps the values in the original iterator. ## Preconditions When writing code it is recommended you add checks early in a function to ensure parameters are valid. There are a number of helper methods for this: -* assert(Boolean) and assert(Boolean) { lazyMessage } which use the JDK's assertion feature so they can be disabled using the -ea option -* check(Boolean) and check(Boolean) { lazyMessage } for checking something to be true and throwing [IllegalStateException](http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html) if not -* require(Boolean) and require(Boolean) { lazyMessage } for requiring something to be true and throwing [IllegalArgumentException](http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html) if not +* assert(Boolean) and assert(Boolean) { lazyMessage } which use the JDK's assertion feature so they can be disabled using the -ea option +* check(Boolean) and check(Boolean) { lazyMessage } for checking something to be true and throwing [IllegalStateException](http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html) if not +* require(Boolean) and require(Boolean) { lazyMessage } for requiring something to be true and throwing [IllegalArgumentException](http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html) if not diff --git a/libraries/stdlib/src/kotlin/template/Templates.kt b/libraries/stdlib/src/kotlin/template/Templates.kt index 5540a5ea6d2..8e90cb52a6b 100644 --- a/libraries/stdlib/src/kotlin/template/Templates.kt +++ b/libraries/stdlib/src/kotlin/template/Templates.kt @@ -9,7 +9,7 @@ import java.text.DateFormat import java.util.Date // TODO this class should move into the runtime -// in jet.StringTemplate +// in kotlin.StringTemplate class StringTemplate(val values : Array) { /**