📄 spellcheckerplugin.java
字号:
/*******************************************************************************
* Copyright (c) 2003 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;
import java.io.IOException;
import java.net.URL;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import com.bdaum.SpellChecker.actions.CheckSpellingActionDelegate;
import com.bdaum.SpellChecker.preferences.SpellCheckerPreferences;
/**
* This class cares for the initialization of preferences and
* acts as a central registry for core components such as
* SpellCheckManager and CheckSpellingActionDelegate.
*/
public class SpellCheckerPlugin extends AbstractUIPlugin {
// Default dictionaries
private static final String DEFAULTDICT = "dict/english.0";
private static final String USERDICT = "dict/user.dict";
// The singleton
private static SpellCheckerPlugin plugin;
// Default preferences
private SpellCheckerPreferences preferences;
// Active SpellCheckManager
private SpellCheckManager manager;
// Active ActionDelegate
private CheckSpellingActionDelegate spellCheckingActionDelegate;
// Spell checking thread
private Thread spThread;
/**
* The Constructor.
*/
public SpellCheckerPlugin() {
super();
plugin = this;
// Set configuration for jazzy engine. We make jazzy fetch
// the configuration from our own configuration
// implementation.
System.setProperty("jazzy.config",
"com.bdaum.SpellChecker.SpellCheckConfiguration");
}
/**
* Returns the plug-in singleton
*/
public static SpellCheckerPlugin getDefault() {
return plugin;
}
/**
* Fetches the plug-in identification.
*
* @return String
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -