- [Java]-[Build Path]-[Classpath Variables] に M2_REPO を追加
- [Java]-[Appearance]-[Type Filters] に java.awt.* を追加
- [Java]-[Editor]-[Content Assist] で Complletion overwrites にチェック
- [Java]-[Editor]-[typing] で Automatically insert at correct position の Semicolons にチェック
- [Java]-[Editor]-[Save Action] で Perform the selected action on save の Organize imports にチェック
- ファイルセーブ時に使ってない import を消す
- [Java]-[Code Style]-[Organize Imports] の Number of static imports needed for .* を 1 にする
- import static org.junit.Assert.* を展開しないように
- [Java]-[Editor]-[Content Assist]-[Favorites] に org.junit.Assert と org.hamcrest.CoreMatchers を追加
- assertThat とか notNullValue とかを保管出来るように
- [General]-[Editors]-[Text Editors]-[Show line numbers]にチェック
- Preferencesの[Java]-[Editor]-[Templates]から[New...]でテンプレートを追加
${assert:importStatic('org.junit.Assert.*','org.hamcrest.CoreMatchers.*')}
assertThat(${actual}, ${matcher})${cursor}
@${Before:newType(org.junit.Before)}
public void before() throws Exception {
${cursor}
}
@${After:newType(org.junit.After)}
public void after() throws Exception {
${cursor}
}
-
-
- test(JUnit3)は使わないのでチェックを外す