覚書です。

 

 

Spring Tool Suite 4.4.2 設定メモ

Spring.io より

以前に作成した設定に関する覚書を、現在のバージョンに合わせたものです。

Eclipse 4.13 をベースにした、Spring Tool Suite 4.4.2 の設定に関するメモになります。

プラグインのインストール

 

更新サイトからインストール

Install new software

Help → Install new software

 

Eclipse Update Site (2019-09)

Work with: → 2019-09-http://download.eclipse.org/release/2019-09

CollaborationWeb, XML, Java EE and OSGi Enterprise Development から次の4点を選択してインストール。

  • Collaboration
    • Git integration with - Task focused interface
    • Mylyn Builds Connector: Hudson/Jenkins
    • Mylyn Versions Connector: Git
  • Web, XML, Java EE and OSGi Enterprise Development
    • m2e-wtp - JPA configurator for WTP (Optional)

 

FindBugs

FindBugs をインストール。

Work with: → http://findbugs.cs.umd.edu/eclipse

  • FindBugs Feature

 

EclEmma

テストのカバレッジ計測プラグインをインストール。

Work with: → http://update.eclemma.org

  • EclEmma Java Code Covarage

 

StartExplore

「Explorerで開く」を追加するプラグイン。

Work with: → http://fabioz.github.io/startexplorer/update/

  • StartExplorer Feature

 

AnyEdit Tools

AnyEdit Tools をインストール。

AnyEdit Tools

Help → Eclipse Marketplace

  • AnyEdit Tools を検索してインストール。

 

全般の設定

Window → Preferences で設定画面を開く。

 

General

一般設定。

General

  • Always run in background. → True

 

Appearance → Colors and Fonts

外観 → 色とフォント

General / Appearance / Colors and Fonts

  • Basic → Text Font
    Migu 1M 10

 

Appearance → Label Decorations

外観 → ラベル装飾

General / Appearance / Label Decorations

  • Java Type indicator → True

 

Editors

全般的なエディタ設定。

General / Editors

  • Allow in-place system editors. → False
AnyEdit Tools

General / Editors / AnyEdit Tools

  • Remove trailing whitespace → true
  • Fix line delimiters(CRLF to LF) → True
  • Convert tabs < - > spaces
    • Tabs to spaces → True
Structured Text Editor → Task Tags

タスクタグを有効にする。

  • Enable searching for Task Tags → True
Text Editors

General / Editors / Text Editors

  • Insert spaces for tabs → True
  • Show printmargin → True
  • Show whitespace characters → True
    • configure visibility 下の図のように設定。

Show Whitespace Characters

Text Editors → Spelling

スペルチェックを無効にする。

  • Enable spell checking → False

 

Startup and Shutdown

General / Editors / Startup and Shutdown

  • Confirm exit when closing last window → True

 

Startup and Shutdown → Workspaces

General / Startup and Shutdown / Workspaces

  • Prompt for workspace on startup → False

 

Workspace

General / Workspace

  • Text file encoding
    → Other → UTF-8
  • New text file line delimiter
    → Other → Unix

 

Inatall / Update

 

Automatic Updates

General / Install/Update / Automatic Updates

  • Update schedule
    • Look for updates each time Spring Tool Suite 4 is started → True

 

Java

 

Build Path

Java / Build Path

  • Source folder name:/src/main/java
  • Output folder name:target/classes
Build Path → Classpath Variables

Java / Build Path / Classpath Variables

  • 必要な環境変数 (TOMCAT_HOME など) をこちらに登録しておく。

 

Code Coverage

Java / Code Coverage

  • Remove Coverage sessions for removed launches → True

 

Code Style

Code Templates
Comments

コメントのコードテンプレートを変更する。

Java / Code Style / Code Templates

  • Files
/*
 * Copyright ${year} by (User Name), All rights reserved.
 */
  • Types
/**
 * .
 *
 * @author ${user}
 * @version 0.0.1, ${date}
 * @since 0.0.1
 *
 * ${tags}
 */
  • Fields
/** . */
  • Constructors
/**
 * instantiate this class
 *
 * ${tags}
 * @since 0.0.1
 */
  • Methods
/**
 * .
 *
 * ${tags}
 * @since 0.0.1
 */
  • Overriding methods
/**
 * {@inheritDoc}
 * @since 0.0.1
 * ${see_to_overridden}
 */
  • Delegate methods
/**
 * delegate to .
 * 
 * ${tags}
 * @since 0.0.1
 * ${see_to_target}
 */
  • Getters
