Eclipse 偏好选项

设置Eclipse中的偏好选项,包括字体、换行、字符集、代码风格(空格缩进)、Maven、Initializr、状态栏、自动更新选项。


Locations

Instance

(-data) {osgi.instance.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]

Instance locations contain user-defined data artifacts. For example, the Resources plug-in uses the instance area as the workspace location and thus the default home for projects. Other plugins are free to write whatever files they like in this location.

Plugins preferences

PLUGINS_PREFS=@osgi.instance.area/.metadata/.plugins/org.eclipse.core.runtime/.settings/


Support pluginCustomization


Font

Colors and fonts

Preferences -> General -> Appearence -> Colors and Fonts

  • Basic
    • Text Font

Font: Source Code Pro
Size: 13

@PLUGINS_PREFS/org.eclipse.ui.workbench.prefs


Line delimiter

General line separator

Preferences -> General -> Workspace

New text file line delimiter:
Other: Unix

@PLUGINS_PREFS/org.eclipse.core.runtime.prefs


Character set

General text file encoding

Preferences -> General -> Workspace

Text file encoding
Other: UTF-8

@PLUGINS_PREFS/org.eclipse.core.resources.prefs

Content types encoding

Preferences -> General -> Content Types

Content Types:
Text

  • Java Properties File
  • JSP
    • JSP Fragment
    • JSP Tag Definition
      • XML JSP Tag Definition
  • Spring Properties File

Default encoding: UTF-8 -> Update <-

@PLUGINS_PREFS/org.eclipse.core.runtime.prefs


Code Style

General editors insert spaces for tab

Preferences -> General -> Editors -> Text Editors

  • Insert spaces for tabs

@PLUGINS_PREFS/org.eclipse.ui.editors.prefs

Java formatter indent using spaces and line width

Preferences -> Java -> Code Style -> Formatter

Active profile:
Edit...

  • Indentation
    • Tab policy: Spaces only
    • Indentation size: 4
    • Tab size: 4
  • Line Wrapping
    • Maximum line width: 120

@PLUGINS_PREFS/org.eclipse.jdt.core.prefs
@PLUGINS_PREFS/org.eclipse.jdt.ui.prefs

XML formatting indent using spaces and line width

Preferences -> XML -> XML Files -> Editor

Formatting

  • Line width: 120
  • [-] Indent using spaces
  • Indentation size: 4

@PLUGINS_PREFS/org.eclipse.wst.xml.core.prefs


Maven setting

User settings and local repository

Preferences -> Maven -> User Settings

User Settings (open file):

@PLUGINS_PREFS/org.eclipse.m2e.core.prefs


Spring Boot

Spring Boot Initializr

Preferences -> Spring -> Boot -> Initializr

Initializr URLs
https://start.spring.io

@PLUGINS_PREFS/org.springframework.ide.eclipse.boot.prefs


Status bar

Show heap status

Preferences -> General

  • Show heap status

@PLUGINS_PREFS/org.eclipse.ui.prefs

Hide Tip of the Day

Help -> Tip of the Day

Startup Options

  • Show dialog on new tips
  • Indicate new tips in status bar
  • Disable

@osgi.configuration.area/.settings/org.eclipse.tips.ide.prefs


Install/Update

Automatic Updates

Preferences -> Install/Update -> Automatic Updates

  • Automatically find new updates and notify me

@eclipse.p2.data.area/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProfile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.scheduler.prefs


0%