在workspace的目录中,找到
.metadata/.plugins/org.eclipse.core.runtime/.settings/ 目录,然后把两个文件给替换一下就可以了。
对了,替换完之后还得手动设置一次字体。我是用Consolas 14pts的
org.eclipse.jdt.ui.prefs
#Wed Dec 23 14:31:26 CST 2009
secondaryIPColor=45,70,56
AbstractTextEditor.Color.Background=25,25,25
eclipse.preferences.version=1
spacesForTabs=true
writeOccurrenceIndicationColor=61,63,37
AbstractTextEditor.Color.Foreground.SystemDefault=false
AbstractTextEditor.Color.Foreground=128,255,0
AbstractTextEditor.Color.SelectionBackground=65,76,59
currentIPColor=45,70,56
overviewRuler_migration=migrated_3.1
lineNumberRuler=true
deletionIndicationColor=255,0,0
searchResultIndicationColor=51,51,79
currentLineColor=34,34,32
AbstractTextEditor.Color.SelectionForeground=255,255,255
printMarginColor=192,192,192
occurrenceIndicationColor=72,72,72
AbstractTextEditor.Color.SelectionBackground.SystemDefault=false
AbstractTextEditor.Color.Background.SystemDefault=false
lineNumberColor=0,128,192
AbstractTextEditor.Color.FindScope=25,25,25
AbstractTextEditor.Color.SelectionForeground.SystemDefault=false
org.eclipse.ui.editors.prefs
#Sun Mar 21 22:41:48 CST 2010
pf_coloring_argument=128,255,0
sp_cleanup.remove_private_constructors=true
semanticHighlighting.methodDeclarationName.enabled=true
sp_cleanup.sort_members_all=false
sp_cleanup.format_source_code=false
sp_cleanup.never_use_blocks=false
semanticHighlighting.enum.enabled=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.remove_unnecessary_casts=true
org.eclipse.jdt.ui.text.code_templates_migrated=true
pf_coloring_key=255,200,0
sp_cleanup.add_missing_nls_tags=false
semanticHighlighting.localVariableDeclaration.enabled=true
semanticHighlighting.interface.enabled=true
sp_cleanup.remove_trailing_whitespaces=false
content_assist_autoactivation_triggers_java=.abcdefghijklmnopqrstuvwxyz
semanticHighlighting.inheritedMethodInvocation.color=227,183,53
sp_cleanup.always_use_blocks=true
sp_cleanup.add_missing_methods=false
LexicalSortingAction.isChecked=true
semanticHighlighting.typeParameter.color=205,177,173
org.eclipse.jdt.ui.editor.tab.width=
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.never_use_parentheses_in_expressions=true
breadcrumb.org.eclipse.jdt.ui.JavaPerspective=true
sourceHoverBackgroundColor=255,255,225
java_keyword_return=236,108,30
org.eclipse.pde.ui.ExternalPluginLibrariesFilter1=true
spelling_user_dictionary_encoding=
spelling_locale_initialized=true
org.eclipse.jdt.ui.text.custom_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*=true
content_assist_proposals_background=255,255,255
semanticHighlighting.method.color=247,197,39
semanticHighlighting.interface.color=255,128,128
semanticHighlighting.method.enabled=true
sp_cleanup.make_variable_declarations_final=true
org.eclipse.jdt.ui.PackageExplorer_patternFilterId_RemoteSystemsTempFiles=true
sp_cleanup.on_save_use_additional_actions=false
sp_cleanup.remove_unnecessary_nls_tags=false
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.text.templates_migrated=true
content_assist_parameters_foreground=230,230,230
spelling_ignore_non_letters=true
java_string=89,196,196
spelling_ignore_digits=true
semanticHighlighting.parameterVariable.enabled=true
org.eclipse.jdt.ui.javadoclocations.migrated=true
java_doc_tag=64,149,108
semanticHighlighting.staticMethodInvocation.color=255,255,255
org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter=true
spelling_ignore_single_letters=true
CustomFiltersActionGroup.org.eclipse.jdt.ui.PackageExplorer.TAG_DUMMY_TO_TEST_EXISTENCE=storedViewPreferences
hoverModifierMasks=org.eclipse.jdt.ui.BestMatchHover;0;org.eclipse.jdt.internal.debug.ui.JavaDebugHover;0;org.eclipse.jdt.ui.ProblemHover;0;org.eclipse.jdt.ui.NLSStringHover;327680;org.eclipse.jdt.ui.JavadocHover;0;org.eclipse.jdt.ui.JavaSourceHover;131072;org.eclipse.jdt.ui.AnnotationHover;0;
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.use_parentheses_in_expressions=false
pf_coloring_assignment=255,255,255
sp_cleanup.remove_unused_private_methods=true
semanticHighlighting.class.color=255,128,192
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
sp_cleanup.always_use_this_for_non_static_method_access=false
tabWidthPropagated=true
java_comment_task_tag=64,128,128
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter=true
semanticHighlighting.deprecatedMember.color=255,255,255
sp_cleanup.add_default_serial_version_id=true
org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter=true
sp_cleanup.make_private_fields_final=true
java_doc_link=0,128,255
org.eclipse.jdt.ui.PackageExplorer_patternFilterId_RemoteSystemsConnections=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.add_missing_deprecated_annotations=true
spelling_ignore_urls=true
semanticHighlighting.annotation.color=192,192,192
pf_coloring_value=255,255,255
semanticHighlighting.typeArgument.enabled=true
semanticHighlighting.abstractMethodInvocation.color=241,196,54
sp_cleanup.add_missing_annotations=true
org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
lastRecentlyUsedFilters=org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter,
spelling_ignore_mixed=true
semanticHighlighting.staticField.color=255,255,255
org.eclipse.jface.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas;
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.organize_imports=true
semanticHighlighting.typeParameter.enabled=true
sp_cleanup.remove_unused_imports=false
semanticHighlighting.staticFinalField.color=128,255,0
semanticHighlighting.abstractMethodInvocation.enabled=true
sp_cleanup.add_generated_serial_version_id=false
semanticHighlighting.localVariable.color=70,140,179
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.use_this_for_non_static_method_access=false
content_assist_parameters_background=0,0,0
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
content_assist_disabled_computers=org.eclipse.jdt.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000
semanticHighlighting.inheritedMethodInvocation.enabled=true
sp_cleanup.make_local_variable_final=false
sp_cleanup.remove_trailing_whitespaces_all=true
java_multi_line_comment=0,128,64
semanticHighlighting.parameterVariable.color=64,128,0
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
org.eclipse.jdt.ui.formatterprofiles.version=11
useAnnotationsPrefPage=true
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.use_blocks=false
useQuickDiffPrefPage=true
fontPropagated=true
java_keyword=236,105,30
java_single_line_comment=0,128,64
semanticHighlighting.localVariable.enabled=true
org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter=true
semanticHighlighting.enum.color=64,128,0
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
eclipse.preferences.version=1
sp_cleanup.sort_members=false
java_doc_keyword=0,128,0
semanticHighlighting.localVariableDeclaration.color=70,140,179
hoverModifiers=org.eclipse.jdt.ui.BestMatchHover;0;org.eclipse.jdt.internal.debug.ui.JavaDebugHover;\!0;org.eclipse.jdt.ui.ProblemHover;\!0;org.eclipse.jdt.ui.NLSStringHover;Ctrl+Alt;org.eclipse.jdt.ui.JavadocHover;\!0;org.eclipse.jdt.ui.JavaSourceHover;Shift;org.eclipse.jdt.ui.AnnotationHover;\!0;
java_bracket=255,255,255
semanticHighlighting.class.enabled=true
spelling_ignore_sentence=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
spelling_ignore_upper=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
semanticHighlighting.staticFinalField.enabled=true
semanticHighlighting.methodDeclarationName.color=241,196,56
sp_cleanup.use_blocks_only_for_return_and_throw=false
java_operator=255,255,255
sp_cleanup.correct_indentation=false
java_default=255,255,255
sp_cleanup.make_parameters_final=false
content_assist_number_of_computers=18
sp_cleanup.remove_unused_local_variables=false
spelling_ignore_ampersand_in_properties=true
org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter=true
org.eclipse.jdt.ui.exception.name=e
content_assist_proposals_foreground=255,146,66
java_doc_default=64,149,108
semanticHighlighting.field.color=97,139,239
org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter=true
proposalOrderMigrated=true
semanticHighlighting.typeArgument.color=217,176,172
spelling_ignore_java_strings=true
这样不会干扰Eclipse的全局配置,比较灵活。
截图一张