Removed examples.

Moved to https://github.com/kotlin-projects/examples
This commit is contained in:
Evgeny Gerashchenko
2013-10-01 17:53:38 +04:00
parent 1993bff51b
commit 94cb523eb7
126 changed files with 0 additions and 8198 deletions
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
</project>
-24
View File
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions>
<entry name=".+\.(properties|xml|html|dtd|tld)" />
<entry name=".+\.(gif|png|jpeg|jpg)" />
</resourceExtensions>
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
<entry name="?*.html" />
<entry name="?*.dtd" />
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true" />
</component>
</project>
-5
View File
@@ -1,5 +0,0 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright />
</settings>
</component>
-5
View File
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
-36
View File
@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="true" />
<option name="OPTION_NAVIGATOR" value="true" />
<option name="OPTION_INDEX" value="true" />
<option name="OPTION_SEPARATE_INDEX" value="true" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
<option name="OPTION_DEPRECATED_LIST" value="true" />
<option name="OTHER_OPTIONS" value="" />
<option name="HEAP_SIZE" />
<option name="LOCALE" />
<option name="OPEN_IN_BROWSER" value="true" />
</component>
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true" />
</component>
</project>
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/examples.iml" filepath="$PROJECT_DIR$/examples.iml" />
<module fileurl="file://$PROJECT_DIR$/../grammar/grammar.iml" filepath="$PROJECT_DIR$/../grammar/grammar.iml" />
<module fileurl="file://$PROJECT_DIR$/../stdlib/stdlib.iml" filepath="$PROJECT_DIR$/../stdlib/stdlib.iml" />
</modules>
</component>
</project>
-40
View File
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<ADDITIONAL_INDENT_OPTIONS fileType="groovy">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="java">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="xml">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
</value>
</option>
</component>
</project>
-125
View File
@@ -1,125 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
</project>
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
<entry name="?*.html" />
<entry name="?*.dtd" />
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true" />
</component>
</project>
@@ -1,5 +0,0 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright />
</settings>
</component>
-5
View File
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
-11
View File
@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="KotlinRuntime">
<CLASSES>
<root url="jar://$PROJECT_DIR$/../../dist/kotlinc/lib/kotlin-runtime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/../../dist/kotlinc/lib/kotlin-runtime.jar!/src" />
</SOURCES>
</library>
</component>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/example-vfs.iml" filepath="$PROJECT_DIR$/example-vfs.iml" />
</modules>
</component>
</project>
-5
View File
@@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>
-125
View File
@@ -1,125 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/out" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinRuntime" level="project" />
</component>
</module>
-139
View File
@@ -1,139 +0,0 @@
package org.jetbrains.jet.samples.vfs;
import kotlin.concurrent.*
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.jetbrains.jet.samples.vfs.utils.*;
import java.util.concurrent.locks.Lock
import java.io.File
import java.util.List
import java.util.ArrayList
import java.util.HashMap
import java.util.Arrays
import java.util.Map
import kotlin.util.*
import java.util.TimerTask
/**
* File system singleton. To work with virtual file system, read/write locks should be
* acquired: use read() and write() higher-order functions.
*/
public object FileSystem {
private val lock = ReentrantReadWriteLock()
internal val watchedDirectories = ArrayList<VirtualFile>
/**
* Mapping from virtual files to metainformation
*/
internal val fileToInfo = HashMap<VirtualFile, VirtualFileInfo>()
private val listeners = ArrayList<VirtualFileListener>()
/**
* Returns corresponding virtual file for java.io.File.
*
* @param ioFile file
*/
public fun getFileByIoFile(ioFile : File) : VirtualFile {
FileSystem.assertCanRead()
return PhysicalVirtualFile(ioFile.getAbsolutePath()!!.toSystemIndependentPath())
}
/**
* Returns virtual file for path to it.
*
* @param path path to file
*/
public fun getFileByPath(path : String) : VirtualFile {
return getFileByIoFile(File(path))
}
/**
* Runs function with read lock.
*/
public inline fun read<T>(task : () -> T) : T {
return lock.read<T>(task)
}
/**
* Runs function with write lock.
*/
public inline fun write<T>(task : () -> T) : T {
return lock.write(task)
}
/**
* Adds directory to list of watched directories. Watched directories are
* periodically refreshed and corresponding events are sent to file system listeners.
*
* @param dir directory which should be watched
*/
public fun addWatchedDirectory(dir : VirtualFile) {
assertCanRead()
if (dir.isDirectory) {
watchedDirectories.add(dir)
scanAndAddRecursivelyNoEvents(dir)
RefreshQueue.scheduleRefresh()
}
}
/* Scans file recursively and adds info about it to fileToInfo map */
private fun scanAndAddRecursivelyNoEvents(file : VirtualFile) {
require(FileSystem.fileToInfo[file.path] == null)
val fileInfo = VirtualFileInfo(file)
FileSystem.fileToInfo[file] = fileInfo
fileInfo.children.forEach{ scanAndAddRecursivelyNoEvents(it) }
}
internal inline fun assertCanRead() {
check(lock.getReadHoldCount() != 0 || lock.isWriteLockedByCurrentThread())
}
internal inline fun assertCanWrite() {
check(lock.isWriteLockedByCurrentThread())
}
/**
* Adds file system listener which should be notified about changing of file system.
*/
public fun addVirtualFileListener(listener : VirtualFileListener) {
listeners.add(listener)
}
/**
* Adds file system listener which should be notified about changing of file system.
*/
public fun addVirtualFileListener(listener : (VirtualFileEvent)->Unit) : VirtualFileListener {
val vfl = SimpleVirtualFileListener(listener)
addVirtualFileListener(vfl)
return vfl
}
/**
* Removes file system listener.
*/
public fun removeVirtualFileListener(listener : VirtualFileListener) {
listeners.remove(listener)
}
/* Notifies all listeners */
internal fun notifyEventHappened(event : VirtualFileEvent) {
for (listener in listeners) {
listener.eventHappened(event)
}
}
}
private class VirtualFileInfo(file : VirtualFile) {
/* Last modification time */
var lastModified : Long = 0
/* List of known children */
val children : List<VirtualFile> = ArrayList<VirtualFile>;
{
children.addAll(file.children)
lastModified = file.modificationTime
}
}
-36
View File
@@ -1,36 +0,0 @@
package org.jetbrains.jet.samples.vfs.sandbox;
import org.jetbrains.jet.samples.vfs.*;
import java.io.InputStreamReader
import java.util.Scanner
/**
* Receives list of directories which should be watched, adds them to virtual file system,
* adds virtual file system listener and waits for 1 minutes, printing out all received event.
*/
fun main(args : Array<String>) {
if (args.size == 0) {
println("Provide list of watched directories as command line arguments")
return
}
// add watched directory
FileSystem.write {
for (arg in args) {
val virtualFile = FileSystem.getFileByPath(arg)
FileSystem.addWatchedDirectory(virtualFile)
}
}
// add listener which prints out everything
FileSystem.addVirtualFileListener{ event ->
println(event)
if (event is VirtualFileChangedEvent) {
// FIXME explicit type casting to avoid overload ambiguity (KT-1461)
println("new file size is ${(event as VirtualFileChangedEvent).file.size}")
}
}
// wait for 1 minute
Thread.sleep(60000)
}
-123
View File
@@ -1,123 +0,0 @@
package org.jetbrains.jet.samples.vfs;
import java.util.concurrent.ConcurrentLinkedQueue
import java.util.List
import java.util.concurrent.locks.ReentrantLock
import java.util.concurrent.LinkedBlockingQueue
import java.util.ArrayList
import kotlin.util.*
import kotlin.concurrent.*
import java.util.Timer
import java.util.TimerTask
import org.jetbrains.jet.samples.vfs.utils.*
/**
* Singleton which creates thread for periodically checking if there are changes in
* file system and notifying file system listeners.
*/
internal object RefreshQueue {
private val taskQueue = LinkedBlockingQueue<List<VirtualFile>>();
{
thread(daemon=true, name="refresher thread") {
while (!currentThread.isInterrupted()) {
try {
takeAndRefreshFiles()
} catch (e : InterruptedException) {
}
}
}
fixedRateTimer(daemon=true, name="refresher timer", period=5000.toLong()) {
scheduleRefresh(FileSystem.watchedDirectories)
}
}
private fun takeAndRefreshFiles() {
refreshFiles(taskQueue.take()!!)
}
/* Acquires write lock and refreshes file system */
private fun refreshFiles(files : List<VirtualFile>) {
FileSystem.write {
files.forEach{ refreshFile(it) }
}
}
/* Checks for changes in virtual file recursively, notifying listeners. */
private fun refreshFile(file : VirtualFile) {
FileSystem.assertCanWrite()
val fileInfo = FileSystem.fileToInfo[file.path]
check(fileInfo != null)
if (fileInfo == null) {
return
}
if (file.isDirectory) {
val oldChildren = fileInfo.children
val newChildren = file.children
val addedChildren = listDifference(newChildren, oldChildren)
val deletedChildren = listDifference(oldChildren, newChildren)
val commonChildren = listIntersection(oldChildren, newChildren)
addedChildren.forEach{ addRecursively(it) }
deletedChildren.forEach{ deleteRecursively(it) }
fileInfo.children.clear()
fileInfo.children.addAll(newChildren)
commonChildren.forEach{ refreshFile(it) }
} else {
val newModificationTime = file.modificationTime
if (fileInfo.lastModified != newModificationTime) {
fileInfo.lastModified = newModificationTime
FileSystem.notifyEventHappened(VirtualFileChangedEvent(file))
}
}
}
/* Adds file to file system recursively, notifying listeners */
private fun addRecursively(file : VirtualFile) {
require(FileSystem.fileToInfo[file] == null)
val fileInfo = VirtualFileInfo(file)
FileSystem.fileToInfo[file] = fileInfo
FileSystem.notifyEventHappened(VirtualFileCreateEvent(file))
fileInfo.children.forEach{ addRecursively(it) }
}
/* Deletes file from file system recursively, notifying listeners */
private fun deleteRecursively(file : VirtualFile) {
val fileInfoMaybe : VirtualFileInfo? = FileSystem.fileToInfo[file.path]
val fileInfo = fileInfoMaybe!!
fileInfo.children.forEach{ deleteRecursively(it) }
FileSystem.notifyEventHappened(VirtualFileDeletedEvent(file))
FileSystem.fileToInfo.remove(file)
}
/**
* Schedules refresh for given list of files.
*/
public fun scheduleRefresh(files : List<VirtualFile>) {
taskQueue.put(files)
}
/**
* Schedules refresh for given list of files.
*/
public fun scheduleRefresh(vararg files : VirtualFile) {
// FIXME This could be written more concise, using map() & toList() (KT-1164 & KT-1172)
val filesList = ArrayList<VirtualFile>()
files.forEach{ filesList.add(it) }
taskQueue.put(filesList)
// taskQueue.put(ArrayList<VirtualFile>(files.map{ it }))
// taskQueue.put(files.map{ it }.toList())
}
}
-31
View File
@@ -1,31 +0,0 @@
package org.jetbrains.jet.samples.vfs.utils;
import java.util.concurrent.locks.Lock
import java.util.List
import kotlin.util.*
/**
* Executes task with given lock acquired.
*/
private fun locked<T>(lock : Lock, body : () -> T) : T {
lock.lock()
try {
return body()
} finally {
lock.unlock();
}
}
/**
* Returns list containing all elements which first contains and second does not.
*/
public fun listDifference<T>(first : List<T>, second : List<T>) : List<T> {
return first.filter{ !second.contains(it) }.toList()
}
/**
* Returns list containing all elements which both lists contain.
*/
public fun listIntersection<T>(first : List<T>, second : List<T>) : List<T> {
return first.filter{ second.contains(it) }.toList()
}
-168
View File
@@ -1,168 +0,0 @@
package org.jetbrains.jet.samples.vfs;
import org.jetbrains.jet.samples.vfs.utils.*;
import java.io.File
import java.io.InputStream
import java.io.FileInputStream
import java.util.ArrayList
import java.util.List
import kotlin.util.*
/**
* Abstract virtual file.
*/
public abstract class VirtualFile(public val path : String) : Hashable {
protected abstract val kind : String
/**
* Returns file size.
*/
public abstract val size : Long
/**
* Returns the time that the virtual file was last modified (milliseconds since
* the epoch (00:00:00 GMT, January 1, 1970).
*/
public abstract val modificationTime : Long
/**
* Returns if virtual file exists.
*/
public abstract val exists : Boolean
/**
* Returns if virtual file is directory
*/
public abstract val isDirectory : Boolean
/**
* Returns list of virtual files which are children for this.
*/
public abstract val children : List<VirtualFile>
/**
* Opens input stream for reading. After reading, stream should be closed.
* Reading from stream should be performed with read lock acquired.
*/
public abstract fun openInputStream() : InputStream
public override fun equals(other : Any?) : Boolean {
return other is VirtualFile && kind == other.kind && path == other.path
}
public override fun hashCode() : Int {
// FIXME rewrite without casting when it will be possible (KT-1741)
return (kind as java.lang.String).hashCode() * 31 + (path as java.lang.String).hashCode()
}
fun toString(): String {
return "${kind}[path=$path]"
}
}
/**
* Type of virtual file which corresponds to real file in file system of OS.
*/
public class PhysicalVirtualFile(path : String) : VirtualFile(path) {
override public val kind : String = "Physical"
private val ioFile : File
get() = File(this.path.toSystemDependentPath())
override public val exists: Boolean
get() {
FileSystem.assertCanRead()
return ioFile.exists()
}
override public val size: Long
get() {
FileSystem.assertCanRead()
return ioFile.length()
}
override public val modificationTime: Long
get() {
FileSystem.assertCanRead()
return ioFile.lastModified()
}
override public val isDirectory: Boolean
get() {
FileSystem.assertCanRead()
return ioFile.isDirectory()
}
override public val children: List<VirtualFile>
get() {
FileSystem.assertCanRead()
return (ioFile.listFiles() ?: array<File?>()).
map{ FileSystem.getFileByIoFile(it!!) }?.toList()
}
override public fun openInputStream(): InputStream {
FileSystem.assertCanRead()
if (isDirectory) {
throw IllegalArgumentException("Can't open directory for reading");
}
return CheckedInputStream(FileInputStream(ioFile))
}
}
private val OS_SEPARATOR = java.io.File.separator!!
private val VFS_SEPARATOR = "/"
private fun String.toSystemDependentPath() : String {
return this.replaceAll(VFS_SEPARATOR, OS_SEPARATOR)
}
private fun String.toSystemIndependentPath() : String {
return this.replaceAll(OS_SEPARATOR, VFS_SEPARATOR)
}
/**
* InputStream wrapper which checks that file system read lock is acquired on each operation.
*/
private class CheckedInputStream(private val wrapped : InputStream) : InputStream() {
override public fun read(): Int {
FileSystem.assertCanRead()
return wrapped.read()
}
override public fun read(b: ByteArray?, off: Int, len: Int) : Int {
FileSystem.assertCanRead()
return wrapped.read(b, off, len)
}
override public fun markSupported(): Boolean {
FileSystem.assertCanRead()
return wrapped.markSupported()
}
override public fun skip(n: Long): Long {
FileSystem.assertCanRead()
return wrapped.skip(n)
}
override public fun close() {
FileSystem.assertCanRead()
return wrapped.close()
}
override public fun mark(readlimit: Int) {
FileSystem.assertCanRead()
return wrapped.mark(readlimit)
}
override public fun read(b: ByteArray?): Int {
FileSystem.assertCanRead()
return wrapped.read(b)
}
override public fun reset() {
FileSystem.assertCanRead()
return wrapped.reset()
}
override public fun available(): Int {
FileSystem.assertCanRead()
return wrapped.available()
}
}
@@ -1,50 +0,0 @@
package org.jetbrains.jet.samples.vfs;
/**
* Listener for receiving virtual file event
*/
public trait VirtualFileListener : java.util.EventListener {
fun eventHappened(val event : VirtualFileEvent)
}
// FIXME using this wrapper because of codegen bug KT-1737, should be replaced with
private class SimpleVirtualFileListener(val listenerFunction : (VirtualFileEvent)->Unit) : VirtualFileListener {
override fun eventHappened(event : VirtualFileEvent) {
val f = listenerFunction // FIXME saving to local variable because of the bug in codegen (KT-1739)
f(event)
}
}
/**
* Base type of virtual file events
* @property file affected by event
*/
public abstract class VirtualFileEvent(val file : VirtualFile) : Object() {
}
/**
* Event of creating file
*/
public class VirtualFileCreateEvent(file : VirtualFile) : VirtualFileEvent(file) {
override public fun toString(): String? {
return "created ${file}"
}
}
/**
* Event of deleting file
*/
public class VirtualFileDeletedEvent(file : VirtualFile) : VirtualFileEvent(file) {
override public fun toString(): String? {
return "deleted ${file}"
}
}
/**
* Event of changing file contents
*/
public class VirtualFileChangedEvent(file : VirtualFile) : VirtualFileEvent(file) {
override public fun toString(): String? {
return "changed ${file}"
}
}
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/out" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="runtime" />
</component>
</module>
-24
View File
@@ -1,24 +0,0 @@
fun foo() {
addMouseListener(object MouseAdapter() {
private var clickCount = 0;
override fun mouseClicked(e : MouseEvent) {
clickCount++;
if (clickCount > 3) GOD.sendMessage(GodMEssages.TOO_MANY_CLICKS);
}
})
enum class GodMessages {
TOO_MANY_CLICKS
ONE_MORE_MESSAGE
}
// Type of this variable is GOD_AnonymousClass
val GOD = object {
fun sendMessage(message : GodMEssage) = throw new RuntimeException(message.name)
};
}
-195
View File
@@ -1,195 +0,0 @@
class BinaryTree<T> : IMutableSet<T> {
private class TreeNode(
var value : T, var parent : TreeNode
) {
var left : TreeNode
var right : TreeNode
}
private val compare : MatchableComparison<T>
private var root : TreeNode
private var version = 0
// override var size : Int { get; private set; }
this(compare : Comparison<T>) {
this.compare = asMatchableComparison(comparison)
}
this() : this(naturalOrder<T>()) {
}
private [operator] fun T.compareTo(other : T) : Int = compare(this, other)
override fun contains(item : T) : Boolean {
return contains(root, item)
fun contains(node : TreeNode, item : T) : Boolean {
if (node == null) return false
when (compare(item, node.value)) {
EQ => true
LS => contains(node.left, item)
GT => contains(node.right, item)
}
}
}
override fun add(item : T) : Boolean {
if (add(ref root, null)) {
size++
version++
return true
}
return false
// In principle, this has access to item anyway, but then it's unreachable code
// BAD: the naive implementation of ref will create H(T) ref objects, but can be optimized to create only one
fun add(ref node : TreeNode, parent : TreeNode) : Boolean {
if (node == null) {
node = TreeNode(item, parent)
return true
}
when (compare(item, node.value)) {
EQ => false
LS => add(ref node.left, node)
GT => add(ref node.right, node)
}
}
// In principle, this has access to item anyway
fun addNoRef(node : TreeNode) : Boolean {
if (node == null) {
root = TreeNode(item, null)
return true
}
when (compare(item, node.value)) {
EQ => return false
LS =>
if (node.left == null) {
node.left = TreeNode(item, node)
return true
} else return add(node.left)
GT =>
if (node.right == null) {
node.right = TreeNode(item, node)
return true
} else return add(node.right)
}
}
}
override fun remove(item : T) : Boolean {
val toRemove = find(root, item)
if (toRemove == null) return false
remove(toRemove)
size--
version++
return true
fun find(node : TreeNode) : TreeNode {
if (node == null) return null
when (compare(item, node.value)) {
EQ => node
LS => find(node.left)
GT => find(node.right)
}
}
}
private fun remove(node : TreeNode) {
when (node) {
is TreeNode(null, null) => replace(node, null)
is TreeNode(null, ?right) => replace(node, right)
is TreeNode(?left, null) => replace(node, left)
is TreeNode(?left, ?right) => {
val min = min(node.right)
node.value = min.value
remove(min)
}
}
fun replace(node : TreeNode, replace : TreeNode) {
if (node == root) {
root = replace
return
}
if (node.parent.left == node) {
node.parent.left = replace
} else if (node.parent.right == node) {
node.parent.right = replace
} else Assert(false)
}
}
// Relies on tail-recursion optimization
private fun min(node : TreeNode) {
if (node.left == null) node else min(node.left)
}
override fun iterator() : IIterator<T> = mutableIterator()
override fun mutableIterator() : IMutableIterator<T> = object IMutableIterator {
val version = BinaryTree.this.version
val down = Stack<TreeNode>()
val up = Stack<TreeNode>()
var lastNode : TreeNode
this() {
if (root != null)
down.push(root)
}
override fun next() : T {
if (!hasNext)
throw NoMoreElementsException()
checkVersion()
lastNode = nextNode()
return lastNode.value
}
private fun nextNode() : TreeNode {
while (true) {
if (!down.isEmpty) {
val curNode = down.pop()
if (curNode.left != null) {
up.push(curNode)
down.push(curNode.left)
} else {
if (curNode.right != null) {
down.push(curNode.right)
}
return curNode;
}
} else {
val curNode = up.pop()
if (curNode.right != null) {
down.push(curNode.right)
}
return curNode
}
}
}
override val hasNext : Boolean
get() = !down.isEmpty || !up.isEmpty
override fun remove() {
checkVersion()
if (lastNode == null)
throw IterationException("Nothing to remove")
remove(lastNode)
version++
BinaryTree.this.version = version
}
private fun checkVersion() {
if (version != BinaryTree.this.version) {
throw ConcurrentModificationException()
}
}
}
}
-29
View File
@@ -1,29 +0,0 @@
fun oneBit(index : Int) = 1 shl index
fun setBit(x : Int, index : Int) = x or oneBit(index)
fun unsetBit(x : Int, index : Int) = x and not(oneBit(index))
fun getBit(x : Int, index : Int) = x and oneBit(index) != 0
fun getBit(x : Int, index : Int) = (x shr index) shl 31 != 0
fun countOnes(x : INumber) {
var result = 0
while (x != 0) {
result += x and 1
x = x ushr 1
}
result
}
fun mostSignificantBit(x : INumber) = (x and oneBit(x.bits - 1) != 0) as Int
fun countOnes(x : INumber) = if (x == 0) 0 else mostSignificantBit(x) + countOnes(x shl 1)
fun Int.matchMask(mask : Int) = this and mask == mask
open class INumber<T : this> : IComparable<T> {
val bits : Int
[operator] fun plus(other : T) : T
[operator] fun shl(bits : Int) : T
// ...
}
-23
View File
@@ -1,23 +0,0 @@
package bottles;
fun main(args: Array<String>) {
var bottles: Int = 99;
while(bottles > 0) {
System.out?.print(bottlesOfBeer(bottles) + " on the wall, ")
System.out?.println(bottlesOfBeer(bottles) + ".")
System.out?.print("Take one down, pass it around, ")
if (--bottles == 0) {
System.out?.println("no more bottles of beer on the wall.")
}
else {
System.out?.println(bottlesOfBeer(bottles) + " on the wall.")
}
}
}
fun bottlesOfBeer(count: Int): String {
val result = StringBuilder()
result.append(count)
result.append(if (count > 1) " bottles of beer" else " bottle of beer")
return result.toString() ?: ""
}
-43
View File
@@ -1,43 +0,0 @@
val foo = object AntBuilder() {
lazy val groovy = library {
classpath("$libs/groovy-...")
}
lazy val gant = library {
new File("$gantHome/lib").files.each {
classpath(it)
}
}
lazy val JPS = module {
targetLevel = "1.5"
classpath(antLayout, gant, groovy)
src("$projectHome/antLayout/src")
}
}.build()
class AntBuilder {
abstract class ClassPathEntry {}
class Module : ClassPathEntry {
fun classpath(entries : ClassPathEntry/*...*/) { /*...*/ }
var targetLevel : String
fun src(src : String) { /*...*/ }
}
class Library : ClassPathEntry {
fun classpath(entries : ClassPathEntry/*...*/) { /*...*/ }
}
fun library(initializer : { Library.() : Library}) {
val lib = new Library()
lib.initializer()
return lib
}
fun classpath(/*...*/)
fun module(/*...*/)
}
-5
View File
@@ -1,5 +0,0 @@
enum class Color(val r : Int , val g :Int , val b : Int) {
RED : Color(255, 0, 0)
GREEN : Color(0, 255, 0)
BLUE : Color(0, 0, 255)
}
-225
View File
@@ -1,225 +0,0 @@
package ColossalCave
import java.util.*
import java.io.*
open class Thing(val name : String) {
open val ldesc : String get() = "This is a nondescript thing"
}
open class Room(name : String) : Thing(name) {
open val west : Room? get() = null
open val east : Room? get() = null
open val north : Room? get() = null
open val south : Room? get() = null
var seen : Boolean = false
}
public val items : ArrayList<Item> = ArrayList<Item>()
open class Item(name : String, var room : Room?) : Thing(name) {
open val isFixed : Boolean get() = false
open val isListed : Boolean get() = true
{
items.add(this)
}
}
open class FixedItem(name : String, room : Room?) : Item(name, room) {
override val isFixed : Boolean get() = true
override val isListed : Boolean get() = false
}
fun describeRoom(room : Room) {
println(room.name)
if (!room.seen) {
println(room.ldesc)
room.seen = true
}
for(val item in items) {
if (item.room === room && item.isListed) {
println("You see " + item.name)
}
}
}
object AtEndOfRoad: Room("At End of Road") {
override val ldesc : String = "You are standing at the end of the road before a small brick building." +
" Around you is a forest. A small stream flows out of the building and down a gully."
override val west : Room? get() = AtHillInRoad
override val east : Room? get() = InsideBuilding
override val south : Room? get() = InAValley
}
object AtHillInRoad: Room("At Hill in Road") {
override val ldesc : String = "You have walked up a hill, still in the forest. The road slopes back down " +
"the other side of the hill. There is a building in the distance."
override val east : Room? get() = AtEndOfRoad
}
val Hill = object: FixedItem("Hill", AtHillInRoad) {
override val ldesc : String = "It's just a typical hill."
}
object InsideBuilding: Room("Inside Building") {
override val ldesc : String = "You are inside a building, a well house for a large spring."
override val west : Room? get() = AtEndOfRoad
}
object InAValley: Room("In A Valley") {
override val ldesc : String = "You are in a valley in the forest beside a stream tumbling along a rocky bed."
override val north : Room get() = AtEndOfRoad
override val south : Room get() = AtSlitInStreambed
}
object AtSlitInStreambed: Room("At Slit In Streambed") {
override val ldesc : String = "At your feet all the water of the stream splashs into a 2-inch slit in the rock." +
" Downstream the streambed is bare rock."
override val north : Room get() = InAValley
override val south : Room get() = OutsideGrate
}
object OutsideGrate: Room("Outside Grate") {
override val ldesc : String = "You are in a 20-foot depression floored with bare dirt. Set into the dirt " +
"is a strong steel grate mounted in concrete. A dry streambed leads into the depression."
override val north : Room get() = AtSlitInStreambed
}
val brassLantern = object: Item("Brass Lantern", InsideBuilding) {
}
val setOfKeys = object: Item("A Set of Keys", InsideBuilding) {
}
fun startRoom() = AtEndOfRoad
class Player(var room : Room) {
val inventory : ArrayList<Item> = ArrayList<Item>()
}
abstract class Command {
abstract fun execute(p : Player) : Unit
}
object QuitCommand : Command() {
override fun execute(p : Player) {
System.exit(0)
}
}
abstract class MoveCommand : Command() {
fun moveTo(p : Player, room : Room?) {
if (room === null) {
println("You can't go that way")
return
}
p.room = room as Room
describeRoom(p.room)
}
}
object NorthCommand: MoveCommand() {
override fun execute(p : Player) {
moveTo(p, p.room.north)
}
}
object SouthCommand: MoveCommand() {
override fun execute(p : Player) {
moveTo(p, p.room.south)
}
}
object WestCommand: MoveCommand() {
override fun execute(p : Player) {
moveTo(p, p.room.west)
}
}
object EastCommand: MoveCommand() {
override fun execute(p : Player) {
moveTo(p, p.room.east)
}
}
abstract class CommandOnObject(val target : String) : Command() {
override fun execute(p : Player) {
for(val item in items) {
if (item.name.equalsIgnoreCase(target) && item.room == p.room) {
executeOn(p, item)
return
}
}
println("I don't see any " + target + " here.")
}
abstract fun executeOn(p : Player, item : Item)
}
class TakeCommand(target : String) : CommandOnObject(target) {
override fun executeOn(p : Player, item : Item) {
if (item.isFixed) {
print("You can't have " + item.name)
return
}
item.room = null
p.inventory.add(item)
println("Taken")
}
}
class ExamineCommand(target : String) : CommandOnObject(target) {
override fun executeOn(p : Player, item : Item) {
println(item.ldesc)
}
}
object InventoryCommand: Command() {
override fun execute(p : Player) {
if (p.inventory.size() == 0)
println("You are empty-handed.")
else {
println("You are carrying:")
for(val item in p.inventory) {
println(item.name)
}
}
}
}
fun parse(cmd : String) : Command? {
if (cmd == "quit") return QuitCommand
if (cmd == "north") return NorthCommand
if (cmd == "south") return SouthCommand
if (cmd == "west") return WestCommand
if (cmd == "east") return EastCommand
if (cmd == "inventory") return InventoryCommand
if (cmd.startsWith("take")) {
val target = cmd.substring(4).trim()
return TakeCommand(target)
}
if (cmd.startsWith("examine")) {
val target = cmd.substring(7).trim()
return ExamineCommand(target)
}
return null
}
fun main(args : Array<String>) {
val p = Player(startRoom())
describeRoom(p.room)
val reader = BufferedReader(InputStreamReader(System.`in`))
while(true) {
print("> ")
val cmd = reader.readLine() as String
val command = parse(cmd)
if (command === null)
println("Unrecognized command");
else
command.execute(p)
}
}
-34
View File
@@ -1,34 +0,0 @@
class Foo(bar : Bar) {
class object {
private val cache = HashMap<Bar, Foo>()
// Factory method:
fun Foo() = Foo(null);
// Factory method:
fun Foo(bar : Bar) = cache.cachedLookup(bar, this(bar))
}
fun doFoo() {
// ...
}
}
// To create an object of Foo
val foo = Foo()
// or
val foo = Foo(Bar())
// Subclass (Foo must be marked as extendable/open, i.e. ont sealed)
class FooSub(S : String) : Foo() { // Delegates to Foo created as a result of the factory method Foo()
}
fun Map<K, V>.cachedLookup(key : K, lazy value : V) : V {
var v = this[key]
if (v == null) {
v = value
this[key] = value
}
return v
}
-34
View File
@@ -1,34 +0,0 @@
type f1 = {(T) : X}
// type f1 = {(T) => X}
type f2 = {(T, E) : X}
// type f2 = {(T, E) => X}
type f_tuple = {((T, E)) : X}
//type f_tuple = {((T, E)) => X}
type hof = { (X) : {(T) : Y} }
//type hof = { (X) => {(T) => Y} }
type hof2 = { ({(X) : Y}) : {(Y) : Z} }
//type hof2 = { {(X) => Y} => {(Y) => Z} }
type Comparison<in T> = {(a : T, b : T) : Int}
//type Comparison<in T> = {(a : T, b : T) => Int}
type Equality<in T> = {(a : T, b : T) : Boolean}
//type Equality<in T> = {(a : T, b : T) => Boolean}
type HashFunction<in T> = {(obj : T) : Int}
//type HashFunction<in T> = {(obj : T) => Int}
type Runnable = {() : ()}
//type Runnable = {() => ()}
type Function1<in T, out R> = {(input : T) : R}
//type Function1<in T, out R> = {(input : T) => R}
val f1 = {(t : T) : X => something(t)}
fun f1(t : T) : X = something(t)
val f1 = {(t : T) => something(t)}
val f1 = {(T) : X => something(it)}
val f1 = {t => something(t)}
val f1 = {something(it)}
val f1 : {(T) : X} = {X()}
-39
View File
@@ -1,39 +0,0 @@
package generics;
import java.util.*
class Box<T>(t: T) {
var value = t
}
fun isIntBox(box: Box<out Any?>): Boolean {
return box is Box<Int>;
}
abstract class Source<out T> {
fun nextT() : T
}
fun demo(strs : Source<String>) {
val objects : Source<Any> = strs // This is OK, since T is an out-parameter
// ...
}
fun singletonList<T>(item: T): List<T> {
val result = ArrayList<T>()
result.add(item)
return result
}
//fun <T> T.basicToString(): String {
// return typeinfo(this) + "@" + System.identityHashCode(this)
//}
fun main(args: Array<String>) {
val box: Box<Int> = Box<Int>(1)
System.out?.println(box.value)
System.out?.println(if (isIntBox(box)) "int" else "not int");
val singleString: List<String> = singletonList<String>("foo")
System.out?.println(singleString.get(0))
}
-60
View File
@@ -1,60 +0,0 @@
class Vertex<V>(val data : V)
class Edge<V, E>(val from : V, val data : E, val to : V)
class Graph<V, E> {
private val mutableEdges = new ArrayList<Edge<V, E>>() // type is ArrayList, but I want IMutableList
/* options:
private val edges : IMutableList<Edge<V, E>> = new ArrayList<Edge<V, E>>()
private val edges : IMutableList<Edge<V, E>> = new ArrayList() // not an erasure, but a request to infer parameters
*/
private val mutableVertices = new HashSet<Vertex<V>>()
val edges : IList<Edge<V, E>> = mutableEdges;
val vertices : ISet<Edge<V, E>> = mutableVertices;
fun addEdge(from : V, data : E, to : V) {
mutableEdges.add(new Edge(from, data, to)) // constructor parameters are inferred
}
fun addVertex(v : V) {
mutableEdges.add(new Edge(from, data, to)) // constructor parameters are inferred
}
fun neighbours(v : Vertex<V>) = edges.filter{it.from == v}.map{it.to} // type is IIterable<Vertex<V>>
fun dfs(handler : {(V) : Unit}) {
val visited = new HashSet<Vertex<V>>()
vertices.foreach{dfs(it, visited, handler)}
fun dfs(current : Vertex<V>, visited : ISet<Vertex<V>>, handler : {(V) : Unit}) {
if (!visited.add(current))
return
handler(current)
neighbours(current).foreach{dfs(it, visited, handler)}
}
}
public fun traverse(pending : IPushPop<Vertex<V>>, visited : ISet<Vertex<V>>, handler : {(V) : Unit}) {
vertices.foreach {
if (!visited.add(it))
continue
pending.push(it)
while (!pending.isEmpty) {
val current = pending.pop()
handler(current);
neighbours(current).foreach { n =>
if (visited.add(n)) {
pending.push(n)
}
}
/* alternative
pending->push(neighbours(current).filter{n => !visited[n])})
// -> means that if push(x : T) and actual parameter y is IIterable<T>, this compiles into
y.foreach{ n => push(n) }
*/
}
}
}
}
-7
View File
@@ -1,7 +0,0 @@
import kotlin.modules.ModuleSetBuilder
fun defineModules(builder: ModuleSetBuilder) {
builder.module("hello") {
source files "HelloNames.kt"
}
}
-18
View File
@@ -1,18 +0,0 @@
package HelloNames
fun main(args : Array<String>) {
var names = ""
for (i in args.indices) {
names += args[i]
if (i + 1 < args.size)
names += ", "
}
// string templates
println("Hello, $names!")
}
fun println(message : String) {
// System.out is a nullable field
System.out?.println(message)
}
-22
View File
@@ -1,22 +0,0 @@
package HelloNamesFaster
fun main(args : Array<String>) {
var names = StringBuilder()
for (i in args.indices) {
names += args[i]
if (i + 1 < args.size)
names += ", "
}
// string templates
println("Hello, $names!")
}
fun println(message : String) {
// System.out is a nullable field
System.out?.println(message)
}
fun StringBuilder.plusAssign(s : String) {
this.append(s)
}
-32
View File
@@ -1,32 +0,0 @@
package HelloNamesRealistic
fun main(args : Array<String>) {
val names = args.join(", ")
println("Hello, $names!")
}
fun println(message : String) {
// System.out is a nullable field
System.out?.println(message)
}
fun <T> Iterable<T>.join(separator : String) : String? {
val names = StringBuilder()
forit (this) {(it: Iterator<T>): Unit =>
names += it.next()
if (it.hasNext())
names += separator
}
return names.toString()
}
fun <T> forit(col : Iterable<T>, f : fun(Iterator<T>) : Unit) {
val it = col.iterator()
while (it.hasNext()) {
f(it)
}
}
fun StringBuilder.plusAssign(s : String) {
this.append(s)
}
-5
View File
@@ -1,5 +0,0 @@
open class IPushPop<T> {
val isEmpty : Boolean
fun push(item : T)
fun pop() : T
}
-9
View File
@@ -1,9 +0,0 @@
package JavaInterop
import java.util.*
fun main(args: Array<String>) {
val list = ArrayList<String>()
list.add("foo")
System.out?.println(list[0])
}
-3
View File
@@ -1,3 +0,0 @@
fun foo() {
l filter {it.x} map {it.foo} aggregate {(a, b) => a + b}
}
-213
View File
@@ -1,213 +0,0 @@
package LambdaTheGathering
/**
* Incomplete solution to the IFCP Contest 2011
* @author yole
*/
class GameError(msg: String): Exception(msg) {
}
abstract class Function(val name: String) {
abstract fun apply(x: Value, proponent: Player): Value
fun toString() = name
open fun asNumber(): Int { throw GameError("could not get numeric value of a function") }
}
object Identity: Function("I") {
override fun apply(x: Value, proponent: Player): Value = x
}
object IdentityValue: Value(Identity)
object Zero: Function("zero") {
override fun apply(x: Value, proponent: Player): Value = Value(0)
override fun asNumber(): Int = 0
}
object Succ: Function("succ") {
override fun apply(x: Value, proponent: Player): Value = Value(x.asNumber() + 1)
}
object Get: Function("get") {
override fun apply(x: Value, proponent: Player): Value = proponent.getSlot(x.asNumber()).field
}
object Dbl: Function("dbl") {
override fun apply(x: Value, proponent: Player): Value = Value(x.asNumber() * 2)
}
class HelpFunc2(val i: Value, val j: Value): Function("help(" + i + ")(" + j + ")") {
override fun apply(x: Value, proponent: Player): Value {
val n = x.asNumber()
proponent.getSlot(i.asNumber()).decreaseVitality(n)
proponent.getSlot(j.asNumber()).increaseVitality(n * 11 / 10);
return Value(Identity)
}
}
class HelpFunc(val i: Value): Function("help(" + i + ")") {
override fun apply(x: Value, proponent: Player): Value = Value(HelpFunc2(i, x))
}
object Help: Function("help") {
override fun apply(x: Value, proponent: Player): Value = Value(HelpFunc(x))
}
class KFunc(val arg: Value): Function("K(" + arg + ")") {
override fun apply(x: Value, proponent: Player): Value = arg
}
object K: Function("K") {
override fun apply(x: Value, proponent: Player): Value = Value(KFunc(x))
}
class SFunc2(val f: Value, val g: Value): Function("S(" + f + ")(" + g + ")") {
override fun apply(x: Value, proponent: Player): Value {
val h = f.apply(x, proponent)
val y = g.apply(x, proponent)
val z = h.apply(y, proponent)
return z
}
}
class SFunc(val f: Value): Function("S(" + f + ")") {
override fun apply(x: Value, proponent: Player): Value = Value(SFunc2(f, x))
}
object S: Function("S") {
override fun apply(x: Value, proponent: Player): Value = Value(SFunc(x))
}
open class Value(val n: Int, val f: Function, val isFunction: Boolean) {
this(n: Int): this(if (n > 65535) 65535 else n, Identity, false) {}
this(f: Function): this(0, f, true) {}
fun equals(rhs: Any?): Boolean {
if (rhs is Value) {
val rhsValue = rhs as Value
if (rhsValue.isFunction) {
return isFunction && f === rhsValue.f
}
else {
return ! isFunction && n == rhsValue.n
}
}
return false
}
fun apply(x: Value, proponent: Player): Value {
if (isFunction) return f.apply(x, proponent)
throw GameError("could not apply non-function value");
}
fun asNumber(): Int {
if (! isFunction) return n;
return f.asNumber()
}
fun toString() = if (isFunction) f.name else Integer.toString(n)
}
class Slot() {
var vitality: Int = 10000
var field: Value = Value(Identity)
val alive: Boolean get() = vitality > 0
fun isDefault() = vitality == 10000 && field == Value(Identity)
fun increaseVitality(delta: Int) {
if (alive) {
vitality += delta
if (vitality > 65535) vitality = 65535;
}
}
fun decreaseVitality(delta: Int) {
if (!alive || delta > vitality) throw GameError("cannot decrease vitality")
vitality -= delta
}
fun toString() = "{" + vitality + "," + field.toString() + "}";
}
class Player() {
var opponent: Player? = null
val slots: Array<Slot> = Array<Slot>(256, { i -> Slot() })
fun getSlot(i: Int): Slot {
if (i < 0 || i > 255) throw GameError("invalid slot index")
if (!slots[i].alive) throw GameError("the slot is dead")
return slots[i]
}
fun printSlots() {
println("(slots {10000,I} are omitted)")
for(val i in 0..255) {
if (!slots[i].isDefault()) {
println("" + i + "=" + slots[i].toString())
}
}
}
fun applyCardToSlot(index: Int, card: Function) {
println("applying card " + card + " to slot " + index)
slots[index].field = card.apply(slots[index].field, this)
}
fun applySlotToCard(index: Int, card: Function) {
println("applying slot " + index + " to card " + card)
slots[index].field = slots[index].field.apply(Value(card), this)
}
}
val p0 = Player()
val p1 = Player()
fun main(args: Array<String>) {
p0.opponent = p1
p1.opponent = p0
print("player 0")
p0.printSlots()
p0.applySlotToCard(0, Help)
p0.printSlots()
p0.applySlotToCard(0, Zero)
p0.printSlots()
p0.applyCardToSlot(0, K)
p0.printSlots()
p0.applyCardToSlot(0, S)
p0.printSlots()
p0.applySlotToCard(0, Succ)
p0.printSlots()
p0.applySlotToCard(0, Zero)
p0.printSlots()
p0.applySlotToCard(1, Zero)
p0.printSlots()
p0.applyCardToSlot(1, Succ)
p0.printSlots()
p0.applyCardToSlot(1, Dbl)
p0.printSlots()
p0.applyCardToSlot(1, Dbl)
p0.printSlots()
p0.applyCardToSlot(1, Dbl)
p0.printSlots()
p0.applyCardToSlot(1, Dbl)
p0.printSlots()
p0.applyCardToSlot(0, K)
p0.printSlots()
p0.applyCardToSlot(0, S)
p0.printSlots()
p0.applySlotToCard(0, Get)
p0.printSlots()
p0.applyCardToSlot(0, K)
p0.printSlots()
p0.applyCardToSlot(0, S)
p0.printSlots()
p0.applySlotToCard(0, Succ)
p0.printSlots()
p0.applySlotToCard(0, Zero)
p0.printSlots()
}
-12
View File
@@ -1,12 +0,0 @@
package NullSafety
fun <T : Any> T?.npe() : T =
if (this == null)
throw NullPointerException()
else
this
fun main(args: Array<String>) {
val s: String? = null
s.npe<String>().length()
}
-17
View File
@@ -1,17 +0,0 @@
class Point(val x: Int, val y: Int) {
fun toString() = "($x,$y)"
fun distanceTo(other: Point): Double {
val dx = x - other.x
val dy = y - other.y
return Math.sqrt((dx*dx + dy*dy).toDouble())
}
}
fun main(args: Array<String>) {
var p = Point(0, 0)
var q = Point(1, 1)
p.distanceTo(q)
}
-31
View File
@@ -1,31 +0,0 @@
open class Builder<E, R> {
[operator] fun plusAssign(item : E)
fun result() : R
}
open class Buildable {
fun newBuilder<E, R>() : Builder<E, R>
}
class List<T> {
class object Buildable {
override fun newBuilder<E, R>() : Builder<E, R>
}
}
extension Map<E, T>
where
T : Iterable<E>,
class object T : Buildable<E, T> for T {
fun map<R>(f : {(E) : R}) : T<R> = {
val builder = T.newBuilder()
for (e in this) {
builder += f(e)
}
builder.result()
}
}
-33
View File
@@ -1,33 +0,0 @@
class Queue<T> : IPushPop<T> {
private class Item<T>(val data : T, var next : Item<T>)
private var head : Item<T> = null
private var tail : Item<T> = null
override fun push(item : T) {
val i = new Item(item)
if (tail == null) {
head = i
tail = head
} else {
tail.next = i
tail = i
}
}
override fun pop() =
if (head == null)
throw new UnderflowException()
else {
val result = head.data
head = head.next
if (head == null)
tail = null
result
}
override val isEmpty
get() = head == null
}
-13
View File
@@ -1,13 +0,0 @@
class Stack<T> : IPushPop<T> {
private val data = new ArrayList<T>();
override fun push(item : T) {
data.add(item) // Problem: I would like to write push(...) = data.add(...), but the types do not match
}
override fun pop() = data.removeLast()
override val isEmpty
get() = data.isEmpty
}
-95
View File
@@ -1,95 +0,0 @@
package TwentyFourGame
/**
* @author yole
*/
import java.util.*
import java.io.*
fun StringBuilder.takeFirst(): Char {
if (this.length() == 0) return 0.toChar()
val c = this.charAt(0)
this.deleteCharAt(0)
return c
}
class Evaluator(val expr: StringBuilder, val numbers: ArrayList<Int>) {
fun checkFirst(expect: Char): Boolean {
if (expr.length() > 0 && expr.charAt(0) == expect) {
expr.deleteCharAt(0)
return true
}
return false
}
fun evaluateArg(): Int {
val c = expr.takeFirst()
when(c) {
in '0'..'9' -> {
val n = c - '0'
val index = numbers.indexOf(n)
if (index < 0) throw Exception("You used incorrect number: " + n)
numbers.remove(index) // gotcha: conflict between remove(Object) and remove(int)
return n
}
'(' -> {
val result = evaluate()
if (expr.takeFirst() != ')') throw Exception(") expected")
return result
}
0.toChar() -> throw Exception("Syntax error: Character expected")
else -> throw Exception("Syntax error: Unrecognized character " + c)
}
}
fun evaluateMult(): Int {
val lhs = evaluateArg()
if (checkFirst('*'))
return lhs * evaluateMult()
if (checkFirst('/'))
return lhs / evaluateMult()
return lhs
}
fun evaluate(): Int {
val lhs = evaluateMult()
if (checkFirst('+'))
return lhs + evaluate()
if (checkFirst('-'))
return lhs - evaluate()
return lhs
}
fun evaluateAll(): Int {
val result = evaluate()
if (expr.length() > 0) throw Exception("unexpected text: " + expr)
return result
}
}
fun main(args: Array<String>) {
println("24 game")
val numbers = ArrayList<Int>(4)
val rnd = Random();
val prompt = StringBuilder()
for(val i in 0..3) {
val n = rnd.nextInt(9) + 1
numbers.add(n)
if (i > 0) prompt.append(" ");
prompt.append(n)
}
println("Your numbers: " + prompt)
println("Enter your expression:")
val reader = BufferedReader(InputStreamReader(System.`in`))
val expr = StringBuilder(reader.readLine())
try {
val result = Evaluator(expr, numbers).evaluateAll()
if (result != 24)
println("Sorry, that's " + result)
else
println("You won!");
}
catch(e: Throwable) {
println(e.getMessage())
}
}
-33
View File
@@ -1,33 +0,0 @@
class UnionFind {
private val data = IMutableList<Int>()
fun add() : Int {
val size = data.size
data.add(size)
size
}
private fun parent(x : Int) : Int {
val p = data[x];
if (p == x) {
return x;
}
val result = parent(p);
data[x] = result;
}
fun union(a : Int, b : Int) {
val pa = parent(a)
val pb = parent(b)
if (pa != pb) {
if (Random.nextInt().isOdd) {
data[pb] = pa
} else {
data[pa] = pb
}
}
}
}
val Int.isOdd : Boolean
get() = this % 2 != 0
-14
View File
@@ -1,14 +0,0 @@
class Pair(x : Int, y : Int) {
class object {
fun copy(from : Pair, x : Int = from.x, y : Int = from.y) = new Pair(x, y)
}
}
// One can say:
val p = new Point(1, 2)
val p1 = Point.Copy(p, x = 2)
val p2 = Point.Copy(p1, y = -1)
val p3 = Point.Copy(p)
// Such copy(...) methods can be automatically generated by the compiler
// whenever there is a primary constructor
-15
View File
@@ -1,15 +0,0 @@
[inline] fun with<T>(receiver : T, body : {T.() : Unit}) = receiver.body()
fun example() {
with(java.lang.System.out) {
println("foo");
print("bar");
}
System.out.{
println("foo");
print("bar");
}()
}
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinRuntime" level="project" />
</component>
</module>
-173
View File
@@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
<entry name="?*.html" />
<entry name="?*.dtd" />
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true" />
</component>
<component name="CopyrightManager" default="">
<module2copyright />
</component>
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/actors.iml" filepath="$PROJECT_DIR$/actors.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
<component name="libraryTable">
<library name="KotlinRuntime">
<CLASSES>
<root url="file://$PROJECT_DIR$/../../../dist/kotlinc/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/../../../dist/kotlinc/lib" recursive="false" />
</library>
</component>
</project>
-523
View File
@@ -1,523 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9624598b-68cd-4d51-9271-5ac61ef5a43a" name="Default" comment="" />
<ignored path="actors.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="DebuggerManager">
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<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>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<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_any>
<breakpoint_rules />
<ui_properties />
</component>
<component name="FavoritesManager">
<favorites_list name="actors" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="Main.kt" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Main.kt">
<provider selected="true" editor-type-id="text-editor">
<state line="29" column="74" selection-start="845" selection-end="845" vertical-scroll-proportion="1.2393162">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="22" />
<option name="width" value="1440" />
<option name="height" value="874" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="PackagesPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="actors" />
<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>
</subPane>
</pane>
<pane id="Scope">
<subPane subId="Project Files">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="project.structure.last.edited" value="Modules" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="project.structure.proportion" value="0.15" />
<property name="MemberChooser.sorted" value="false" />
<property name="recentsLimit" value="5" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="MemberChooser.copyJavadoc" value="false" />
<property name="dynamic.classpath" value="false" />
</component>
<component name="RunManager" selected="Kotlin.org.jetbrains.kotlin.examples.actors">
<configuration default="false" name="org.jetbrains.kotlin.examples.actors" type="JetRunConfigurationType" factoryName="Kotlin" temporary="true">
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.examples.actors.namespace" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="actors" />
<envs />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
<option name="PROGRAM_PARAMETERS" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="actors" />
<envs />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="Kotlin.org.jetbrains.kotlin.examples.actors" />
</list>
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9624598b-68cd-4d51-9271-5ac61ef5a43a" name="Default" comment="" />
<created>1328866126960</created>
<updated>1328866126960</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="22" width="1440" height="874" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="CodeWindow" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32897604" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.10632184" sideWeight="0.50199205" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.49800798" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="ResolveWindow" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="CHECK_NEW_TODO" value="true" />
<option name="myTodoPanelSettings">
<value>
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</value>
</option>
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
<option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
<option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="LAST_COMMIT_MESSAGE" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ACTIVE_VCS_NAME" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<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" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Main.kt">
<provider selected="true" editor-type-id="text-editor">
<state line="29" column="74" selection-start="845" selection-end="845" vertical-scroll-proportion="1.2393162">
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>No facets are configured</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.6</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>actors</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.6</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>KotlinRuntime</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
-184
View File
@@ -1,184 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import kotlin.concurrent.*
import kotlin.util.*
import java.util.concurrent.*
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater
import java.util.Date
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicReference
import java.util.concurrent.atomic.AtomicLong
/*
Message handling class which process only one message at any given moment
Three main ways to use it
- post and forget
- post and await result
- post and assign callback to be called when message processed
*/
abstract class Actor(protected val executor: Executor, val fair: Boolean = false) {
private val queue = Ref()
class Ref() : AtomicReference<FunctionalQueue<Any>>(emptyQueue), Runnable {
override fun run() {
if (!fair)
runUnfair()
else
runFair()
}
private fun runFair() {
while(true) {
val q = get()
if(q.identityEquals(busyEmptyQueue)) {
if(compareAndSet(busyEmptyQueue, emptyQueue)) {
break
}
}
else {
val removed = q.removeFirst()
val newQueue = if(removed.second.empty) busyEmptyQueue else removed.second
if(compareAndSet(q, newQueue)) {
doProcess(removed.first)
executor.execute(this)
break
}
}
}
}
private fun runUnfair() {
while (true) {
val q = get()
if(q.identityEquals(busyEmptyQueue)) {
if (compareAndSet(q, emptyQueue)) {
break
}
}
else {
if (compareAndSet(q, busyEmptyQueue)) {
var l = q.output
while (!l.empty) {
doProcess(l.head)
l = l.tail
}
l = q.input.reversed()
while (!l.empty) {
doProcess(l.head)
l = l.tail
}
}
}
}
}
override fun toString(): String? = null
}
/*
Handle message and return result
This method guaranteed to be executed only one per object at any given time
*/
protected abstract fun onMessage(message: Any) : Any?
/*
Post message to the actor.
The method returns immediately and the message itself will be processed later
*/
fun post(message: Any) {
messagesSent.incrementAndGet()
while(true) {
val q = queue.get()
val newQueue = (if (q.identityEquals(busyEmptyQueue)) emptyQueue else q) add message
if(queue.compareAndSet(q, newQueue)) {
if (q.identityEquals(emptyQueue)) {
executor.execute(queue)
}
break
}
}
}
fun postFirst(message: Any) {
messagesSent.incrementAndGet()
while(true) {
val q = queue.get()
val newQueue = (if (q.identityEquals(busyEmptyQueue)) emptyQueue else q) addFirst message
if(queue.compareAndSet(q, newQueue)) {
if (q.identityEquals(emptyQueue)) {
executor.execute(queue)
}
break
}
}
}
/*
Post message to the actor and schedule callback to be executed on given executor when message processed
*/
fun post(message: Any, executor: Executor = this.executor, callback: (Any?)->Unit) =
post(Callback(message, executor, callback))
/*
Send message to the actor and await result
*/
fun send(message: Any) : Any? {
val request = Request(message)
post(request)
request.await()
return request.result
}
private fun doProcess(message: Any) {
messagesProcessed.incrementAndGet()
when(message) {
is Request -> {
message.result = onMessage(message.message)
message.countDown()
}
is Callback -> {
val result = onMessage(message.message)
message.executor execute {
val callback = message.callback;
callback(result)
}
}
else -> onMessage(message)
}
}
/*
Create actor on the same executor
*/
fun actor(handler: (Any)->Any?) = executor.actor(handler)
class object {
val emptyQueue = FunctionalQueue<Any>()
val busyEmptyQueue = FunctionalQueue<Any>() add "busy empty queue"
class Request(val message: Any) : java.util.concurrent.CountDownLatch(1) {
var result: Any? = null
}
class Callback(val message: Any, val executor: Executor, val callback: (Any?) -> Unit)
val messagesSent = AtomicLong()
val messagesProcessed = AtomicLong()
val timer = fixedRateTimer(daemon=true, period=5000.toLong()) {
val sent = messagesSent.get()
val received = messagesProcessed.get()
println("Actors stat: Sent: $sent Processed: $received Pending: ${sent-received}")
}
}
}
fun Executor.actor(handler: (Any)->Any?) : Actor = object: Actor(this) {
override fun onMessage(message: Any) {
handler(message)
}
}
fun singleThreadActor(handler: (Any)->Any?) : Actor = Executors.newSingleThreadExecutor()!!.actor(handler)
-32
View File
@@ -1,32 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import java.util.concurrent.Executors
fun main(args: Array<String>) {
val numberOfSymbols = 10000
val numberOfShards = 10
val numberOfClients = 100000
val stocksPerClient = 4
val stockServer = StockServer(numberOfShards)
for (i in 0..numberOfSymbols)
stockServer post RegisterStock(i.toString())
println("Stock server started")
val executor = Executors.newFixedThreadPool(4*Runtime.getRuntime()!!.availableProcessors())!!
for(i in 0..numberOfClients) {
val client = executor.actor{ message ->
// println(message)
}
for (k in 1..stocksPerClient) {
val stock = (Math.random() * numberOfSymbols).toInt()
stockServer post Subscribe(stock.toString(), client)
}
}
println("clients connected")
}
-23
View File
@@ -1,23 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import kotlin.concurrent.*
import java.util.concurrent.Executor
import java.util.LinkedList
import java.util.concurrent.Executors
import java.util.HashMap
import java.util.HashSet
open class StockMessage(val symbol: String) {
class object {
val UpdateModel = "update"
val DoUpdateModel = "do update"
}
}
class RegisterStock(symbol: String) : StockMessage(symbol)
class Subscribe(symbol: String, val subscriber: Actor) : StockMessage(symbol)
class Unsubscribe(symbol: String, val subscriber: Actor) : StockMessage(symbol)
class PriceUpdate(symbol: String, val price: Double) : StockMessage(symbol)
-34
View File
@@ -1,34 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import kotlin.concurrent.*
import org.jetbrains.kotlin.examples.actors.Actor
import java.util.concurrent.Executors
import java.util.LinkedList
class StatCalculator() : Actor(Executors.newSingleThreadExecutor()!!) {
val list = LinkedList<Long> ()
var average = 0.toLong()
var sum = 0.toLong()
var cnt = 0.toLong()
val timer = fixedRateTimer(period=2000.toLong(), daemon=true) {
this@StatCalculator post "print"
}
override fun onMessage(msg: Any) {
when(msg) {
is Long -> {
list.add(msg)
sum += msg
if (list.size() > 20)
sum -= list.removeFirst()
average = sum / list.size()
cnt++
}
"print" -> {
println("Avr. period:[${average}ms] # updates:[$cnt]")
}
else -> {}
}
}
}
-22
View File
@@ -1,22 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import kotlin.concurrent.*
import java.util.concurrent.Executor
import java.util.LinkedList
import java.util.concurrent.Executors
import java.util.HashMap
import java.util.HashSet
class Stock(val symbol: String) {
val subscribers = HashSet<Actor>()
var price = 10*Math.random()
fun update() {
price += Math.random() - 0.5
val priceUpdate = PriceUpdate(symbol, price)
for(s in subscribers) {
s post priceUpdate
}
}
}
-38
View File
@@ -1,38 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import kotlin.concurrent.*
import java.util.concurrent.Executor
import java.util.LinkedList
import java.util.concurrent.Executors
import java.util.HashMap
import java.util.HashSet
class StockServer(val numberOfShards : Int) : Actor(Executors.newFixedThreadPool(numberOfShards+1)!!) {
private val stockToServer = HashMap<String,StockServerShard> ()
private val statCalculator = StatCalculator()
private val shards = Array<StockServerShard> (numberOfShards, { (i: Int) -> StockServerShard(statCalculator, executor) })
private val timer = fixedRateTimer(period=1000.toLong(), daemon=true) {
for(s in shards)
s post StockMessage.UpdateModel
}
override fun onMessage(message: Any): Unit {
when (message) {
is RegisterStock -> {
val shard = shards[stockToServer.size() % shards.size]
stockToServer.put(message.symbol, shard)
shard post message
}
is Subscribe -> {
stockToServer.get(message.symbol)?.post(message)
}
is Unsubscribe -> {
stockToServer.get(message.symbol)?.post(message)
}
else -> {}
}
}
}
@@ -1,44 +0,0 @@
package org.jetbrains.kotlin.examples.actors
import kotlin.concurrent.*
import java.util.concurrent.Executor
import java.util.LinkedList
import java.util.concurrent.Executors
import java.util.HashMap
import java.util.HashSet
class StockServerShard(val statCalculator : StatCalculator, executor: Executor) : Actor(executor) {
private val stocks = HashMap<String,Stock>();
private var previousTime = System.currentTimeMillis();
private var updateScheduled = false
override fun onMessage(message: Any) {
when(message) {
StockMessage.DoUpdateModel -> {
val timeMillis = System.currentTimeMillis()
for(s in stocks.values()) {
s.update()
}
statCalculator post (timeMillis - previousTime)
previousTime = timeMillis
updateScheduled = false
}
StockMessage.UpdateModel -> {
if (!updateScheduled) {
this post StockMessage.DoUpdateModel
updateScheduled = true
}
}
is RegisterStock ->
stocks.put(message.symbol, Stock(message.symbol))
is Subscribe ->
stocks.get(message.symbol)?.subscribers?.add(message.subscriber)
is Unsubscribe ->
stocks.get(message.symbol)?.subscribers?.add(message.subscriber)
else -> {}
}
}
}
-13
View File
@@ -1,13 +0,0 @@
/**
These declarations are "shallow" in the sense that they are not really compiled, only the type-checker uses them
*/
open class ReadOnlyArray<out T> : ISized {
[operator] fun get(index : Int) : T
}
open class WriteOnlyArray<in T> : ISized { // This is needed to keep IIterator's <T> covariant
[operator] fun set(index : Int, value : T)
}
class MutableArray<T> : ReadOnlyArray<T>, WriteOnlyArray<T> {/*...*/}
@@ -1,91 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package binary_trees;
public class BinaryTrees {
private final static int minDepth = 4;
public static void main(String[] args){
final long millis = System.currentTimeMillis();
int n = 20;
if (args.length > 0) n = Integer.parseInt(args[0]);
int maxDepth = (minDepth + 2 > n) ? minDepth + 2 : n;
int stretchDepth = maxDepth + 1;
int check = (TreeNode.bottomUpTree(0,stretchDepth)).itemCheck();
System.out.println("stretch tree of depth "+stretchDepth+"\t check: " + check);
TreeNode longLivedTree = TreeNode.bottomUpTree(0,maxDepth);
for (int depth=minDepth; depth<=maxDepth; depth+=2){
int iterations = 1 << (maxDepth - depth + minDepth);
check = 0;
for (int i=1; i<=iterations; i++){
check += (TreeNode.bottomUpTree(i,depth)).itemCheck();
check += (TreeNode.bottomUpTree(-i,depth)).itemCheck();
}
System.out.println((iterations*2) + "\t trees of depth " + depth + "\t check: " + check);
}
System.out.println("long lived tree of depth " + maxDepth + "\t check: "+ longLivedTree.itemCheck());
long total = System.currentTimeMillis() - millis;
System.out.println("[Binary Trees-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]");
}
private static class TreeNode
{
private TreeNode left, right;
private int item;
TreeNode(int item){
this.item = item;
}
private static TreeNode bottomUpTree(int item, int depth){
if (depth>0){
return new TreeNode(
bottomUpTree(2*item-1, depth-1)
, bottomUpTree(2*item, depth-1)
, item
);
}
else {
return new TreeNode(item);
}
}
TreeNode(TreeNode left, TreeNode right, int item){
this.left = left;
this.right = right;
this.item = item;
}
private int itemCheck(){
// if necessary deallocate here
if (left==null)
return item;
else {
return item + left.itemCheck() - right.itemCheck();
}
}
}
}
@@ -1,68 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package binary_trees;
val minDepth = 4
fun main(args: Array<String>) {
val millis = System.currentTimeMillis()
val n = if (args.size > 0) Integer.parseInt(args[0]) else 20;
val maxDepth = if (minDepth + 2 > n) minDepth + 2 else n
val stretchDepth = maxDepth + 1
var check = bottomUpTree(0,stretchDepth).itemCheck()
System.out?.println("stretch tree of depth "+stretchDepth+"\t check: " + check);
val longLivedTree = bottomUpTree(0,maxDepth);
var depth = minDepth
while(depth<=maxDepth){
val iterations = 1 shl (maxDepth - depth + minDepth)
check = 0
for (i in 1..iterations){
check += bottomUpTree(i,depth).itemCheck()
check += bottomUpTree(-i,depth).itemCheck()
}
System.out?.println("${iterations*2}\t trees of depth $depth\t check: $check")
depth+=2
}
System.out?.println("long lived tree of depth " + maxDepth + "\t check: "+ longLivedTree.itemCheck());
val total = System.currentTimeMillis() - millis
System.out?.println("[Binary Trees-" + System.getProperty("project.name") + " Benchmark Result: " + total + "]");
}
fun bottomUpTree(item: Int, depth: Int) : TreeNode =
if (depth>0){
TreeNode(item, bottomUpTree(2*item-1, depth-1), bottomUpTree(2*item, depth-1))
}
else {
TreeNode(item)
}
class TreeNode(val item: Int, val left: TreeNode? = null, val right: TreeNode? = null) {
fun itemCheck() : Int {
var res = item
if(left != null)
res += left.itemCheck()
if(right != null)
res -= right.itemCheck()
return res
}
}
@@ -1,104 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flist;
import java.util.NoSuchElementException;
abstract public class FList<T> {
abstract T getHead();
abstract FList<T> getTail();
abstract FList<T> plus(T element);
static class Empty<T> extends FList<T> {
@Override
T getHead() {
throw new NoSuchElementException();
}
@Override
FList<T> getTail() {
throw new NoSuchElementException();
}
@Override
FList<T> plus(T element) {
return new OneElementList<T>(element);
}
}
static class OneElementList<T> extends FList<T> {
private T element;
public OneElementList(T element) {
super();
this.element = element;
}
@Override
T getHead() {
return element;
}
@Override
FList<T> getTail() {
return new Empty<T>();
}
@Override
FList<T> plus(T element) {
return new StandardList<T>(element, this);
}
}
private static class StandardList<T> extends FList<T> {
private T head;
private FList<T> tail;
public StandardList(T head, FList<T> tail) {
this.head = head;
this.tail = tail;
}
@Override
T getHead() {
return head;
}
@Override
FList<T> getTail() {
return tail;
}
@Override
FList<T> plus(T element) {
return new StandardList<T>(element, this);
}
}
public static void main(String[] args) {
for(int k = 0; k != 10; ++k) {
long start = System.currentTimeMillis();
FList<Integer> list = new Empty();
for(int i = 0; i != 5000000; ++i)
list = list.plus(i);
System.out.println(System.currentTimeMillis()-start);
}
}
}
@@ -1,85 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flist_kotlin
abstract class FList<T> {
abstract val head : T
abstract val tail : FList<T>
abstract fun plus(element: T) : FList<T>
}
class EmptyFList<T>() : FList<T>() {
override val head: T
get() = throw java.util.NoSuchElementException()
override val tail : EmptyFList<T>
get() = EmptyFList<T>()
override fun plus(element: T) : FList<T> = OneElementFList<T>(element)
}
class OneElementFList<T> (override val head: T): FList<T>() {
override val tail : EmptyFList<T>
get() = EmptyFList<T>()
override fun plus(element: T) : FList<T> = StandardFList<T>(element, this)
}
class StandardFList<T> (override val head: T, override val tail: FList<T>) : FList<T>() {
override fun plus(element: T) : FList<T> = StandardFList<T>(element, this)
}
fun <T> FList<T>.plus2(element: T): FList<T> =
when(this) {
is EmptyFList<*> -> OneElementFList<T>(element)
else -> StandardFList<T>(element, this)
}
fun <T> FList<T>.plus3(element: T) : FList<T> =
if(this is EmptyFList<*>)
OneElementFList<T>(element)
else
StandardFList<T>(element, this)
fun main(args: Array<String>) {
for(k in 0..3) {
val start0 = System.currentTimeMillis()
var flist0 : FList<Int> = EmptyFList<Int>()
for(i in 0..5000000)
flist0 = flist0 + i
System.out?.println(System.currentTimeMillis() - start0)
val start = System.currentTimeMillis()
var flist : FList<Int> = EmptyFList<Int>()
for(i in 0..5000000)
flist = flist.plus2(i)
System.out?.println(System.currentTimeMillis() - start)
val start2 = System.currentTimeMillis()
var flist2 : FList<Int> = EmptyFList<Int>()
for(i in 0..5000000)
flist2 = flist2.plus3(i)
System.out?.println(System.currentTimeMillis() - start2)
System.out?.println()
}
}
@@ -1,62 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package lockperf;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
public class LockPerf {
public static void main(String[] args) {
int processors = Runtime.getRuntime().availableProcessors();
for (int threadNum = 1; threadNum <= 1024; threadNum = threadNum < 2 * processors ? threadNum + 1 : threadNum * 2) {
final AtomicInteger counter = new AtomicInteger();
final CountDownLatch cdl = new CountDownLatch(threadNum);
final ReentrantLock lock = new ReentrantLock();
long start = System.currentTimeMillis();
for (int i = 0; i < threadNum; ++i) {
new Thread(new Runnable() {
public void run() {
while (true) {
lock.lock();
try {
if (counter.get() == 100000000) {
cdl.countDown();
break;
}
else {
counter.incrementAndGet();
}
} finally {
lock.unlock();
}
}
}
}).start();
}
try {
cdl.await();
} catch (InterruptedException e) {//
}
System.out.println(threadNum + " " + (System.currentTimeMillis() - start));
}
}
}
@@ -1,68 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package lockperf_kotlin
import kotlin.io.*
import kotlin.util.*
import kotlin.concurrent.*
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.locks.ReentrantLock;
fun <T> Int.latch(op: CountDownLatch.() -> T) : T {
val cdl = CountDownLatch(this)
val res = cdl.op()
cdl.await()
return res
}
fun main(args: Array<String>) {
val processors = Runtime.getRuntime()!!.availableProcessors()
var threadNum = 1
while(threadNum <= 1024) {
val counter = AtomicInteger()
val duration = measureTimeMillis {
threadNum.latch{
val lock = ReentrantLock()
for(i in 0..threadNum-1) {
thread {
while(true) {
lock.lock()
try {
if (counter.get() == 100000000) {
countDown()
break;
} else {
counter.incrementAndGet()
}
}
finally {
lock.unlock()
}
}
}
}
}
}
println(threadNum.toString() + " " + duration)
if(threadNum < 2 * processors) threadNum++ else threadNum = 2*threadNum
}
}
@@ -1,66 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package quicksort;
public class Quicksort {
public static void swap(int[] a, int i, int j) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
public static void quicksort(int[] a, int L, int R) {
int m = a[(L + R) / 2];
int i = L;
int j = R;
while (i <= j) {
while (a[i] < m)
i++;
while (a[j] > m)
j--;
if (i <= j) {
swap(a, i++, j--);
}
}
if (L < j)
quicksort(a, L, j);
if (R > i)
quicksort(a, i, R);
}
public static void quicksort(int[] a) {
quicksort(a, 0, a.length - 1);
}
public static void main(String[] args) {
long start = System.currentTimeMillis();
// Sample data
int[] a = new int[100000000];
for (int i = 0; i < a.length; i++) {
a[i] = i * 3 / 2 + 1;
if (i % 3 == 0)
a[i] = -a[i];
}
quicksort(a);
long total = System.currentTimeMillis() - start;
System.out.println("[Quicksort-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]");
}
}
@@ -1,63 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package quicksort
fun IntArray.swap(i:Int, j:Int) {
val temp = this[i]
this[i] = this[j]
this[j] = temp
}
fun IntArray.quicksort() = quicksort(0, size-1)
fun IntArray.quicksort(L: Int, R:Int) {
val m = this[(L + R) / 2]
var i = L
var j = R
while (i <= j) {
while (this[i] < m)
i++
while (this[j] > m)
j--
if (i <= j) {
swap(i++, j--)
}
}
if (L < j)
quicksort(L, j)
if (R > i)
quicksort(i, R)
}
fun main(array: Array<String>) {
val start = System.currentTimeMillis()
val a = IntArray(100000000)
var i = 0
val len = a.size
while (i < len) {
a[i] = i * 3 / 2 + 1
if (i % 3 == 0)
a[i] = -a[i]
i++
}
a.quicksort()
val total = System.currentTimeMillis() - start
System.out?.println("[Quicksort-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]");
}
@@ -1,186 +0,0 @@
package spectralnorm_kotlin;
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
The Computer Language Benchmarks Game
http://shootout.alioth.debian.org/
Based on C# entry by Isaac Gouy
contributed by Jarkko Miettinen
Parallel by The Anh Tran
*/
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.concurrent.CyclicBarrier;
public class SpectralNorm
{
private static final NumberFormat formatter = new DecimalFormat ("#.000000000");
public static void main (String[] args)
{
int n = 5500;
if (args.length > 0) n = Integer.parseInt (args[0]);
final long millis = System.currentTimeMillis();
System.out.println (formatter.format (spectralnormGame (n)) );
long total = System.currentTimeMillis() - millis;
System.out.println("[SpectralNorm-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]");
}
private static final double spectralnormGame (int n)
{
// create unit vector
double[] u = new double[n];
double[] v = new double[n];
double[] tmp = new double[n];
for (int i = 0; i < n; i++)
u[i] = 1.0;
// get available processor, then set up syn object
int nthread = Runtime.getRuntime ().availableProcessors ();
Approximate.barrier = new CyclicBarrier (nthread);
int chunk = n / nthread;
Approximate[] ap = new Approximate[nthread];
for (int i = 0; i < nthread; i++)
{
int r1 = i * chunk;
int r2 = (i < (nthread -1)) ? r1 + chunk : n;
ap[i] = new Approximate (u, v, tmp, r1, r2);
}
double vBv = 0, vv = 0;
for (int i = 0; i < nthread; i++)
{
try
{
ap[i].join ();
vBv += ap[i].m_vBv;
vv += ap[i].m_vv;
}
catch (Exception e)
{
e.printStackTrace ();
}
}
return Math.sqrt (vBv/vv);
}
private static class Approximate extends Thread
{
private static CyclicBarrier barrier;
private double[] _u;
private double[] _v;
private double[] _tmp;
private int range_begin, range_end;
private double m_vBv = 0, m_vv = 0;
public Approximate (double[] u, double[] v, double[] tmp, int rbegin, int rend)
{
super ();
_u = u;
_v = v;
_tmp = tmp;
range_begin = rbegin;
range_end = rend;
start ();
}
public void run ()
{
// 20 steps of the power method
for (int i = 0; i < 10; i++)
{
MultiplyAtAv (_u, _tmp, _v);
MultiplyAtAv (_v, _tmp, _u);
}
for (int i = range_begin; i < range_end; i++)
{
m_vBv += _u[i] * _v[i];
m_vv += _v[i] * _v[i];
}
}
/* return element i,j of infinite matrix A */
private final static double eval_A (int i, int j)
{
int div = ( ((i+j) * (i+j+1) >>> 1) +i+1 );
return 1.0 / div;
}
/* multiply vector v by matrix A, each thread evaluate its range only */
private final void MultiplyAv (final double[] v, double[] Av)
{
for (int i = range_begin; i < range_end; i++)
{
double sum = 0;
for (int j = 0; j < v.length; j++)
sum += eval_A (i, j) * v[j];
Av[i] = sum;
}
}
/* multiply vector v by matrix A transposed */
private final void MultiplyAtv (final double[] v, double[] Atv)
{
for (int i = range_begin; i < range_end; i++)
{
double sum = 0;
for (int j = 0; j < v.length; j++)
sum += eval_A (j, i) * v[j];
Atv[i] = sum;
}
}
/* multiply vector v by matrix A and then by matrix A transposed */
private final void MultiplyAtAv (final double[] v, double[] tmp, double[] AtAv)
{
try
{
MultiplyAv (v, tmp);
// all thread must syn at completion
barrier.await ();
MultiplyAtv (tmp, AtAv);
// all thread must syn at completion
barrier.await ();
}
catch (Exception e)
{
e.printStackTrace ();
}
}
}
}
@@ -1,128 +0,0 @@
package spectralnorm_kotlin
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.concurrent.CyclicBarrier;
val formatter = DecimalFormat ("#.000000000");
fun main (args : Array<String>) {
var n = 5500
if (args.size > 0)
n = Integer.parseInt (args[0]);
val millis = System.currentTimeMillis()
System.out?.println (formatter.format (spectralnormGame (n)) )
val total = System.currentTimeMillis() - millis;
System.out?.println("[SpectralNorm-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]");
}
fun spectralnormGame(n: Int) : Double {
val u = DoubleArray(n)
val v = DoubleArray(n)
val tmp = DoubleArray(n)
for(i in u.indices) {
u[i] = 1.0
}
val nthread = Runtime.getRuntime ()!!.availableProcessors ();
barrier = CyclicBarrier (nthread);
val chunk = n / nthread
val ap = Array<Approximate>(nthread,{
val r1 = it * chunk;
val r2 = if(it < (nthread -1)) r1 + chunk else nthread;
Approximate (u, v, tmp, r1, r2)
})
var vBv = 0.toDouble()
var vv = 0.toDouble();
for (i in 0..nthread-1) {
try {
ap[i].join ();
vBv += ap[i].m_vBv;
vv += ap[i].m_vv;
}
catch (e: Exception )
{
e.printStackTrace ();
}
}
return Math.sqrt (vBv/vv);
}
fun eval_A (i: Int, j: Int) = 1.0 / ( ((i+j) * (i+j+1) shr 1) +i+1 )
var barrier : CyclicBarrier? = null
class Approximate(val u: DoubleArray, val v: DoubleArray, val _tmp: DoubleArray, val rbegin: Int, val rend: Int) : Thread() {
class object {
}
var m_vBv = 0.0
var m_vv = 0.0
{
start()
}
override fun run () {
for(i in 0..10) {
MultiplyAtAv (u, _tmp, v);
MultiplyAtAv (v, _tmp, u);
}
for(i in rbegin..rend) {
m_vBv += u[i] * v[i];
m_vv += v[i] * v[i];
}
}
/* multiply vector v by matrix A, each thread evaluate its range only */
fun MultiplyAv (v: DoubleArray, Av: DoubleArray)
{
for (i in rbegin..rend)
{
var sum = 0.0;
for (j in v.indices)
sum += eval_A (i, j) * v[j];
Av[i] = sum;
}
}
/* multiply vector v by matrix A transposed */
fun MultiplyAtv (v: DoubleArray, Atv: DoubleArray)
{
for (i in rbegin..rend)
{
var sum = 0.toDouble()
for (j in v.indices)
sum += eval_A (j, i) * v[j];
Atv[i] = sum;
}
}
/* multiply vector v by matrix A and then by matrix A transposed */
fun MultiplyAtAv (v: DoubleArray, tmp: DoubleArray, AtAv: DoubleArray)
{
try
{
MultiplyAv (v, tmp);
// all thread must syn at completion
barrier?.await ();
MultiplyAtv (tmp, AtAv);
// all thread must syn at completion
barrier?.await ();
}
catch (e: Exception)
{
e.printStackTrace ();
}
}
}
@@ -1,141 +0,0 @@
package threadring;
/**
* The Computer Language Benchmarks Game
* http://shootout.alioth.debian.org/
*
* contributed by Fabien Le Floc'h
*
* Java implementation of thread-ring benchmark. Best performance is achieved with
* MAX_THREAD=1 as the thread-ring test is bested with only 1 os thread.
* This implementation shows using a simple thread pool solves the thread context
* switch issue.
*/
import java.util.concurrent.*;
public class ThreadRing {
private static final int MAX_NODES = 503;
private static final int MAX_THREADS = 503;
private ExecutorService executor;
private final int N;
static final CountDownLatch cdl = new CountDownLatch(1);
public static void main(String[] args) throws InterruptedException {
long start = System.currentTimeMillis();
int n = 5000000;
try {
n = Integer.parseInt(args[0]);
} catch (Exception e) {}
ThreadRing ring = new ThreadRing(n);
Node node = ring.start(MAX_NODES);
node.sendMessage(new TokenMessage(1,0));
cdl.await();
long total = System.currentTimeMillis() - start;
System.out.println("[ThreadRing-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]");
}
public ThreadRing(int n) {
N = n;
}
public Node start(int n) {
Node[] nodes = spawnNodes(n);
connectNodes(n, nodes);
return nodes[0];
}
private Node[] spawnNodes(int n) {
executor = Executors.newFixedThreadPool(MAX_THREADS);
Node[] nodes = new Node[n+1];
for (int i = 0; i < n ; i++) {
nodes[i] = new Node(i+1, null);
}
return nodes;
}
public void connectNodes(int n, Node[] nodes) {
nodes[n] = nodes[0];
for (int i=0; i<n; i++) {
nodes[i].connect(nodes[i+1]);
}
}
private static class TokenMessage {
private int nodeId;
private volatile int value;
private boolean isStop;
public TokenMessage(int nodeId, int value) {
this.nodeId = nodeId;
this.value = value;
}
public TokenMessage(int nodeId, int value, boolean isStop) {
this.nodeId = nodeId;
this.value = value;
this.isStop = isStop;
}
}
private class Node implements Runnable {
private int nodeId;
private Node nextNode;
private BlockingQueue<TokenMessage> queue = new LinkedBlockingQueue<TokenMessage>();
private boolean isActive = false;
private int counter;
public Node(int id, Node nextNode) {
this.nodeId = id;
this.nextNode = nextNode;
this.counter = 0;
}
public void connect(Node node) {
this.nextNode = node;
isActive = true;
}
public void sendMessage(TokenMessage m) {
queue.add(m);
executor.execute(this);
}
public void run() {
if (isActive) {
try {
TokenMessage m = queue.take();
if (m.isStop) {
int nextValue = m.value+1;
if (nextValue == MAX_NODES) {
// System.out.println("last one");
executor.shutdown();
cdl.countDown();
}
else {
m.value = nextValue;
nextNode.sendMessage(m);
}
isActive = false;
// System.out.println("ending node "+nodeId);
}
else {
if (m.value == N) {
System.out.println(nodeId);
nextNode.sendMessage(new TokenMessage(nodeId, 0, true));
}
else {
m.value = m.value + 1;
nextNode.sendMessage(m);
}
}
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
}
}
}
@@ -1,107 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package threadring_kotlin
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
val MAX_NODES = 503
val MAX_THREADS = 503
val cdl = CountDownLatch(1)
fun main(args: Array<String>) {
val start = System.currentTimeMillis()
var n = 5000000;
try {
n = Integer.parseInt(args[0]);
} catch (e: Throwable) {
}
val ring = ThreadRing(n)
ring.sendMessage(TokenMessage(1,0,false))
cdl.await();
val total = System.currentTimeMillis() - start
System.out?.println("[ThreadRing-" + System.getProperty("project.name")+ " Benchmark Result: " + total + "]")
}
class TokenMessage(val nodeId : Int, value: Int, val isStop: Boolean) : AtomicInteger(value)
class ThreadRing(val N: Int) {
val executor = Executors.newFixedThreadPool(MAX_THREADS)!!
val nodes : Array<Node> = Array<Node>(MAX_NODES+1, { (it : Int) -> Node(it+1) });
{
nodes[nodes.size-1] = nodes[0]
for (i in 0..nodes.size-2) {
nodes[i].connect(nodes[i+1]);
}
}
fun sendMessage(m : TokenMessage) {
nodes[0].sendMessage(m)
}
class Node(val nodeId : Int) : Runnable {
val queue = LinkedBlockingQueue<TokenMessage>()
var isActive = false
var nextNode : Node? = null
fun sendMessage(m: TokenMessage) {
queue.add(m)
executor.execute(this)
}
fun connect(next: Node) {
nextNode = next
isActive = true
}
override fun run() {
if(isActive) {
try {
val m = queue.take()
if(m.isStop) {
val nextValue = m.get()+1
if (nextValue == MAX_NODES) {
executor.shutdown()
cdl.countDown()
} else {
m.set(nextValue)
nextNode!!.sendMessage(m)
}
isActive = false
}
else {
if (m.get() == N) {
System.out?.println(nodeId);
nextNode!!.sendMessage(TokenMessage(nodeId, 0, true));
} else {
m.incrementAndGet()
nextNode!!.sendMessage(m);
}
}
}
catch(e: InterruptedException) {
e.printStackTrace()
}
}
}
}
}
-77
View File
@@ -1,77 +0,0 @@
class ArrayList<T> : IMutableList<T> {
private var data = MutableArray(10)
private var used = 0
private var version = 0
override fun iterator() : IIterator<T> = mutableIterator()
override fun mutableIterator() : IMutableIterator<T> = object IMutableIterator() { // T is inferred
private val index = 0
private var myVersion = version
private fun checkVersion() {
if (version != myVersion)
throw new ConcurrentModificationException()
}
override fun next() {
checkVersion()
if (hasNext)
throw new NoMoreElementsException()
data[index++]
}
override val hasNext
get() = index < used
override fun remove() {
checkVersion()
val result = ArrayList.this.remove(index - 1)
myVersion = version
result
}
}
override fun get(index : Int) {
checkIndex(index)
data[index]
}
private fun checkIndex(index : Int) {
if (index > used)
throw new IndexOutOfBoundsException(index)
}
override val isEmpty
get() = used == 0
override val size
get() = used
override fun set(index : Int, value : T) {
checkIndex(index)
var result = data[index]
data[index] = value
result
}
override fun add(index : Int, value : T) {
ensureSize(used + 1)
if (index == used) {
data[used++] = value
} else if (index < used) {
for (i in used-1..index) // backwards, special operator... Need to optimize this to be a real indexed loop
data[i + 1] = data[i]
data[index] = value
used++
} else throw IndexOutOfBoundsException(index)
}
override fun remove(index : Int) {
for (i in index..used-1)
data[i] = data[i + 1]
}
}
-58
View File
@@ -1,58 +0,0 @@
trait IEquality {
fun equals(other : Any) : Boolean
= (this as java.lang.Object).equals(other as java.lang.Object)
}
trait IHashable : IEquality {
val hashCode : Integer
get() = (this as java.lang.Object).hashCode()
}
trait IMap<K : IHashable, V> {
fun get(key : K) : V
fun set(key : K, value : V) : V
fun remove(key : K) : V
fun containsKey(key : K) : Boolean
}
class HashableWrapper wraps (val obj : Any) : IHashable
// equals and hashCode implementations are inherited
[inline] fun Any.hashable() : HashableWrapper = new HashableWrapper(this)
trait IHashingStrategy<K : IHashable> {
fun equals(a : K, b : K) : Boolean
fun hashCode(a : K) : Integer
}
class DefaultHashingStrategy<in K : IHashable> : IHashingStrategy<K> {
override fun equals(a : K, b : K) : Boolean = a.equals(b)
override fun hashCode(a : K) : Integer = a.hashCode
}
class JavaObjectHashingStrategy<K> : IHashingStrategy<K> {
override fun equals(a : K, b : K) : Boolean
= a.hashable().equals(b)
override fun hashCode(a : K) : Integer
= a.hashable().hashCode
}
class HashMap<K, V> : IMap<K, V> {
private [inline] fun hashCode(a : K) = a.hashable().hashCode
private [inline] fun equals(a : K, b : K) = a.hashable() == b
// everything else uses these equals() and hashCode()...
}
class StrategyHashMap<K, V>(hashingStrategy : IHashingStrategy<K>) : IMap<K, V> {
// where !(K : IHashable)
this() : this(new JavaObjectHashingStrategy<K>()) {}
this() where (K : IHashable) : this(new DefaultHashingStrategy<K>()) {}
//...
}
-9
View File
@@ -1,9 +0,0 @@
package jet.collections.iterable
import jet.collections.iterator.IIterator
trait IIterable<out T> {
fun iterator() : IIterator<T>
inline fun foreach(operation: fun(element: T) : Unit) = iterator() foreach operation
}
-3
View File
@@ -1,3 +0,0 @@
trait IList<out T> : IIterable<T>, ISized {
fun get(index : Int) : T
}
@@ -1,3 +0,0 @@
open class IMutableIterable<out T> : IIterable<T> {
fun mutableIterator() : IMutableIterator<T>
}
@@ -1,13 +0,0 @@
open class IMutableIterator<out T> : IIterator<T> {
fun remove() : T
/*
Considerations:
pro: why not + non iteration breaking
con: counter-intuitive for, e.g., TreeSet
fun addBefore(item : T) : Boolean
fun addAfter(item : T) : Boolean
*/
}
@@ -1,6 +0,0 @@
open class IMutableList<T> : IList<T>, IMutableIterable<T> {
fun set(index : Int, value : T) : T
fun add(index : Int, value : T)
fun remove(index : Int) : T
fun mutableIterator() : IMutableIterator<T>
}
@@ -1,4 +0,0 @@
open class IMutableSet<T> : ISet<T>, IMutableIterable<T> {
fun add(item : T) : Boolean
fun remove(item : T) : Boolean
}
-8
View File
@@ -1,8 +0,0 @@
package jet.collections.set
import jet.collections.sized.ISized
import jet.collections.iterable.IIterable
trait ISet<T> : IIterable<T>, ISized {
fun contains(item : T) : Boolean
}
-11
View File
@@ -1,11 +0,0 @@
package jet.collections.sized
trait ISized {
val size : Int
val isEmpty : Boolean
get() = size == 0
val isNonEmpty : Boolean
get() = size != 0
}
-170
View File
@@ -1,170 +0,0 @@
package jet.collections
import java.util.NoSuchElementException
trait Iterator<out T> {
fun next() : T
val hasNext : Boolean
fun <R> map(transform: fun(element: T) : R) : Iterator<R> =
object : Iterator<R> {
override fun next() : R = transform(this@map.next())
override val hasNext : Boolean
get() = this@map.hasNext
}
}
trait ISized {
val size : Int
}
val ISized.isEmpty : Boolean
get() = size == 0
val ISized.isNonEmpty : Boolean
get() = size != 0
trait ISet<T> : Iterable<T>, ISized {
fun contains(item : T) : Boolean
}
trait IList<out T> : Iterable<T>, ISized {
fun get(index : Int) : T
fun iterator() : Iterator<T> =
object Iterator<T> {
var index = 0
override fun next() : T = get(index++)
override val hasNext : Boolean
get() = index < size
}
fun toArray() : Array<T> = Array<T>(size) { index => get(index) }
}
fun <T> Array<T>.asList() : IList<T> = object IList<T> {
override val size
get() = this@Array.size
override fun get(index: Int) = this@asList[index]
}
fun <T> Iterator<T>.foreach(operation: fun(element: T) : Unit) : Unit = while(hasNext) operation(next())
fun <T> Iterator<T>.foreach(operation: fun(index: Int, element: T) : Unit) : Unit {
var k = 0
while(hasNext)
operation(k++, next())
}
fun <T> Iterable<T>.foreach(operation: fun(element: T) : Unit) : Unit = iterator() foreach operation
fun <T> Iterable<T>.foreach(operation: fun(index: Int, element: T) : Unit) : Unit = iterator() foreach operation
fun <T,R> Iterable<T>.foldLeft(init: R, operation: fun(accumulated: R, element: T) : R) : R =
iterator () foreach operation
fun <T,R> Iterable<T>.foldLeft(init: R, operation: fun(accumulated: R, index: Int, element: T) : R) : R =
iterator () foreach operation
fun <T,R> Iterator<T>.foldLeft(init: R, operation: fun(accumulated: R, element: T) : R) : R {
while(hasNext)
init = operation(init, next())
return init
}
fun <T,R> Iterator<T>.foldLeft(init: R, operation: fun(accumulated: R, index: Int, element: T) : R) : R {
var k = 0
while(hasNext)
init = operation(init, k++, next())
return init
}
fun <T,R> Iterator<T>.map(transform: fun(element: T) : R) : Iterator<R> =
object : Iterator<R> {
override fun next() : R = transform(this@map.next())
override val hasNext : Boolean
get() = this@map.hasNext
}
fun <T,R> Iterator<T>.map(transform: fun(index: Int, element: T) : R) : Iterator<R> {
return object : Iterator<R> {
var index = 0
override fun next() : R = transform(index++, this@map.next())
override val hasNext : Boolean
get() = this@map.hasNext
}
}
fun <T> Iterator<T>.plus(other: Iterator<T>) : Iterator<T> =
object : Iterator<T> {
override fun next() : T = if(this@plus.hasNext) this@plus.next() else other.next()
override val hasNext : Boolean
get() = this@plus.hasNext || other.hasNext
}
fun <T> Iterator<T>.filter(condition: fun(element: T) : Boolean) : Iterator<T> {
return object : Iterator<T> {
private var _next : T = null
private var _lookedAhead : Boolean = false
private var _hasNext : Boolean = false
private fun lookAhead() : Boolean {
if(!_lookedAhead) {
_lookedAhead = true
while(this@filter.hasNext) {
_next = this@filter.next()
if(condition(_next)) {
_hasNext = true
return true
}
}
}
return _hasNext
}
override fun next() : T {
lookAhead()
_lookedAhead = false
if(_hasNext) {
val res = _next
_next = null
_hasNext = false
return res
}
throw NoSuchElementException()
}
override val hasNext : Boolean
get() = lookAhead()
}
}
/*
fun toArray(buffer : MutableArray<in T>) : Int { // T is still an in-parameter
return fillBuffer(buffer, 0, buffer.size)
}
fun toArray(buffer : MutableArray<in T>, from : Int, length : Int) : Int { // T is still an in-parameter
if (from < 0 || from > buffer.lastIndex || length < 0 || length > buffer.size - from) {
throw IndexOutOfBoundsException();
}
if (len == 0) return 0
var count = 0;
for (i in from .. from + length - 1) {
if (!hasNext)
return count
buffer[i] = next()
count++
}
return count
}
*/
-73
View File
@@ -1,73 +0,0 @@
class LinkedList<T> : IMutableList<T> {
private class Item(var value : Item) {
var next : Item
var previous : Item
}
private var head : Item = null
private var tail : Item = null
override var size get private set
override fun add(index : Int, value : T) {
size++
checkIndex(index)
val newItem = Item(value)
if (index == 0) {
newItem.next = head
head = newItem
if (tail === null) {
tail = head
}
} else {
var insertAfter = itemAt(index)
newItem.next = insertAfter.next
insertAfter.next = newItem
if (tail === insertAfter) {
tail = newItem
}
}
}
private fun checkIndex(index : Int) {
if (index !in 0..size-1) {
throw IndexOutOfBoundsException(index)
}
}
override fun remove(index : Int) : T {
checkIndex(index)
val item = itemAt(index)
if (item === head) {
head = item.next
if (head === null)
tail= null
} else {
item.previous.next = item.next
if (item.next === null) {
item.next.previous = item.previous
} else {
tail = tail.previous
}
}
size--
return item.value
}
override fun set(index : Int, value : T) : T {
checkIndex(index)
val item = itemAt(index)
val result = item.value
item.value = value
return result
}
private fun itemAt(index : Int) {
var result = head
for (i in 1..index) {
result = result.next
}
return result
}
override fun mutableIterator() : IMutableIterator<T>
}
-27
View File
@@ -1,27 +0,0 @@
enum class List<out T>(theSize : Int) : IList<T> {
Nil : List<Nothing>(0)
Cons<T>(val value : T, val tail : List<T>) : List<T>(1 + tail.size)
override val size : Int
get() = theSize
override val isEmpty : Boolean
get() = this == Nil
override fun iterator() = new IIterator() {
private var current = List.this
override val hasNext {
get() = current == Nil
}
override fun next() {
val result = current.value
current = current.tail
return result
}
}
}
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="com.google.inject:guice:3.0" level="project" />
<orderEntry type="library" name="KotlinRuntime" level="project" />
</component>
</module>
-192
View File
@@ -1,192 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
<entry name="?*.html" />
<entry name="?*.dtd" />
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true" />
</component>
<component name="CopyrightManager" default="">
<module2copyright />
</component>
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/guice-kotlin.iml" filepath="$PROJECT_DIR$/guice-kotlin.iml" />
</modules>
</component>
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
<component name="libraryTable">
<library name="com.google.inject:guice:3.0" type="repository">
<properties maven-id="com.google.inject:guice:3.0" />
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/guice-3.0.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javax.inject-1.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/aopalliance-1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javax.inject-1-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/aopalliance-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="KotlinRuntime">
<CLASSES>
<root url="jar://$PROJECT_DIR$/../../../dist/kotlinc/lib/kotlin-runtime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
</project>
-798
View File
@@ -1,798 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ab4d6268-8fd6-4b97-ae8b-3723b92e284e" name="Default" comment="" />
<ignored path="guice-kotlin.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="DebuggerManager">
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<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>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<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_any>
<breakpoint_rules />
<ui_properties />
</component>
<component name="FavoritesManager">
<favorites_list name="guice-kotlin" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="GuiceDsl.kt" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/GuiceDsl.kt">
<provider selected="true" editor-type-id="text-editor">
<state line="47" column="0" selection-start="1520" selection-end="1520" vertical-scroll-proportion="0.6625">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="LinkedBindingBuilder.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/binder/LinkedBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="50" column="0" selection-start="1509" selection-end="1509" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="BindingBuilder.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/BindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="129" column="53" selection-start="4384" selection-end="4384" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="InjectionPoint.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/spi/InjectionPoint.java">
<provider selected="true" editor-type-id="text-editor">
<state line="374" column="30" selection-start="14896" selection-end="14896" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ScopedBindingBuilder.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/binder/ScopedBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="31" column="0" selection-start="936" selection-end="936" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="AbstractBindingBuilder.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/AbstractBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="88" column="34" selection-start="3438" selection-end="3438" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="BindingImpl.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/BindingImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state line="99" column="0" selection-start="2736" selection-end="2736" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ProviderInstanceBindingImpl.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/ProviderInstanceBindingImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state line="79" column="24" selection-start="3009" selection-end="3009" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="GuiceExample.kt" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/GuiceExample.kt">
<provider selected="true" editor-type-id="text-editor">
<state line="31" column="50" selection-start="860" selection-end="860" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Injector.java" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/Injector.java">
<provider selected="true" editor-type-id="text-editor">
<state line="148" column="0" selection-start="6054" selection-end="6054" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/src/Guice.kt" />
<option value="$PROJECT_DIR$/src/GuiceExample.java" />
<option value="$PROJECT_DIR$/src/org/jetbrains/kotlin/examples/guice/kotlin/GuiceExample.kt" />
<option value="$PROJECT_DIR$/src/GuiceExample.kt" />
<option value="$PROJECT_DIR$/src/GuiceDsl.kt" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="32" />
<option name="width" value="1429" />
<option name="height" value="790" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectStructureProblems">
<ignored-problems>
<problem id="library-invalid-classes-path(library:project:KotlinRuntime)" />
</ignored-problems>
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages ProjectPane="false" />
<abbreviatePackageNames />
<autoscrollToSource ProjectPane="true" />
<autoscrollFromSource ProjectPane="false" />
<sortByType />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="External Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<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>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<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="GuiceDsl.kt" />
<option name="myItemType" value="org.jetbrains.jet.plugin.projectView.JetFileTreeNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope">
<subPane subId="Project Files">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="PackagesPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="guice-kotlin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="project.structure.last.edited" value="Libraries" />
<property name="project.structure.proportion" value="0.15" />
<property name="options.splitter.main.proportions" value="0.3" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="recentsLimit" value="5" />
<property name="MemberChooser.sorted" value="false" />
<property name="options.lastSelected" value="preferences.pluginManager" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="MemberChooser.copyJavadoc" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="Repository.Attach.Sources" value="true" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="options.searchVisible" value="true" />
<property name="options.splitter.details.proportions" value="0.2" />
<property name="Downloaded.Files.Path" value="$PROJECT_DIR$/lib" />
<property name="dynamic.classpath" value="false" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src" />
<recent name="$PROJECT_DIR$/src/org/jetbrains/kotlinn/examples/guice/kotlin" />
<recent name="$PROJECT_DIR$/src/kotlin" />
</key>
</component>
<component name="RunManager" selected="Kotlin.org.jetbrains.kotlin.examples.guice">
<configuration default="false" name="namespace" type="JetRunConfigurationType" factoryName="Kotlin" temporary="true">
<option name="MAIN_CLASS_NAME" value="namespace" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="guice-kotlin" />
<envs />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
<configuration default="false" name="org.jetbrains.kotlin.examples.guice" type="JetRunConfigurationType" factoryName="Kotlin" temporary="true">
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.examples.guice.namespace" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="guice-kotlin" />
<envs />
<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>
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
<option name="PROGRAM_PARAMETERS" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="guice-kotlin" />
<envs />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="Kotlin.namespace" />
<item index="1" class="java.lang.String" itemvalue="Kotlin.org.jetbrains.kotlin.examples.guice" />
</list>
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration" maxAnnotateRevisions="500">
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="mySSHConnectionTimeout" value="30000" />
<option name="mySSHReadTimeout" value="30000" />
<option name="LAST_MERGED_REVISION" />
<option name="MERGE_DRY_RUN" value="false" />
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
<option name="DETECT_NESTED_COPIES" value="true" />
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
<option name="FORCE_UPDATE" value="false" />
<configuration useDefault="false">$USER_HOME$/.subversion_IDEA</configuration>
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ab4d6268-8fd6-4b97-ae8b-3723b92e284e" name="Default" comment="" />
<created>1328297603532</created>
<updated>1328297603532</updated>
</task>
<servers />
</component>
<component name="TodoView" selected-index="0">
<todo-panel id="selected-file">
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="default-changelist">
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="0" y="32" width="1429" height="790" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39886847" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32956153" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Kotlin" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32884902" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32956153" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24909486" sideWeight="0.671151" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3281471" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32956153" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="CodeWindow" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39985326" sideWeight="0.6718529" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="ResolveWindow" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.37655678" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="CHECK_NEW_TODO" value="true" />
<option name="myTodoPanelSettings">
<value>
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</value>
</option>
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
<option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
<option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="LAST_COMMIT_MESSAGE" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ACTIVE_VCS_NAME" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<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" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/Stage.java">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="12" selection-start="720" selection-end="720" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/Scope.java">
<provider selected="true" editor-type-id="text-editor">
<state line="16" column="0" selection-start="597" selection-end="597" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/Scoping.java">
<provider selected="true" editor-type-id="text-editor">
<state line="32" column="0" selection-start="1182" selection-end="1182" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/binder/AnnotatedBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="25" column="63" selection-start="850" selection-end="850" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/Provider.java">
<provider selected="true" editor-type-id="text-editor">
<state line="44" column="17" selection-start="1946" selection-end="1946" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/Binder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="243" column="14" selection-start="11110" selection-end="11110" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/binder/LinkedBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="50" column="0" selection-start="1509" selection-end="1509" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/BindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="129" column="53" selection-start="4384" selection-end="4384" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/spi/InjectionPoint.java">
<provider selected="true" editor-type-id="text-editor">
<state line="374" column="30" selection-start="14896" selection-end="14896" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/binder/ScopedBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="31" column="0" selection-start="936" selection-end="936" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/AbstractBindingBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state line="88" column="34" selection-start="3438" selection-end="3438" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/BindingImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state line="99" column="0" selection-start="2736" selection-end="2736" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/internal/ProviderInstanceBindingImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state line="79" column="24" selection-start="3009" selection-end="3009" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/guice-3.0-sources.jar!/com/google/inject/Injector.java">
<provider selected="true" editor-type-id="text-editor">
<state line="148" column="0" selection-start="6054" selection-end="6054" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/GuiceExample.kt">
<provider selected="true" editor-type-id="text-editor">
<state line="31" column="50" selection-start="860" selection-end="860" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/GuiceDsl.kt">
<provider selected="true" editor-type-id="text-editor">
<state line="47" column="0" selection-start="1520" selection-end="1520" vertical-scroll-proportion="0.6625">
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>Detection</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.6</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>guice-kotlin</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.6</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>com.google.inject:guice:3.0</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More