Added array basic class.
This commit is contained in:
Generated
+119
-534
@@ -7,13 +7,11 @@
|
||||
<bookmark url="file://$PROJECT_DIR$/translator/testFiles/propertyAccess/cases/safeCallReturnsNullIfFails.kt" line="3" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f02ef53d-47a4-4f5e-a1aa-3df68aae9b20" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/translator/testFiles/class/cases/classWithoutNamespace.kt" />
|
||||
<list default="true" id="f02ef53d-47a4-4f5e-a1aa-3df68aae9b20" name="Default" comment="Supported single file without namespace.">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/translator/testFiles/kotlinLib/cases/array.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/declarations/ExtractionVisitor.java" afterPath="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/declarations/ExtractionVisitor.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java" afterPath="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java" afterPath="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/BasicClassTest.java" afterPath="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/BasicClassTest.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/translator/testFiles/kotlin_lib.js" afterPath="$PROJECT_DIR$/translator/testFiles/kotlin_lib.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java" afterPath="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java" />
|
||||
</list>
|
||||
<ignored path="k2js.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
@@ -44,99 +42,6 @@
|
||||
<disable_hints />
|
||||
</component>
|
||||
<component name="DebuggerManager">
|
||||
<line_breakpoints>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java" line="61" class="org.jetbrains.k2js.translate.reference.ReferenceTranslator" package="org.jetbrains.k2js.translate.reference">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java" line="55" class="org.jetbrains.k2js.translate.reference.ReferenceTranslator" package="org.jetbrains.k2js.translate.reference">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java" line="123" class="org.jetbrains.k2js.translate.declaration.ClassDeclarationTranslator" package="org.jetbrains.k2js.translate.declaration">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java" line="91" class="org.jetbrains.k2js.translate.declaration.ClassDeclarationTranslator" package="org.jetbrains.k2js.translate.declaration">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java" line="88" class="org.jetbrains.k2js.translate.declaration.ClassDeclarationTranslator" package="org.jetbrains.k2js.translate.declaration">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java" line="115" class="org.jetbrains.k2js.translate.declaration.ClassDeclarationTranslator" package="org.jetbrains.k2js.translate.declaration">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
<breakpoint url="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java" line="40" class="org.jetbrains.k2js.translate.declaration.NamespaceTranslator" package="org.jetbrains.k2js.translate.declaration">
|
||||
<option name="ENABLED" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="SUSPEND_POLICY" value="SuspendAll" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
</breakpoint>
|
||||
</line_breakpoints>
|
||||
<breakpoint_any>
|
||||
<breakpoint>
|
||||
<option name="NOTIFY_CAUGHT" value="true" />
|
||||
@@ -179,37 +84,55 @@
|
||||
<splitter split-orientation="horizontal" split-proportion="0.5494186">
|
||||
<split-first>
|
||||
<leaf>
|
||||
<file leaf-file-name="BindingUtils.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="91" column="53" selection-start="4181" selection-end="4181" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="classWithoutNamespace.kt" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/class/cases/classWithoutNamespace.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="6" column="16" selection-start="67" selection-end="67" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="NamespaceTranslator.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="32" column="24" selection-start="1173" selection-end="1173" vertical-scroll-proportion="0.0">
|
||||
<state line="40" column="0" selection-start="1462" selection-end="1462" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Declarations.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/declarations/Declarations.java">
|
||||
<file leaf-file-name="ClassDeclarationTranslator.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="13" column="19" selection-start="362" selection-end="362" vertical-scroll-proportion="0.0">
|
||||
<state line="91" column="0" selection-start="3568" selection-end="3568" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="ReferenceTranslator.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="61" column="0" selection-start="2457" selection-end="2457" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="PatternMatchingTest.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/PatternMatchingTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="16" selection-start="1137" selection-end="1137" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="kotlin_lib.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/kotlin_lib.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="431" column="10" selection-start="10544" selection-end="10544" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="array.js" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/kotlinLib/cases/array.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="1" column="23" selection-start="41" selection-end="41" vertical-scroll-proportion="0.02467344">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -224,10 +147,10 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="TranslationContext.java" pinned="false" current="true" current-in-tab="true">
|
||||
<file leaf-file-name="TranslationContext.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="81" column="64" selection-start="3062" selection-end="3062" vertical-scroll-proportion="0.51384616">
|
||||
<state line="117" column="103" selection-start="4790" selection-end="4790" vertical-scroll-proportion="19.88">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
@@ -238,10 +161,8 @@
|
||||
<file leaf-file-name="BasicClassTest.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/BasicClassTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="65" column="16" selection-start="1679" selection-end="1679" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
<state line="63" column="16" selection-start="1653" selection-end="1653" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -249,25 +170,7 @@
|
||||
<file leaf-file-name="KotlinLibTest.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="111" column="0" selection-start="3973" selection-end="4120" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="classWithoutNamespace.js" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/class/out/classWithoutNamespace.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Translation.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/Translation.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="95" column="0" selection-start="4447" selection-end="4447" vertical-scroll-proportion="0.0">
|
||||
<state line="86" column="16" selection-start="3059" selection-end="3059" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -309,7 +212,7 @@
|
||||
<file leaf-file-name="PartiallyOrderedSet.java" pinned="false" current="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/utils/PartiallyOrderedSet.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="2" column="48" selection-start="83" selection-end="83" vertical-scroll-proportion="0.05304212">
|
||||
<state line="2" column="48" selection-start="83" selection-end="83" vertical-scroll-proportion="-1.8564743">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -397,9 +300,6 @@
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="changedFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/PropertyAccessTest.java" />
|
||||
<option value="$PROJECT_DIR$/translator/testFiles/propertyAccess/cases/classUsesNamespaceProperties.kt" />
|
||||
<option value="$PROJECT_DIR$/translator/testFiles/propertyAccess/cases/namespaceCustomAccessors.kt" />
|
||||
<option value="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java" />
|
||||
<option value="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/utils/PartiallyOrderedSet.java" />
|
||||
<option value="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceProvider.java" />
|
||||
@@ -413,6 +313,9 @@
|
||||
<option value="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/declarations/ExtractionVisitor.java" />
|
||||
<option value="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/BasicClassTest.java" />
|
||||
<option value="$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java" />
|
||||
<option value="$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java" />
|
||||
<option value="$PROJECT_DIR$/translator/testFiles/kotlin_lib.js" />
|
||||
<option value="$PROJECT_DIR$/translator/testFiles/kotlinLib/cases/array.js" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -562,51 +465,7 @@
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="class" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="out" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="testFiles" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="class" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="cases" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="test" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="test" />
|
||||
<option name="myItemId" value="kotlinLib" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
@@ -623,284 +482,6 @@
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="utils" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="PartiallyOrderedSet.java" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.ClassesTreeStructureProvider$PsiClassOwnerTreeNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="utils" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="utils" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="reference" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="operation" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="initializer" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="general" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="expression" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="declaration" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="generate" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="translator" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="k2js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="declarations" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
@@ -985,7 +566,7 @@
|
||||
<property name="options.splitter.main.proportions" value="0.3" />
|
||||
<property name="recentsLimit" value="5" />
|
||||
<property name="MemberChooser.sorted" value="false" />
|
||||
<property name="options.lastSelected" value="preferences.general" />
|
||||
<property name="options.lastSelected" value="reference.settingsdialog.IDE.editor.colors.Java" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
<property name="MemberChooser.copyJavadoc" value="false" />
|
||||
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
|
||||
@@ -1094,7 +675,13 @@
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
@@ -1382,7 +969,7 @@
|
||||
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
|
||||
<option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
|
||||
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Corrected class declaration logic." />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Supported single file without namespace." />
|
||||
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
|
||||
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
||||
@@ -1395,7 +982,6 @@
|
||||
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
||||
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
||||
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
||||
<MESSAGE value="." />
|
||||
<MESSAGE value="Work on namespaces in progress." />
|
||||
<MESSAGE value="Finished work on namespaces." />
|
||||
<MESSAGE value="Fixed design flaw which prevented base class from being inherited if it was defined after the derived class." />
|
||||
@@ -1420,6 +1006,7 @@
|
||||
<MESSAGE value="compareTo support." />
|
||||
<MESSAGE value="Fixed a bug where class could not access namespace properties." />
|
||||
<MESSAGE value="Corrected class declaration logic." />
|
||||
<MESSAGE value="Supported single file without namespace." />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager />
|
||||
@@ -1429,27 +1016,6 @@
|
||||
<option name="FILTER_TARGETS" value="false" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceProvider.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="46" column="49" selection-start="1980" selection-end="1980" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/AbstractTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="24" column="0" selection-start="544" selection-end="544" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/inheritance/out/initializersOfBasicClassExecute.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="11" column="26" selection-start="217" selection-end="217" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="103" column="36" selection-start="4426" selection-end="4426" vertical-scroll-proportion="0.0">
|
||||
@@ -1460,20 +1026,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="91" column="7" selection-start="3575" selection-end="3575" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="45" selection-start="2049" selection-end="2049" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="91" column="53" selection-start="4181" selection-end="4181" vertical-scroll-proportion="0.0">
|
||||
@@ -1488,13 +1040,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="111" column="0" selection-start="3973" selection-end="4120" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/class/cases/classWithoutNamespace.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="6" column="16" selection-start="67" selection-end="67" vertical-scroll-proportion="0.0">
|
||||
@@ -1509,15 +1054,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/BasicClassTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="65" column="16" selection-start="1679" selection-end="1679" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/class/out/classWithoutNamespace.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
@@ -1532,19 +1068,68 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="32" column="24" selection-start="1173" selection-end="1173" vertical-scroll-proportion="0.0">
|
||||
<state line="117" column="103" selection-start="4790" selection-end="4790" vertical-scroll-proportion="19.88">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/BasicClassTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="63" column="16" selection-start="1653" selection-end="1653" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java">
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="81" column="64" selection-start="3062" selection-end="3062" vertical-scroll-proportion="0.51384616">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
<state line="40" column="0" selection-start="1462" selection-end="1462" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="91" column="0" selection-start="3568" selection-end="3568" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="61" column="0" selection-start="2457" selection-end="2457" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/PatternMatchingTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="16" selection-start="1137" selection-end="1137" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="86" column="16" selection-start="3059" selection-end="3059" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/kotlin_lib.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="431" column="10" selection-start="10544" selection-end="10544" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/translator/testFiles/kotlinLib/cases/array.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="1" column="23" selection-start="41" selection-end="41" vertical-scroll-proportion="0.02467344">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
||||
@@ -113,5 +113,10 @@ public class KotlinLibTest extends TranslationTest {
|
||||
new RhinoFunctionResultChecker("test", true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void array() throws Exception {
|
||||
runRhinoTest(Arrays.asList(kotlinLibraryPath(), cases("array.js")),
|
||||
new RhinoFunctionResultChecker("test", true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
function test() {
|
||||
var a = new Kotlin.Array();
|
||||
a.set(0, "1")
|
||||
a.set(2, "4")
|
||||
return (a.get(0) == "1") && (a.get(2) == "4") && (a.get(1) == undefined);
|
||||
}
|
||||
+432
-402
@@ -1,12 +1,12 @@
|
||||
function $A(iterable) {
|
||||
if (!iterable) return [];
|
||||
if ('toArray' in Object(iterable)) return iterable.toArray();
|
||||
var length = iterable.length || 0, results = new Array(length);
|
||||
while (length--) results[length] = iterable[length];
|
||||
return results;
|
||||
if (!iterable) return [];
|
||||
if ('toArray' in Object(iterable)) return iterable.toArray();
|
||||
var length = iterable.length || 0, results = new Array(length);
|
||||
while (length--) results[length] = iterable[length];
|
||||
return results;
|
||||
}
|
||||
|
||||
var isType = function(object, klass) {
|
||||
var isType = function (object, klass) {
|
||||
current = object.get_class();
|
||||
while (current !== klass) {
|
||||
if (current === null) {
|
||||
@@ -17,414 +17,444 @@ var isType = function(object, klass) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var emptyFunction = function() {}
|
||||
var emptyFunction = function () {
|
||||
}
|
||||
|
||||
var Class = (function() {
|
||||
var Class = (function () {
|
||||
|
||||
function subclass() {};
|
||||
function create() {
|
||||
var parent = null, properties = $A(arguments);
|
||||
if (Object.isFunction(properties[0]))
|
||||
parent = properties.shift();
|
||||
|
||||
function klass() {
|
||||
this.initializing = klass;
|
||||
this.initialize.apply(this, arguments);
|
||||
function subclass() {
|
||||
}
|
||||
|
||||
Object.extend(klass, Class.Methods);
|
||||
klass.superclass = parent;
|
||||
klass.subclasses = [];
|
||||
;
|
||||
function create() {
|
||||
var parent = null, properties = $A(arguments);
|
||||
if (Object.isFunction(properties[0]))
|
||||
parent = properties.shift();
|
||||
|
||||
if (parent) {
|
||||
subclass.prototype = parent.prototype;
|
||||
klass.prototype = new subclass;
|
||||
parent.subclasses.push(klass);
|
||||
}
|
||||
|
||||
|
||||
klass.addMethods(
|
||||
{
|
||||
get_class : function () {
|
||||
return klass;
|
||||
function klass() {
|
||||
this.initializing = klass;
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
|
||||
if (parent != null) {
|
||||
Object.extend(klass, Class.Methods);
|
||||
klass.superclass = parent;
|
||||
klass.subclasses = [];
|
||||
|
||||
if (parent) {
|
||||
subclass.prototype = parent.prototype;
|
||||
klass.prototype = new subclass;
|
||||
parent.subclasses.push(klass);
|
||||
}
|
||||
|
||||
|
||||
klass.addMethods(
|
||||
{
|
||||
super_init : function () {
|
||||
this.initializing = this.initializing.superclass;
|
||||
this.initializing.prototype.initialize.apply(this, arguments)
|
||||
{
|
||||
get_class:function () {
|
||||
return klass;
|
||||
}
|
||||
});
|
||||
|
||||
if (parent != null) {
|
||||
klass.addMethods(
|
||||
{
|
||||
super_init:function () {
|
||||
this.initializing = this.initializing.superclass;
|
||||
this.initializing.prototype.initialize.apply(this, arguments)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (var i = 0, length = properties.length; i < length; i++)
|
||||
klass.addMethods(properties[i]);
|
||||
|
||||
if (!klass.prototype.initialize)
|
||||
klass.prototype.initialize = emptyFunction;
|
||||
|
||||
klass.prototype.constructor = klass;
|
||||
return klass;
|
||||
}
|
||||
|
||||
function addMethods(source) {
|
||||
var ancestor = this.superclass && this.superclass.prototype,
|
||||
properties = Object.keys(source);
|
||||
|
||||
|
||||
for (var i = 0, length = properties.length; i < length; i++) {
|
||||
var property = properties[i], value = source[property];
|
||||
if (ancestor && Object.isFunction(value) &&
|
||||
value.argumentNames()[0] == "$super") {
|
||||
var method = value;
|
||||
value = (function (m) {
|
||||
return function () {
|
||||
return ancestor[m].apply(this, arguments);
|
||||
};
|
||||
})(property).wrap(method);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (var i = 0, length = properties.length; i < length; i++)
|
||||
klass.addMethods(properties[i]);
|
||||
|
||||
if (!klass.prototype.initialize)
|
||||
klass.prototype.initialize = emptyFunction;
|
||||
|
||||
klass.prototype.constructor = klass;
|
||||
return klass;
|
||||
}
|
||||
|
||||
function addMethods(source) {
|
||||
var ancestor = this.superclass && this.superclass.prototype,
|
||||
properties = Object.keys(source);
|
||||
|
||||
|
||||
for (var i = 0, length = properties.length; i < length; i++) {
|
||||
var property = properties[i], value = source[property];
|
||||
if (ancestor && Object.isFunction(value) &&
|
||||
value.argumentNames()[0] == "$super") {
|
||||
var method = value;
|
||||
value = (function(m) {
|
||||
return function() { return ancestor[m].apply(this, arguments); };
|
||||
})(property).wrap(method);
|
||||
|
||||
}
|
||||
this.prototype[property] = value;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
return {
|
||||
create: create,
|
||||
Methods: {
|
||||
addMethods: addMethods
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
var Trait = (function() {
|
||||
|
||||
function add(object, source) {
|
||||
properties = Object.keys(source);
|
||||
for (var i = 0, length = properties.length; i < length; i++) {
|
||||
var property = properties[i];
|
||||
var value = source[property];
|
||||
object[property] = value;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
function create() {
|
||||
|
||||
result = {}
|
||||
for (var i = 0, length = arguments.length; i < length; i++)
|
||||
{
|
||||
add(result, arguments[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
return {
|
||||
create: create
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
|
||||
var Namespace = (function() {
|
||||
|
||||
function create() {
|
||||
return Trait.create.apply(Trait, arguments);
|
||||
}
|
||||
return {
|
||||
create: create
|
||||
};
|
||||
})();
|
||||
|
||||
(function() {
|
||||
|
||||
var _toString = Object.prototype.toString,
|
||||
NULL_TYPE = 'Null',
|
||||
UNDEFINED_TYPE = 'Undefined',
|
||||
BOOLEAN_TYPE = 'Boolean',
|
||||
NUMBER_TYPE = 'Number',
|
||||
STRING_TYPE = 'String',
|
||||
OBJECT_TYPE = 'Object',
|
||||
FUNCTION_CLASS = '[object Function]',
|
||||
BOOLEAN_CLASS = '[object Boolean]',
|
||||
NUMBER_CLASS = '[object Number]',
|
||||
STRING_CLASS = '[object String]',
|
||||
ARRAY_CLASS = '[object Array]',
|
||||
DATE_CLASS = '[object Date]';
|
||||
|
||||
function Type(o) {
|
||||
switch(o) {
|
||||
case null: return NULL_TYPE;
|
||||
case (void 0): return UNDEFINED_TYPE;
|
||||
}
|
||||
var type = typeof o;
|
||||
switch(type) {
|
||||
case 'boolean': return BOOLEAN_TYPE;
|
||||
case 'number': return NUMBER_TYPE;
|
||||
case 'string': return STRING_TYPE;
|
||||
}
|
||||
return OBJECT_TYPE;
|
||||
}
|
||||
|
||||
function extend(destination, source) {
|
||||
for (var property in source)
|
||||
destination[property] = source[property];
|
||||
return destination;
|
||||
}
|
||||
|
||||
function inspect(object) {
|
||||
try {
|
||||
if (isUndefined(object)) return 'undefined';
|
||||
if (object === null) return 'null';
|
||||
return object.inspect ? object.inspect() : String(object);
|
||||
} catch (e) {
|
||||
if (e instanceof RangeError) return '...';
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
function toJSON(value) {
|
||||
return Str('', { '': value }, []);
|
||||
}
|
||||
|
||||
function Str(key, holder, stack) {
|
||||
var value = holder[key],
|
||||
type = typeof value;
|
||||
|
||||
if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
|
||||
value = value.toJSON(key);
|
||||
}
|
||||
|
||||
var _class = _toString.call(value);
|
||||
|
||||
switch (_class) {
|
||||
case NUMBER_CLASS:
|
||||
case BOOLEAN_CLASS:
|
||||
case STRING_CLASS:
|
||||
value = value.valueOf();
|
||||
}
|
||||
|
||||
switch (value) {
|
||||
case null: return 'null';
|
||||
case true: return 'true';
|
||||
case false: return 'false';
|
||||
}
|
||||
|
||||
type = typeof value;
|
||||
switch (type) {
|
||||
case 'string':
|
||||
return value.inspect(true);
|
||||
case 'number':
|
||||
return isFinite(value) ? String(value) : 'null';
|
||||
case 'object':
|
||||
|
||||
for (var i = 0, length = stack.length; i < length; i++) {
|
||||
if (stack[i] === value) { throw new TypeError(); }
|
||||
this.prototype[property] = value;
|
||||
}
|
||||
stack.push(value);
|
||||
|
||||
var partial = [];
|
||||
if (_class === ARRAY_CLASS) {
|
||||
for (var i = 0, length = value.length; i < length; i++) {
|
||||
var str = Str(i, value, stack);
|
||||
partial.push(typeof str === 'undefined' ? 'null' : str);
|
||||
}
|
||||
partial = '[' + partial.join(',') + ']';
|
||||
} else {
|
||||
var keys = Object.keys(value);
|
||||
for (var i = 0, length = keys.length; i < length; i++) {
|
||||
var key = keys[i], str = Str(key, value, stack);
|
||||
if (typeof str !== "undefined") {
|
||||
partial.push(key.inspect(true)+ ':' + str);
|
||||
}
|
||||
}
|
||||
partial = '{' + partial.join(',') + '}';
|
||||
return this;
|
||||
}
|
||||
|
||||
return {
|
||||
create:create,
|
||||
Methods:{
|
||||
addMethods:addMethods
|
||||
}
|
||||
stack.pop();
|
||||
return partial;
|
||||
}
|
||||
}
|
||||
|
||||
function stringify(object) {
|
||||
return JSON.stringify(object);
|
||||
}
|
||||
|
||||
function toQueryString(object) {
|
||||
return $H(object).toQueryString();
|
||||
}
|
||||
|
||||
function toHTML(object) {
|
||||
return object && object.toHTML ? object.toHTML() : String.interpret(object);
|
||||
}
|
||||
|
||||
function keys(object) {
|
||||
if (Type(object) !== OBJECT_TYPE) { throw new TypeError(); }
|
||||
var results = [];
|
||||
for (var property in object) {
|
||||
if (object.hasOwnProperty(property)) {
|
||||
results.push(property);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
function values(object) {
|
||||
var results = [];
|
||||
for (var property in object)
|
||||
results.push(object[property]);
|
||||
return results;
|
||||
}
|
||||
|
||||
function clone(object) {
|
||||
return extend({ }, object);
|
||||
}
|
||||
|
||||
function isElement(object) {
|
||||
return !!(object && object.nodeType == 1);
|
||||
}
|
||||
|
||||
function isArray(object) {
|
||||
return _toString.call(object) === ARRAY_CLASS;
|
||||
}
|
||||
|
||||
var hasNativeIsArray = (typeof Array.isArray == 'function')
|
||||
&& Array.isArray([]) && !Array.isArray({});
|
||||
|
||||
if (hasNativeIsArray) {
|
||||
isArray = Array.isArray;
|
||||
}
|
||||
|
||||
function isHash(object) {
|
||||
return object instanceof Hash;
|
||||
}
|
||||
|
||||
function isFunction(object) {
|
||||
return _toString.call(object) === FUNCTION_CLASS;
|
||||
}
|
||||
|
||||
function isString(object) {
|
||||
return _toString.call(object) === STRING_CLASS;
|
||||
}
|
||||
|
||||
function isNumber(object) {
|
||||
return _toString.call(object) === NUMBER_CLASS;
|
||||
}
|
||||
|
||||
function isDate(object) {
|
||||
return _toString.call(object) === DATE_CLASS;
|
||||
}
|
||||
|
||||
function isUndefined(object) {
|
||||
return typeof object === "undefined";
|
||||
}
|
||||
|
||||
extend(Object, {
|
||||
extend: extend,
|
||||
inspect: inspect,
|
||||
toQueryString: toQueryString,
|
||||
toHTML: toHTML,
|
||||
keys: Object.keys || keys,
|
||||
values: values,
|
||||
clone: clone,
|
||||
isElement: isElement,
|
||||
isArray: isArray,
|
||||
isHash: isHash,
|
||||
isFunction: isFunction,
|
||||
isString: isString,
|
||||
isNumber: isNumber,
|
||||
isDate: isDate,
|
||||
isUndefined: isUndefined
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
Object.extend(Function.prototype, (function() {
|
||||
var slice = Array.prototype.slice;
|
||||
|
||||
function update(array, args) {
|
||||
var arrayLength = array.length, length = args.length;
|
||||
while (length--) array[arrayLength + length] = args[length];
|
||||
return array;
|
||||
}
|
||||
|
||||
function merge(array, args) {
|
||||
array = slice.call(array, 0);
|
||||
return update(array, args);
|
||||
}
|
||||
|
||||
function argumentNames() {
|
||||
var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
|
||||
.replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
|
||||
.replace(/\s+/g, '').split(',');
|
||||
return names.length == 1 && !names[0] ? [] : names;
|
||||
}
|
||||
|
||||
function bind(context) {
|
||||
if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
|
||||
var __method = this, args = slice.call(arguments, 1);
|
||||
return function() {
|
||||
var a = merge(args, arguments);
|
||||
return __method.apply(context, a);
|
||||
}
|
||||
}
|
||||
|
||||
function bindAsEventListener(context) {
|
||||
var __method = this, args = slice.call(arguments, 1);
|
||||
return function(event) {
|
||||
var a = update([event || window.event], args);
|
||||
return __method.apply(context, a);
|
||||
}
|
||||
}
|
||||
|
||||
function curry() {
|
||||
if (!arguments.length) return this;
|
||||
var __method = this, args = slice.call(arguments, 0);
|
||||
return function() {
|
||||
var a = merge(args, arguments);
|
||||
return __method.apply(this, a);
|
||||
}
|
||||
}
|
||||
|
||||
function delay(timeout) {
|
||||
var __method = this, args = slice.call(arguments, 1);
|
||||
timeout = timeout * 1000;
|
||||
return window.setTimeout(function() {
|
||||
return __method.apply(__method, args);
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function defer() {
|
||||
var args = update([0.01], arguments);
|
||||
return this.delay.apply(this, args);
|
||||
}
|
||||
|
||||
function wrap(wrapper) {
|
||||
var __method = this;
|
||||
return function() {
|
||||
var a = update([__method.bind(this)], arguments);
|
||||
return wrapper.apply(this, a);
|
||||
}
|
||||
}
|
||||
|
||||
function methodize() {
|
||||
if (this._methodized) return this._methodized;
|
||||
var __method = this;
|
||||
return this._methodized = function() {
|
||||
var a = update([this], arguments);
|
||||
return __method.apply(null, a);
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
||||
return {
|
||||
argumentNames: argumentNames,
|
||||
bind: bind,
|
||||
bindAsEventListener: bindAsEventListener,
|
||||
curry: curry,
|
||||
delay: delay,
|
||||
defer: defer,
|
||||
wrap: wrap,
|
||||
methodize: methodize
|
||||
}
|
||||
var Trait = (function () {
|
||||
|
||||
function add(object, source) {
|
||||
properties = Object.keys(source);
|
||||
for (var i = 0, length = properties.length; i < length; i++) {
|
||||
var property = properties[i];
|
||||
var value = source[property];
|
||||
object[property] = value;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
function create() {
|
||||
|
||||
result = {}
|
||||
for (var i = 0, length = arguments.length; i < length; i++) {
|
||||
add(result, arguments[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
return {
|
||||
create:create
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
var Namespace = (function () {
|
||||
|
||||
function create() {
|
||||
return Trait.create.apply(Trait, arguments);
|
||||
}
|
||||
|
||||
return {
|
||||
create:create
|
||||
};
|
||||
})();
|
||||
|
||||
(function () {
|
||||
|
||||
var _toString = Object.prototype.toString,
|
||||
NULL_TYPE = 'Null',
|
||||
UNDEFINED_TYPE = 'Undefined',
|
||||
BOOLEAN_TYPE = 'Boolean',
|
||||
NUMBER_TYPE = 'Number',
|
||||
STRING_TYPE = 'String',
|
||||
OBJECT_TYPE = 'Object',
|
||||
FUNCTION_CLASS = '[object Function]',
|
||||
BOOLEAN_CLASS = '[object Boolean]',
|
||||
NUMBER_CLASS = '[object Number]',
|
||||
STRING_CLASS = '[object String]',
|
||||
ARRAY_CLASS = '[object Array]',
|
||||
DATE_CLASS = '[object Date]';
|
||||
|
||||
function Type(o) {
|
||||
switch (o) {
|
||||
case null:
|
||||
return NULL_TYPE;
|
||||
case (void 0):
|
||||
return UNDEFINED_TYPE;
|
||||
}
|
||||
var type = typeof o;
|
||||
switch (type) {
|
||||
case 'boolean':
|
||||
return BOOLEAN_TYPE;
|
||||
case 'number':
|
||||
return NUMBER_TYPE;
|
||||
case 'string':
|
||||
return STRING_TYPE;
|
||||
}
|
||||
return OBJECT_TYPE;
|
||||
}
|
||||
|
||||
function extend(destination, source) {
|
||||
for (var property in source)
|
||||
destination[property] = source[property];
|
||||
return destination;
|
||||
}
|
||||
|
||||
function inspect(object) {
|
||||
try {
|
||||
if (isUndefined(object)) return 'undefined';
|
||||
if (object === null) return 'null';
|
||||
return object.inspect ? object.inspect() : String(object);
|
||||
} catch (e) {
|
||||
if (e instanceof RangeError) return '...';
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
function toJSON(value) {
|
||||
return Str('', { '':value }, []);
|
||||
}
|
||||
|
||||
function Str(key, holder, stack) {
|
||||
var value = holder[key],
|
||||
type = typeof value;
|
||||
|
||||
if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
|
||||
value = value.toJSON(key);
|
||||
}
|
||||
|
||||
var _class = _toString.call(value);
|
||||
|
||||
switch (_class) {
|
||||
case NUMBER_CLASS:
|
||||
case BOOLEAN_CLASS:
|
||||
case STRING_CLASS:
|
||||
value = value.valueOf();
|
||||
}
|
||||
|
||||
switch (value) {
|
||||
case null:
|
||||
return 'null';
|
||||
case true:
|
||||
return 'true';
|
||||
case false:
|
||||
return 'false';
|
||||
}
|
||||
|
||||
type = typeof value;
|
||||
switch (type) {
|
||||
case 'string':
|
||||
return value.inspect(true);
|
||||
case 'number':
|
||||
return isFinite(value) ? String(value) : 'null';
|
||||
case 'object':
|
||||
|
||||
for (var i = 0, length = stack.length; i < length; i++) {
|
||||
if (stack[i] === value) {
|
||||
throw new TypeError();
|
||||
}
|
||||
}
|
||||
stack.push(value);
|
||||
|
||||
var partial = [];
|
||||
if (_class === ARRAY_CLASS) {
|
||||
for (var i = 0, length = value.length; i < length; i++) {
|
||||
var str = Str(i, value, stack);
|
||||
partial.push(typeof str === 'undefined' ? 'null' : str);
|
||||
}
|
||||
partial = '[' + partial.join(',') + ']';
|
||||
} else {
|
||||
var keys = Object.keys(value);
|
||||
for (var i = 0, length = keys.length; i < length; i++) {
|
||||
var key = keys[i], str = Str(key, value, stack);
|
||||
if (typeof str !== "undefined") {
|
||||
partial.push(key.inspect(true) + ':' + str);
|
||||
}
|
||||
}
|
||||
partial = '{' + partial.join(',') + '}';
|
||||
}
|
||||
stack.pop();
|
||||
return partial;
|
||||
}
|
||||
}
|
||||
|
||||
function stringify(object) {
|
||||
return JSON.stringify(object);
|
||||
}
|
||||
|
||||
function toQueryString(object) {
|
||||
return $H(object).toQueryString();
|
||||
}
|
||||
|
||||
function toHTML(object) {
|
||||
return object && object.toHTML ? object.toHTML() : String.interpret(object);
|
||||
}
|
||||
|
||||
function keys(object) {
|
||||
if (Type(object) !== OBJECT_TYPE) {
|
||||
throw new TypeError();
|
||||
}
|
||||
var results = [];
|
||||
for (var property in object) {
|
||||
if (object.hasOwnProperty(property)) {
|
||||
results.push(property);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
function values(object) {
|
||||
var results = [];
|
||||
for (var property in object)
|
||||
results.push(object[property]);
|
||||
return results;
|
||||
}
|
||||
|
||||
function clone(object) {
|
||||
return extend({ }, object);
|
||||
}
|
||||
|
||||
function isElement(object) {
|
||||
return !!(object && object.nodeType == 1);
|
||||
}
|
||||
|
||||
function isArray(object) {
|
||||
return _toString.call(object) === ARRAY_CLASS;
|
||||
}
|
||||
|
||||
var hasNativeIsArray = (typeof Array.isArray == 'function')
|
||||
&& Array.isArray([]) && !Array.isArray({});
|
||||
|
||||
if (hasNativeIsArray) {
|
||||
isArray = Array.isArray;
|
||||
}
|
||||
|
||||
function isHash(object) {
|
||||
return object instanceof Hash;
|
||||
}
|
||||
|
||||
function isFunction(object) {
|
||||
return _toString.call(object) === FUNCTION_CLASS;
|
||||
}
|
||||
|
||||
function isString(object) {
|
||||
return _toString.call(object) === STRING_CLASS;
|
||||
}
|
||||
|
||||
function isNumber(object) {
|
||||
return _toString.call(object) === NUMBER_CLASS;
|
||||
}
|
||||
|
||||
function isDate(object) {
|
||||
return _toString.call(object) === DATE_CLASS;
|
||||
}
|
||||
|
||||
function isUndefined(object) {
|
||||
return typeof object === "undefined";
|
||||
}
|
||||
|
||||
extend(Object, {
|
||||
extend:extend,
|
||||
inspect:inspect,
|
||||
toQueryString:toQueryString,
|
||||
toHTML:toHTML,
|
||||
keys:Object.keys || keys,
|
||||
values:values,
|
||||
clone:clone,
|
||||
isElement:isElement,
|
||||
isArray:isArray,
|
||||
isHash:isHash,
|
||||
isFunction:isFunction,
|
||||
isString:isString,
|
||||
isNumber:isNumber,
|
||||
isDate:isDate,
|
||||
isUndefined:isUndefined
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
Object.extend(Function.prototype, (function () {
|
||||
var slice = Array.prototype.slice;
|
||||
|
||||
function update(array, args) {
|
||||
var arrayLength = array.length, length = args.length;
|
||||
while (length--) array[arrayLength + length] = args[length];
|
||||
return array;
|
||||
}
|
||||
|
||||
function merge(array, args) {
|
||||
array = slice.call(array, 0);
|
||||
return update(array, args);
|
||||
}
|
||||
|
||||
function argumentNames() {
|
||||
var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
|
||||
.replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
|
||||
.replace(/\s+/g, '').split(',');
|
||||
return names.length == 1 && !names[0] ? [] : names;
|
||||
}
|
||||
|
||||
function bind(context) {
|
||||
if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
|
||||
var __method = this, args = slice.call(arguments, 1);
|
||||
return function () {
|
||||
var a = merge(args, arguments);
|
||||
return __method.apply(context, a);
|
||||
}
|
||||
}
|
||||
|
||||
function bindAsEventListener(context) {
|
||||
var __method = this, args = slice.call(arguments, 1);
|
||||
return function (event) {
|
||||
var a = update([event || window.event], args);
|
||||
return __method.apply(context, a);
|
||||
}
|
||||
}
|
||||
|
||||
function curry() {
|
||||
if (!arguments.length) return this;
|
||||
var __method = this, args = slice.call(arguments, 0);
|
||||
return function () {
|
||||
var a = merge(args, arguments);
|
||||
return __method.apply(this, a);
|
||||
}
|
||||
}
|
||||
|
||||
function delay(timeout) {
|
||||
var __method = this, args = slice.call(arguments, 1);
|
||||
timeout = timeout * 1000;
|
||||
return window.setTimeout(function () {
|
||||
return __method.apply(__method, args);
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function defer() {
|
||||
var args = update([0.01], arguments);
|
||||
return this.delay.apply(this, args);
|
||||
}
|
||||
|
||||
function wrap(wrapper) {
|
||||
var __method = this;
|
||||
return function () {
|
||||
var a = update([__method.bind(this)], arguments);
|
||||
return wrapper.apply(this, a);
|
||||
}
|
||||
}
|
||||
|
||||
function methodize() {
|
||||
if (this._methodized) return this._methodized;
|
||||
var __method = this;
|
||||
return this._methodized = function () {
|
||||
var a = update([this], arguments);
|
||||
return __method.apply(null, a);
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
argumentNames:argumentNames,
|
||||
bind:bind,
|
||||
bindAsEventListener:bindAsEventListener,
|
||||
curry:curry,
|
||||
delay:delay,
|
||||
defer:defer,
|
||||
wrap:wrap,
|
||||
methodize:methodize
|
||||
}
|
||||
})());
|
||||
|
||||
Kotlin = {}
|
||||
Kotlin.Array = Class.create({
|
||||
initialize:function () {
|
||||
this.array = [];
|
||||
},
|
||||
get:function (index) {
|
||||
return this.array[index];
|
||||
},
|
||||
set:function (index, value) {
|
||||
this.array[index] = value;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user