当前位置: 首页>>代码示例>>Java>>正文


Java IFolder.getParent方法代码示例

本文整理汇总了Java中org.eclipse.core.resources.IFolder.getParent方法的典型用法代码示例。如果您正苦于以下问题:Java IFolder.getParent方法的具体用法?Java IFolder.getParent怎么用?Java IFolder.getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.core.resources.IFolder的用法示例。


在下文中一共展示了IFolder.getParent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mkdirs

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private static void mkdirs(IFolder destPath) {
	IContainer parent = destPath.getParent(); 
	if (! parent.exists()) {
		if (parent instanceof IFolder) {
			mkdirs((IFolder) parent);
		}
		else if (parent instanceof IProject) {
			mkdirs( ((IProject)parent).getFolder(".") );
		}
	}
	try {
		destPath.create(/*force*/true, /*local*/true, Constants.NULL_PROGRESS_MONITOR);
	} catch (CoreException e) {
		e.printStackTrace();
	}
}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:17,代码来源:FileUtil.java

示例2: createParentFolder

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
/***/
protected void createParentFolder(IFolder folder) throws CoreException {
	IContainer parent = folder.getParent();
	if (parent instanceof IFolder) {
		IFolder parentFolder = (IFolder) parent;
		if (!parentFolder.exists()) {
			createParentFolder(parentFolder);
			parentFolder.create(true, true, null);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:12,代码来源:AbstractBuilderParticipantTest.java

示例3: createFolder

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
public static void createFolder(IFolder folder, boolean force, boolean local, IProgressMonitor monitor)
		throws CoreException {
	if (!folder.exists()) {
		IContainer parent = folder.getParent();
		if (parent instanceof IFolder) {
			createFolder((IFolder) parent, force, local, new NullProgressMonitor());
		}
		folder.create(force, local, monitor);
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:11,代码来源:ProjectHelper.java

示例4: createFolder

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
/**
 * Creates the specified folder if it does not exists
 * @param folder
 * @throws CoreException
 */
private void createFolder(IFolder folder) throws CoreException {
	IContainer parent = folder.getParent();
	if (parent instanceof IFolder) {
		createFolder((IFolder) parent);
	}
	if (!folder.exists()) {
		folder.create(false, true, null);
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:15,代码来源:ProjectStructureCreator.java

示例5: create

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
/**
 * Create IFolder if it doesn't exists
 * Recursively creates parent IFolder if required
 * @param folder
 * @param force
 * @param local
 * @param monitor
 * @throws CoreException
 */
public static void create(IFolder folder, boolean force, boolean local, IProgressMonitor monitor) throws CoreException{
	if(folder.exists()) return;
	if(folder.getParent() instanceof IFolder && !folder.getParent().exists()){
		create((IFolder) folder.getParent(), force, local, monitor);
	}
	folder.create(force, local, monitor);
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:17,代码来源:IFolderUtils.java


注:本文中的org.eclipse.core.resources.IFolder.getParent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。