亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? eclipsemeuiplugin.java

?? 配置文件
?? JAVA
字號:
/**
 * Copyright (c) 2004 Craig Setera
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package eclipseme.ui.internal;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.preference.IPersistentPreferenceStore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import org.mortbay.util.MultiException;
import org.osgi.framework.BundleContext;

import eclipseme.core.IEclipseMECoreConstants;
import eclipseme.core.internal.EclipseMECorePlugin;
import eclipseme.core.internal.overtheair.OTAServer;
import eclipseme.ui.internal.utils.PluginPreferenceStore;

/**
 * The plugin implementation class.
 * <p />
 * Copyright (c) 2003 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.8 $
 * <br>
 * $Date: 2006/02/11 21:27:37 $
 * <br>
 * @author Craig Setera
 */
public class EclipseMEUIPlugin extends AbstractUIPlugin {
	/**
	 * A class wrapper to act as a key into the color cache
	 */
	private static class ColorCacheKey {
		private Display display;
		private int red;
		private int green;
		private int blue;
		
		/**
		 * Constructor.
		 * 
		 * @param display
		 * @param red
		 * @param green
		 * @param blue
		 */
		private ColorCacheKey(Display display, int red, int green, int blue) {
			this.display = display;
			this.red = red;
			this.green = green;
			this.blue = blue;
		}
		
		/**
		 * @see java.lang.Object#equals(java.lang.Object)
		 */
		public boolean equals(Object obj) {
			boolean equals = false;
			
			if (obj instanceof ColorCacheKey) {
				ColorCacheKey other = (ColorCacheKey) obj;
				equals = 
					display.equals(other.display) &&
					(red == other.red) &&
					(green == other.green) &&
					(blue == other.blue);
			}
			
			return equals;
		}

		/**
		 * @see java.lang.Object#hashCode()
		 */
		public int hashCode() {
			return 
				display.hashCode() ^
				(red << 24) ^
				(green << 16) ^
				blue;
		}
	}
	
	/**
	 * A class wrapper to act as a key into the color cache
	 */
	private static class FontCacheKey {
		private Display display;
		private String name;
		private int height;
		private int style;

		/**
		 * Constructor
		 * 
		 * @param display
		 * @param name
		 * @param height
		 * @param style
		 */		
		private FontCacheKey(Display display, String name, int height, int style) {
			this.display = display;
			this.name = name;
			this.height = height;
			this.style = style;
		}
		
		/**
		 * @see java.lang.Object#equals(java.lang.Object)
		 */
		public boolean equals(Object obj) {
			boolean equals = false;
			
			if (obj instanceof FontCacheKey) {
				FontCacheKey other = (FontCacheKey) obj;
				equals = 
					display.equals(other.display) &&
					name.equals(other.name) &&
					(height == other.height) &&
					(style == other.style);
			}
			
			return equals;
		}

		/**
		 * @see java.lang.Object#hashCode()
		 */
		public int hashCode() {
			return 
				display.hashCode() ^
				name.hashCode() ^
				(height << 16) ^
				style;
		}
	}
	
	//The shared instance.
	private static EclipseMEUIPlugin plugin;
	
	// Some caches
	private Map colorCache;
	private Map fontCache;
	
	// A preference store wrapper around the core plugin plugin preferences
	private IPreferenceStore corePreferenceStore;
	
	/**
	 * The constructor.
	 */
	public EclipseMEUIPlugin() {
		super();
		plugin = this;
		
		colorCache = new HashMap();
		fontCache = new HashMap();
	}

	/**
	 * Display an error to the user given the specified information.
	 * 
	 * @param shell
	 * @param severity
	 * @param code
	 * @param title
	 * @param message
	 * @param exception
	 */
	public static void displayError(
			Shell shell,
			int severity, 
			int code,
			String title,
			String message, 
			Throwable exception) 
	{
		String id = getDefault().getBundle().getSymbolicName();
		Status status = new Status(severity, id, code, message, exception);
		ErrorDialog.openError(shell, title, message, status);
	}
	
