Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code Style settings: Type Annotations
- Loading branch information
1 parent
391174b
commit 85a2fae
Showing
6 changed files
with
440 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/org/jetbrains/plugins/scala/lang/formatting/settings/TypeAnnotationPolicy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,21 @@ | |||
package org.jetbrains.plugins.scala.lang.formatting.settings; | |||
|
|||
/** | |||
* Pavel Fatin | |||
*/ | |||
public enum TypeAnnotationPolicy { | |||
Optional("Optional"), | |||
Regular("As Usual"); | |||
|
|||
private String myDescription; | |||
|
|||
private TypeAnnotationPolicy(String description) { | |||
myDescription = description; | |||
} | |||
|
|||
|
|||
@Override | |||
public String toString() { | |||
return myDescription; | |||
} | |||
} |
22 changes: 22 additions & 0 deletions
22
src/org/jetbrains/plugins/scala/lang/formatting/settings/TypeAnnotationRequirement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
package org.jetbrains.plugins.scala.lang.formatting.settings; | |||
|
|||
/** | |||
* Pavel Fatin | |||
*/ | |||
public enum TypeAnnotationRequirement { | |||
Optional("Optional"), | |||
Preferred("Add"), | |||
Required("Add & Check"); | |||
|
|||
private String myDescription; | |||
|
|||
private TypeAnnotationRequirement(String description) { | |||
myDescription = description; | |||
} | |||
|
|||
|
|||
@Override | |||
public String toString() { | |||
return myDescription; | |||
} | |||
} |
239 changes: 239 additions & 0 deletions
239
src/org/jetbrains/plugins/scala/lang/formatting/settings/TypeAnnotationsPanel.form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,239 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.plugins.scala.lang.formatting.settings.TypeAnnotationsPanel"> | |||
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="16" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | |||
<margin top="0" left="0" bottom="0" right="0"/> | |||
<constraints> | |||
<xy x="20" y="20" width="500" height="524"/> | |||
</constraints> | |||
<properties/> | |||
<border type="none"/> | |||
<children> | |||
<vspacer id="fd78d"> | |||
<constraints> | |||
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
</vspacer> | |||
<hspacer id="6daaa"> | |||
<constraints> | |||
<grid row="15" column="3" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
</hspacer> | |||
<component id="70647" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Value"/> | |||
</properties> | |||
</component> | |||
<component id="7c086" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Method"/> | |||
</properties> | |||
</component> | |||
<component id="13a50" class="com.intellij.ui.TitledSeparator"> | |||
<constraints> | |||
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Instance Type Annotations"/> | |||
</properties> | |||
</component> | |||
<component id="31556" class="javax.swing.JComboBox" binding="myPublicPropertyComboBox"> | |||
<constraints> | |||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="b0417" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Public:"/> | |||
</properties> | |||
</component> | |||
<component id="f77a5" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Protected:"/> | |||
</properties> | |||
</component> | |||
<component id="db8b7" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Private:"/> | |||
</properties> | |||
</component> | |||
<component id="8752f" class="javax.swing.JComboBox" binding="myProtectedPropertyComboBox"> | |||
<constraints> | |||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="85dfa" class="javax.swing.JComboBox" binding="myPrivatePropertyComboBox"> | |||
<constraints> | |||
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="8ccc6" class="javax.swing.JComboBox" binding="myPublicMethodComboBox"> | |||
<constraints> | |||
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="102d7" class="javax.swing.JComboBox" binding="myProtectedMethodComboBox"> | |||
<constraints> | |||
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="f448" class="javax.swing.JComboBox" binding="myPrivateMethodComboBox"> | |||
<constraints> | |||
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="bf5b6" class="com.intellij.ui.TitledSeparator"> | |||
<constraints> | |||
<grid row="10" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Special Cases"/> | |||
</properties> | |||
</component> | |||
<component id="38181" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="11" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Value"/> | |||
</properties> | |||
</component> | |||
<component id="9c42f" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="11" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Method"/> | |||
</properties> | |||
</component> | |||
<component id="2e4ee" class="javax.swing.JComboBox" binding="myOverridingPropertyComboBox"> | |||
<constraints> | |||
<grid row="12" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="7630a" class="javax.swing.JComboBox" binding="myOverridingMethodComboBox"> | |||
<constraints> | |||
<grid row="12" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="f2818" class="com.intellij.ui.TitledSeparator"> | |||
<constraints> | |||
<grid row="6" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Local Type Annotations"/> | |||
</properties> | |||
</component> | |||
<component id="351bb" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Value"/> | |||
</properties> | |||
</component> | |||
<component id="3dfdd" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="7" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Method"/> | |||
</properties> | |||
</component> | |||
<component id="808ae" class="javax.swing.JComboBox" binding="myLocalPropertyComboBox"> | |||
<constraints> | |||
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="24c60" class="javax.swing.JComboBox" binding="myLocalMethodComboBox"> | |||
<constraints> | |||
<grid row="8" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="afe8a" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="12" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Overriding:"/> | |||
</properties> | |||
</component> | |||
<component id="39dac" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Local:"/> | |||
</properties> | |||
</component> | |||
<component id="7177f" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="13" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="Simple:"/> | |||
</properties> | |||
</component> | |||
<component id="b18a9" class="javax.swing.JComboBox" binding="mySimplePropertyComboBox"> | |||
<constraints> | |||
<grid row="13" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="663c0" class="javax.swing.JComboBox" binding="mySimpleMethodComboBox"> | |||
<constraints> | |||
<grid row="13" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties/> | |||
</component> | |||
<component id="21c5b" class="javax.swing.JLabel"> | |||
<constraints> | |||
<grid row="14" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> | |||
</constraints> | |||
<properties> | |||
<text value="<html><body> <br> <strong>Legend:</strong> <ul> <li>Add - insert in generated code.</li> <li>Check - warn when not present.</li> </ul> </body></html>"/> | |||
</properties> | |||
</component> | |||
<vspacer id="c77b8"> | |||
<constraints> | |||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="1" anchor="1" fill="0" indent="0" use-parent-layout="false"> | |||
<minimum-size width="-1" height="10"/> | |||
<maximum-size width="-1" height="10"/> | |||
</grid> | |||
</constraints> | |||
</vspacer> | |||
<vspacer id="c3afc"> | |||
<constraints> | |||
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="1" anchor="1" fill="0" indent="0" use-parent-layout="false"> | |||
<minimum-size width="-1" height="10"/> | |||
<maximum-size width="-1" height="10"/> | |||
</grid> | |||
</constraints> | |||
</vspacer> | |||
</children> | |||
</grid> | |||
</form> |
Oops, something went wrong.