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

📄 j2menature.java

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

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.JavaCore;

import eclipseme.core.IEclipseMECoreConstants;

/**
 * Project nature for J2ME projects.
 * <p>
 * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
 * change before reaching stability. It is being made available at this early stage to solicit feedback
 * from pioneering adopters on the understanding that any code that uses this API will almost 
 * certainly be broken as the API evolves.
 * </p>
 * Copyright (c) 2003-2005 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.7 $
 * <br>
 * $Date: 2006/11/12 01:11:02 $
 * <br>
 * @author Craig Setera
 * @see IProjectNature
 */
public class J2MENature extends AbstractNature {
	/**
	 * Return a boolean indicating whether the specified project has the J2ME
	 * nature associated with it.
	 * 
	 * @param project the project to be tested for the J2ME nature
	 * @return a boolean indicating whether the specified project has
	 * the J2ME nature
	 * @throws CoreException
	 */
	public static boolean hasJ2MENature(IProject project)
		throws CoreException
	{
		return project.hasNature(IEclipseMECoreConstants.J2ME_NATURE_ID);
	}

	/**
	 * @see IProjectNature#configure
	 */
	public void configure() 
		throws CoreException 
	{
		BuildSpecManipulator manipulator = new BuildSpecManipulator(getProject());
		manipulator.addBuilderAfter(
			JavaCore.BUILDER_ID, 
			IEclipseMECoreConstants.J2ME_PREVERIFIER_ID, 
			null);
		manipulator.commitChanges(new NullProgressMonitor());
	}
}

⌨️ 快捷键说明

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