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

📄 deviceeditorconfigelement.java

📁 eclipseme的最新版本的source,欢迎j2me程序员使用
💻 JAVA
字号:
/**
 * Copyright (c) 2003-2006 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.devices;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.ui.IActionDelegate;

/**
 * Wrapper around an IConfigurationElement instance for a
 * deviceEditor extension point extension.
 * <p />
 * Copyright (c) 2003-2006 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.1 $
 * <br>
 * $Date: 2006/02/25 01:55:03 $
 * <br>
 * @author Craig Setera
 */
public class DeviceEditorConfigElement {
	private IConfigurationElement element;
	private IActionDelegate delegate;
	/**
	 * Construct a new wrapper instance.
	 * 
	 * @param editorElement
	 */
	public DeviceEditorConfigElement(IConfigurationElement editorElement) {
		super();
		element = editorElement;
	}
	
	/**
	 * Return an instance of the action delegate for this device editor.
	 * 
	 * @return
	 * @throws CoreException
	 */
	public IActionDelegate getActionDelegate() 
		throws CoreException 
	{
		if (delegate == null) {
			delegate = (IActionDelegate) element.createExecutableExtension("class"); 
		}
		
		return delegate;
	}

	/**
	 * Return the identifier of this extension.
	 * 
	 * @return
	 */
	public String getIdentifier() {
		return element.getAttribute("id");
	}
	
	/**
	 * Return the name of this extension.
	 * 
	 * @return
	 */
	public String getName() {
		return element.getAttribute("name");
	}
	
	/**
	 * Return the class of the device for which this editor applies.
	 * 
	 * @return
	 */
	public String getDeviceClass() 
	{
		return element.getAttribute("deviceClass");
	}
}

⌨️ 快捷键说明

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