⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 javapropertiespreferences.java

📁 这是java编写的一个开发例子,很值得参考!!!!!!!!!!!!!!!!
💻 JAVA
字号:
/*******************************************************************************
 * Copyright (c) 2003-2004 Berthold Daum. All rights reserved. This program and
 * the accompanying materials are made available under the terms of the Common
 * Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors: Berthold Daum
 ******************************************************************************/
package com.bdaum.SpellChecker.JavaProperties;

import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.preference.IPreferenceStore;

import com.bdaum.SpellChecker.SpellCheckerPlugin;
import com.bdaum.SpellChecker.preferences.SpellCheckerPreferences;
import com.swabunga.spell.engine.Configuration;

public class JavaPropertiesPreferences extends SpellCheckerPreferences {

	// Additional options
	public static final String CHECKCOMMENTS = "checkComments";

	public static final String CHECKKEYS = "checkKeys";

	/**
	 * Set default preference values
	 * 
	 * @param store -
	 *            the preference store
	 */
	protected void initializePublicPreferences(IPreferenceStore store) {
		store.setDefault(SPELL_DICTIONARY, SpellCheckerPlugin
				.getDefaultDictionaryFileName());
		store.setDefault(Configuration.SPELL_THRESHOLD, 140);
		store.setDefault(Configuration.SPELL_IGNOREDIGITWORDS, true);
		store.setDefault(Configuration.SPELL_IGNOREINTERNETADDRESSES, true);
		store.setDefault(Configuration.SPELL_IGNOREMIXEDCASE, false);
		store.setDefault(Configuration.SPELL_IGNOREMULTIPLEWORDS, false);
		store.setDefault(Configuration.SPELL_IGNORESENTENCECAPITALIZATION,
				false);
		store.setDefault(Configuration.SPELL_IGNOREUPPERCASE, true);
		store.setDefault(IGNOREONELETTERWORDS, false);
		store.setDefault(COMPOUNDCHARACTERS, ".:/@\\");
		store.setDefault(CHECKCOMMENTS, false);
		store.setDefault(CHECKKEYS, false);
	}

	/**
	 * Get plug-in specific preferences
	 * 
	 * @return Preferences
	 */
	public Preferences getPluginPreferences() {
		return JavaPropertiesPlugin.getDefault().getPluginPreferences();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -