EclipseでWorkspaceをつくるたびに文字コードやら設定しなおすのが面倒なので、Workspaceのデフォルト設定をテンプレート化しました。
設定した内容は以下のとおりです。

  • General > Appearance > Colors and Fonts > Basic > Text Font = Tahoma 8
  • General > Workspace > Text file encoding = Other: UTF-8
  • General > Workspace > New text file line delimiter = Other: Unix
  • Java > Code Style > Conventions for variable names > Fields.Prefix = m
  • Java > Code Style > Conventions for variable names > Parameters.Prefix = a
  • Java > Code Style > Conventions for variable names > Local Variables.Prefix = t
  • Java > Code Style > Exception variable name in catch blocks = aCause
  • Java > Code Style > Formatter > Active profile= kurusugawa.jp extends Eclipse [built-in]
    • Line Wrapping > General settings > Maximum line width = 9999
    • Comments > Line width > Maximum line width for comments = 9999
    • Off/On Tags > Enable Off/On tags= true
      • Off tag = @formatter:off
      • On tag = @formatter:on
  • Web > CSS Files > Creating files > Encoding = ISO 10646/Unicode(UTF-8)
  • Web > CSS Files > Editor > Formatting > Line width = 999
  • Web > HTML Files > Creating files > Encoding = ISO 10646/Unicode(UTF-8)
  • Web > HTML Files > Editor > Formatting > Line width = 999
  • XML > XML Files > Editor > Formatting > Line width = 999

添付のtemplate-kurusugawa.zipをWorkspaceディレクトリに展開すれば有効になります。
プラグインを使う場合など、他におすすめの設定があれば教えてください。

Mavenプラグイン(m2eclipse)の設定

  • Maven > Download Artifact Sources = true
  • Maven > POM Editor > Open XML page in POM editor by default = true

添付ファイル

参考URL

カテゴリー: 技術情報