	/**
	 * Return the active window's shell.
	 * 
	 * @return the active window shell
	 */
	public static Shell getActiveWindowShell() {
		EclipseMEUIPlugin plugin = getDefault();
		IWorkbenchWindow activeWindow = plugin.getWorkbench().getActiveWorkbenchWindow();
		
		return activeWindow.getShell();
	}
	
	/**
	 * Get a color from the cache.
	 * 
	 * @param display
	 * @param red
	 * @param green
	 * @param blue
	 * @return
	 */
	public static Color getColor(Display display, int red, int green, int blue) {
		Map cache = getDefault().colorCache;
		ColorCacheKey key = new ColorCacheKey(display, red, green, blue);

		Color color = (Color) cache.get(key);
		if (color == null) {
			color = new Color(display, red, green, blue);
			cache.put(key, color);
		}

		return color;
	}
	
	/**
	 * Get the specified font from the cache.
	 * 
	 * @param display
	 * @param name
	 * @param height
	 * @param style
	 * @return
	 */
	public static Font getFont(Display display, String name, int height, int style)
	{
		Map cache = getDefault().fontCache;
		FontCacheKey key = new FontCacheKey(display, name, height, style);
		
		Font font = (Font) cache.get(key);
		if (font == null) {
			font = new Font(display, name, height, style);
			cache.put(key, font);
		}
		
		return font;
	}
	
	/**
	 * Get an ImageDescriptor for the for specified plugin
	 * image.
	 */
	public static ImageDescriptor getIconImageDescriptor(String imageName) {
		ImageDescriptor img = null;
		
		try {
			URL pluginURL = getDefault().getBundle().getEntry("/");
			URL imgURL = new URL(pluginURL, "icons/" + imageName);
			
			img = ImageDescriptor.createFromURL(imgURL);
		} catch (MalformedURLException e) {
			EclipseMECorePlugin.log(IStatus.INFO, "getIconImage", e);
		}
		
		return img;
	}
	
	/**
	 * Find and return the specified image.  Use the cache whenever
	 * possible.
	 * 
	 * @param imageName
	 * @return
	 */
	public static Image getImageFromCache(String imageName) {
		ImageRegistry registry = getDefault().getImageRegistry();
		Image image = registry.get(imageName);
		if (image == null) {
			ImageDescriptor descriptor = getIconImageDescriptor(imageName);
			registry.put(imageName, descriptor);
			image = registry.get(imageName);
		}
		
		return image;
	}
	
	/**
	 * Return a preference store that sits on top of the EclipseME core preferences
	 * for the specified project.
	 * 
	 * @param context
	 * @return
	 */
	public static IPersistentPreferenceStore getCoreProjectPreferenceStore(IProject context) {
		ProjectScope projectScope = new ProjectScope(context);
		return new ScopedPreferenceStore(projectScope, IEclipseMECoreConstants.PLUGIN_ID);
	}
	
	/**
	 * This method is called upon plug-in activation
	 */
	public void start(BundleContext context) throws Exception {
		super.start(context);
		
		// Dispose of the cached values
		Iterator iter = colorCache.values().iterator();
		while (iter.hasNext()) {
			Color color = (Color) iter.next();
			color.dispose();
		}
		
		iter = fontCache.values().iterator();
		while (iter.hasNext()) {
			Font font = (Font) iter.next();
			font.dispose();
		}
		
		// Startup the OTA server if set to startup immediately
		IPreferenceStore store = getPreferenceStore();
		boolean startAtStart = store.getBoolean(IEclipseMECoreConstants.PREF_OTA_SERVER_START_AT_START);
		if (startAtStart) {
			startupOTAServer();
		}
	}

	/**
	 * This method is called when the plug-in is stopped
	 */
	public void stop(BundleContext context) throws Exception {
		super.stop(context);
	}

	/**
	 * Returns the shared instance.
	 */
	public static EclipseMEUIPlugin getDefault() {
		return plugin;
	}
	
	/**
	 * Return the dialog settings section within the plugin's root settings
	 * object.  This method will create the new section if necessary.
	 * 
	 * @param dialogSettings
	 * @param sectionName
	 * @return
	 */
	public static IDialogSettings getDialogSettings(String sectionName) {
		return getDialogSettings(getDefault().getDialogSettings(), sectionName);
	}

