STS3.9.6(eclipse4.9)設定メモ

以前、すでに閉鎖されているあるブログで紹介されていたEclipseの設定を、覚書として記録しておきます。

インストール

Plugins

  1. Help → Install new software
    1. Work with: 2018-09 –
      http://download.eclipse.org/release/2018-09

      1. Collaboration
        1. Git integration for Eclipse
        2. Mylyn Builds Connector: Hudson/Jenkins

        3. Mylyn Versions Connector: Git

      2. Web, XML, Java EE and OSGi Enterprise Development

        1. m2e-wtp – JPA configureator for WTP(Optional)
    2. Work with: http://findbugs.cs.umd.edu/eclipse
      1. FindBugs
        1. FindBugs Feature
    3. Work with: http://update.eclemma.org/
      1. EclEmma
        1. EclEmma Java Code Coverage
    4. Work with: http://fabioz.github.io/startexplorer/update/
      1. StartExplorer
        1. StartExplorer
  2. Help → Eclipse Marketplace
    1. AnyEdit Toolsを検索してインストール

一般設定

  1. Window→Preferinces
  2. General

    1. Always run in background ⇒ true
  3. General → Editors
    1. Allow in-place system editors ⇒ false
  4. General → Editors → AnyEdit Tools

  5. General → Editors → Text Edtors

    1. Insert spaces for tabs ⇒ true
    2. Show print margin ⇒ true

    3. Show line numbers ⇒ true

    4. Show whitespace characters ⇒ true
      ⇒ configure visibility

  6. General → Editors → Text Editors → Spelling
    ⇒ Enable spell checking ⇒ false

  7. General → Editors → Structured Text Editors → Task Tags
    ⇒ Enable searching for Task Tags ⇒ true

  8. General → Workspace
    ⇒ Text file encoding ⇒ UTF-8
    ⇒ New text file line delimiter ⇒ Other: Unix

  9. General → Startup and Shutdown
    ⇒ Confirm exit when closing last window ⇒ false

  10. General → Startup and Shutdown → Workspace
    ⇒ Prompt for workspace on startup ⇒ false

  11. General → Appearance → Label Decorations
    ⇒ Java Type Indicator ⇒ true

  12. General → Appearance → Colors and Fonts
    ⇒ Basic → Text Font ⇒ Migu 1M 10

JAVA

  1. JAVA → FindBugs

    1. 報告する最小ランク: 1
    2. レポートする最小の優先度: Low

    3. Bad practice ⇒ true

    4. Internationalization ⇒ true

    5. Security ⇒ true

  2. JAVA → Editor → Content Assist → Favorites

    1. New Type
      1. org.hamcrest.CoreMatchers
      2. org.mockito.Matchers

      3. org.mockito.Mockito

    2. New Member

      1. org.junit.Assert.assertThat
  3. Java → Editor → Folding
    1. Comments ⇒ true
  4. Java → Editor → Typing
    1. Semicolons ⇒ true
    2. Braces ⇒ true

    3. Escape text when parsting into a string literal ⇒ true

  5. Java → Editor → Save Actions

    1. Perform the selected actions on save ⇒ true
    2. Additonal actions ⇒ true

    3. Configure

      1. Code Style
        1. Use modifier ‘final’ where possible ⇒ false
      2. Code Organizing
        1. Remove trailing whitespace ⇒ true
          ⇒ All lines ⇒ check
      3. Unnecessary Code
        1. Unused code
          Remove unused imports ⇒ true

        2. Unnecessary code
          Remove unnecessary casts = true
          Remove unnecessary ‘$NON-NLS’ tags ⇒ true

      4. Missing Code

        1. Add missing Annotations ⇒ true
          ‘@Override’ ⇒ true
          ‘@Deprecated’⇒ true
  6. Java → Code Coverage
    1. Remove coverage sessions for removed lanches ⇒ true
  7. Java → Code Style → Code Templates
    Comments

    1. Files
      /*
      * Copyright ${year} by (User Name), All rights reserved.
      */

    2. Types
      /**
      * .
      *
      *
      * @author ${user}
      * @varsion 0.0.1, ${date}
      * @synce 0.0.1
      */

    3. Fields
      /** . */

    4. Constructors
      /**
      * の新しいインスタンスを生成
      *
      * ${tags}
      * @since 0.0.1
      */

    5. Methods
      /**
      * .
      *
      * ${tags}
      * @since 0.0.1
      */

    6. Overriding methods
      /**
      * {@inheritDoc}
      * @since 0.0.1
      * ${see_to_overridden}
      */

    7. Delegate methods
      /**
      * へ処理を移譲
      *
      * ${tags}
      * @since 0.0.1
      * ${see_to_target}
      */

    8. Getters
      /**
      * を取得します。
      *
      * @return ${bare_field_name}
      * @since 0.0.1
      */

    9. Setters
      /**
      * @param ${param} セットする ${bare_field_name}
      * @since 0.0.1
      */

  8. Java → Code Style → Formatter
    ⇒ Active profile: Eclipse [built-in] ⇒ new

    1. Indentiation
      1. Tab policy: Spaces Only
      2. Indentation size: 4

      3. Tab size : 4

      4. Indented elements

        1. Statements within ‘switch’ body ⇒ true
          1. Statements within ‘case’ body ⇒ true
          2. ‘break’ statements ⇒ true

  9. Java → Compiler → Javadoc

  10. Java → Compiler → Errors/Warnings

    1. Code style

    2. Potential programming problems

    3. Name shadowing and conflicts

    4. Unnecessary code

    5. Generic types

    6. Annotations

    7. Null analysis

    8. Other

  11. Java → Build Path

    1. Folders
      1. Source Folder name: /src/main/java

      2. Output folder name: target/classes

その他

Maven

  1. Maven

    1. Download Artifact Javadoc ⇒ true
  2. Maven → User Interface
    1. Open XML page in the POM editor by default ⇒ true

WEB/CSSファイル

  1. Web → CSS Files → Editor

    1. Indent using spaces ⇒ true
    2. Indentation size: 4

Web/HTMLファイル

  1. Web → HTML Files → Editor

    1. Indent using spaces ⇒ true
    2. Indentation size: 2

Web/JSPファイル

  1. Web → JSP Files

    1. Encoding: ISO10646/Unicode(UTF-8)

XML

  1. XML → XML Files → Editor

    1. Indent using spaces: on
    2. Indentation size: 4

自動更新

  1. Insall/Update → Automatic Updates

    1. Update schedule
      ⇒ Look for updates each time Spring Tool Suite is started ⇒ on

チーム

  1. Team

    1. Show all synchronization information in a resource’s text label
      ⇒ true

    2. Show the file author in compare editors ⇒ true

  2. Team → Git

    1. Default repository folder: 必要に応じて