~saiko/intellij-settings

intellij-settings/toStringTemplates.xml -rw-r--r-- 1.3 KiB
92ebebf5 — Marco Rebhan CL-2021.1 <saiko@invader Update ide-features-trainer.xml, debugger.xml Create pluginAdvertiser.xml, pyWelcome.xml 12 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
<application>
  <component name="ToStringTemplates">
    <option name="defaultTempalteName" value="Rust-like" />
    <option name="templates">
      <list>
        <TemplateResource>
          <option name="fileName" value="Rust-like" />
          <option name="template" value="public java.lang.String toString() {&#10;#if ( $members.size() &gt; 0 )&#10;#set ( $i = 0 )&#10;    return String.format(&quot;$classname { ##&#10;#foreach( $member in $members )&#10;#if ( $i != 0 )&#10;, ##&#10;#end&#10;#if ( $member.string )&#10;$member.name: '%s'##&#10;#else&#10;$member.name: %s##&#10;#end&#10;#set ( $i = $i + 1 )&#10;#end&#10; }&quot;, ##&#10;#set ( $i = 0 )&#10;#foreach( $member in $members )&#10;#if ( $i != 0 )&#10;, ##&#10;#end&#10;#if ( $member.objectArray )&#10;#if ($java_version &lt; 5)&#10;    $member.accessor == null ? null : java.util.Arrays.asList($member.accessor)##&#10;#else&#10;    java.util.Arrays.toString($member.accessor) ##&#10;#end&#10;#elseif ( $member.primitiveArray &amp;&amp; $java_version &gt;= 5)&#10;    java.util.Arrays.toString($member.accessor) ##&#10;#else&#10;    $member.accessor ##&#10;#end&#10;#set ( $i = $i + 1 )&#10;#end&#10;    );&#10;#else&#10;    return &quot;$classname&quot;;&#10;#end&#10;}" />
        </TemplateResource>
      </list>
    </option>
  </component>
</application>