	/**
	 * Return the dialog settings section within the specified parent settings
	 * object.  This method will create the new section if necessary.
	 * 
	 * @param dialogSettings
	 * @param sectionName
	 * @return
	 */
	public static IDialogSettings getDialogSettings(IDialogSettings dialogSettings, String sectionName) {
		IDialogSettings settings = dialogSettings.getSection(sectionName);
		if (settings == null) {
			settings = dialogSettings.addNewSection(sectionName);
		}
		
		return settings;
	}

	/**
	 * Return an IPreferenceStore wrapper around the EclipseME core
	 * plugin preferences.
	 * 
	 * @return
	 */
	public IPreferenceStore getCorePreferenceStore() {
		if (corePreferenceStore == null) {
			EclipseMECorePlugin plugin = EclipseMECorePlugin.getDefault();
			corePreferenceStore = 
				new PluginPreferenceStore(plugin, plugin.getPluginPreferences());
		}
		
		return corePreferenceStore;
	}
	
	/**
	 * Start up the OTA server if the user requested it
	 * be started up immediately. 
	 */
	private void startupOTAServer() {
		try {
			OTAServer.instance.start();
		} catch (MultiException e) {
			EclipseMECorePlugin.log(IStatus.ERROR, "startupOTAServer", e);
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月综合激情婷婷六月色窝| 91免费视频网| 欧美一区二区三区男人的天堂| 亚洲va天堂va国产va久| 国产精品久久久久精k8| 色婷婷一区二区三区四区| 免费成人在线视频观看| 午夜欧美视频在线观看| 国产一区二区中文字幕| 亚洲天堂av老司机| 国产精品看片你懂得| 日韩一区欧美二区| 国产成人自拍在线| 久久国内精品视频| 色94色欧美sute亚洲线路一ni| 麻豆91在线播放| 国内精品免费**视频| 在线精品视频一区二区| av在线播放一区二区三区| 欧美另类一区二区三区| 亚洲欧美日韩久久| 国产精品免费久久| 精品免费国产一区二区三区四区| 一本大道久久a久久综合婷婷| 欧美精品视频www在线观看| 中文字幕一区二区三中文字幕| 免费在线观看视频一区| 在线观看一区不卡| 久久久国产综合精品女国产盗摄| 欧美视频中文字幕| 国产精品久久久久久久裸模| 国产一区二区精品在线观看| 91精品国产欧美一区二区成人| 一区二区三区四区五区视频在线观看| 久久亚洲春色中文字幕久久久| 欧美经典一区二区三区| 国产精品久久久久久久久晋中 | 国产精品色在线| 久久精品国产亚洲5555| 欧美日韩视频在线第一区| 亚洲自拍偷拍图区| 在线观看免费成人| 亚洲综合成人在线视频| 色88888久久久久久影院按摩| 国产精品每日更新在线播放网址| 国产精品一线二线三线精华| 精品国产乱码久久久久久牛牛| 无吗不卡中文字幕| 5858s免费视频成人| 五月婷婷综合在线| 91精品午夜视频| 免费在线欧美视频| 亚洲精品一区在线观看| 国产成人综合在线观看| 久久精品免费在线观看| 成人av在线播放网站| 中文字幕一区二区不卡 | 亚洲激情图片qvod| 亚洲成av人片一区二区三区| 日本电影欧美片| 婷婷综合久久一区二区三区| 欧美大片在线观看一区二区| 亚洲欧美激情小说另类| 日本道在线观看一区二区| 五月天一区二区| 久久这里只有精品视频网| 国产精品白丝jk白祙喷水网站| 国产精品国产三级国产aⅴ中文| 99精品国产视频| 天涯成人国产亚洲精品一区av| 日韩一区二区高清| 成人午夜在线视频| 午夜久久久久久久久久一区二区| 欧美一区二区三区免费观看视频 | 久久先锋影音av鲁色资源| 国产91对白在线观看九色| 亚洲免费av观看| 日韩你懂的在线观看| 成年人网站91| 奇米精品一区二区三区四区 | 欧美精品v国产精品v日韩精品| 日本不卡一区二区三区| 久久久久一区二区三区四区| 一本色道亚洲精品aⅴ| 日韩电影在线免费| 1000部国产精品成人观看| 91精品国产综合久久福利| 国产乱淫av一区二区三区| 亚洲狠狠丁香婷婷综合久久久| 日韩免费高清av| 99久久精品国产毛片| 久久99九九99精品| 亚洲激情网站免费观看| 国产亚洲一区二区三区在线观看 | 国产福利一区在线观看| 亚洲日本护士毛茸茸| 精品粉嫩超白一线天av| 欧美制服丝袜第一页| 国产a区久久久| 麻豆精品一区二区av白丝在线 | 欧美日韩一区二区三区四区五区| 国产一区视频网站| 日本视频在线一区| 亚洲一区二区三区在线看| 中文文精品字幕一区二区| 欧美一区二区三区免费在线看| 色婷婷av一区二区三区gif| 国内欧美视频一区二区| 亚洲国产精品久久久久秋霞影院| 国产精品久线在线观看| 久久综合久久综合久久| 欧美日韩一区高清| 欧美亚洲动漫另类| 99国产精品久久久久久久久久久| 丁香一区二区三区| 久久国产精品99久久人人澡| 亚洲v中文字幕| 偷窥国产亚洲免费视频| 亚洲电影一区二区| 亚洲夂夂婷婷色拍ww47| 亚洲精品国产成人久久av盗摄| 中文字幕亚洲综合久久菠萝蜜| 久久综合九色欧美综合狠狠 | 久久精品网站免费观看| 欧美videos中文字幕| 日韩精品一区二区三区老鸭窝| 91精品国产一区二区三区 | 欧美肥妇毛茸茸| 欧美精选在线播放| 欧美一卡二卡在线| 日韩一级视频免费观看在线| 日韩女优制服丝袜电影| 精品国产第一区二区三区观看体验| 色噜噜久久综合| eeuss影院一区二区三区| 成人午夜电影网站| 99久久婷婷国产精品综合| 成人高清av在线| 色综合夜色一区| 亚洲综合免费观看高清完整版在线 | 国模冰冰炮一区二区| 国产一区二区三区不卡在线观看| 国产精品资源在线| 国产1区2区3区精品美女| 不卡一区二区三区四区| 91色乱码一区二区三区| 在线观看国产一区二区| 91麻豆精品国产91久久久资源速度 | 99久久精品99国产精品| 色婷婷av一区二区三区gif| 欧美日韩视频在线观看一区二区三区 | 日本一区二区免费在线| 久久久噜噜噜久久中文字幕色伊伊| 99re这里都是精品| 欧美日韩大陆在线| 欧美大片在线观看一区| 国产精品日产欧美久久久久| 亚洲色图在线看| 蜜臀久久久久久久| 福利一区在线观看| 欧美人妖巨大在线| 国产免费成人在线视频| 一二三区精品福利视频| 久久电影国产免费久久电影| caoporm超碰国产精品| 精品视频在线免费看| 亚洲精品在线免费播放| 亚洲精品国产无天堂网2021| 蜜桃久久精品一区二区| 91免费在线播放| 精品乱码亚洲一区二区不卡| 亚洲欧美在线aaa| 麻豆精品一二三| 99久久久精品| 日韩欧美中文字幕一区| 欧美综合视频在线观看| 国产农村妇女毛片精品久久麻豆| 麻豆91小视频| 欧美精品一二三| 五月综合激情婷婷六月色窝| 色婷婷亚洲综合| 亚洲人亚洲人成电影网站色| 粉嫩高潮美女一区二区三区| 久久亚洲一区二区三区四区| 日本不卡高清视频| 91精品国产综合久久精品图片| 亚洲一区国产视频| 欧美综合色免费| 亚洲v日本v欧美v久久精品| 日本精品视频一区二区| 亚洲男女一区二区三区| av动漫一区二区| 成人免费在线播放视频| 99久久久久久| 亚洲精品日韩一| 精品婷婷伊人一区三区三| 亚洲韩国一区二区三区| 欧美日韩精品电影| 视频在线观看91| 日韩久久久精品|