/**
 * to get ${bare_field_name}
 *
 * @return the ${bare_field_name}
 * @since 0.0.1
 */
  • Setters
/**
 * to set parameter to the ${bare_field_name}
 *
 * @param ${param} the ${bare_field_name} to set
 * @since 0.0.1
 */

 

formatter

Java / Code Style / Formatter

  1. [New] をクリック
  2. Profile name: に適当な名前を入れて、Initialize settings with the following profile: を "Eclipse [built-in]" として OK

Formatter → New Profile

Indentation — インデントの設定

Java コードのインデントに関する設定

formatter → Indentation

  • Tab policy → Spaces only
    • Indentation size: → 4
    • Tab size: → 4
  • Statements within 'switch' body → True
    • Statements within 'case' body → True
    • 'break' statements → True
  • OK をクリック

 

Compiler

Errors / Warnings

Java コンパイラのエラー/警告に関する設定。デフォルトよりもうるさくなるように設定。

内容は画面キャプチャの通り。

  • Code Style

コードスタイル

Errors/Warnings - Code Style

  • Potential programming problems

潜在的なプログラミングの問題

Errors/Warnings - Potential programing probrems

  • Name shadowing and conflicts

名前のシャドーイングと競合

Errors/Warnings - Name shadowing and conflicts

  • Unnecessary code

不要なコード

Errors/Warnings - Unnecessary code

  • Generic types

ジェネリック型 (総称型)

Errors/Warnings - Generic types

  • Annotations

アノテーション (注釈)

Errors/Warnings - Annotations

  • Null analysis

Null 分析

Errors/Warnings - Null analysis

  • その他

使用すべきでない制限されたAPI と、モジュール

Errors/Warnings - Deprecated and restricted API | Modules

Javadoc

コンパイラの Javadoc に関する設定

Java / Compiler / Javadoc

 

Editor

Content Assist

Java / Editor / Content Assist

  • Auto activation delay → 80
  • Auto activation triggers for java
    .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_

また、Sorting and Filtering 項目中の、

  • Show substring matches は、False とするときもある。
Content Assist → Favorites

Java / Editor / Content Assist / Favorites

  1. New Member
  2. org.junit.Assert.assertThat を追加
Folding

Java / Editor / Folding

  • Initially fold these elements
    → Comments → True
Save Actions
  • Perform the selected actions on save → True
    • Additional actions → True
      Configure をクリック

Java / Editor / Save Actions

  • Code Organizing タブ
    • Remove trailing whitespace → True
      → All lines → True

  • Missing Code タブ
    • Add missing Annotations → True
      → それ以外もすべてチェック

  • Unnecessary Code タブ
    • Remove unused imports → True
    • Remove unnecessary '$NON-NLS$' tags → True

Typing

Java / Editor /Typing

  • Automatically insert at correct position
    • Semicolons → True
    • Braces → True

 

FindBugs

Java / FindBugs

  • 報告する最小ランク → 1
  • 報告(可視)バグ・カテゴリー
    • Security → True
    • Internationalization → True

 

Maven

Maven

  • Download Artifact Javadoc → True
  • Download repository index updates on startup → True

 

User Interface

Maven / User Interface

  • Open XML page in the POM editor by default → True

 

User Settings

Maven / User Settings

  • ~/.m2/settings.xml を定義している場合は、こちらで設定しておく。

 

Team

Team

  • Show all synchronization information in a resource's text label → True
  • Show the file author in compare editors → True

 

Git

Team / Git

  • 必要に応じて Default repository folder: に、既存のローカルリポジトリを設定しておく。

 

Web

 

CSS Files

Web / CSS Files

  • Encoding → ISO 10646/Unicode(UTF-8)
CSS Files → Editor

Web / CSS Files / Editor

  • Indent using spaces → True
  • Identation size = 4

 

HTML Files

HTML Files → Editor

Web / HTML Files / Editor

  • Indent using spaces → True
  • Identation size = 2

 

JSP Files

Web / JSP Files

  • Encoding → ISO 10646/Unicode(UTF-8)

 

XML

 

XML Files

XML Files → Editor

XML / XML Files / Editor

  • Indent using spaces → True
  • Identation size = 4

 

Conclusion

以上です。お疲れさまでした。


 

 

zaturendo

中小企業社内SE。

0件のコメント

コメントを残す

アバタープレースホルダー

メールアドレスが公開されることはありません。 が付いている欄は必須項目です