本文整理汇总了Java中org.eclipse.core.resources.IFolder.delete方法的典型用法代码示例。如果您正苦于以下问题:Java IFolder.delete方法的具体用法?Java IFolder.delete怎么用?Java IFolder.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.resources.IFolder
的用法示例。
在下文中一共展示了IFolder.delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processFile
import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
public static void processFile ( final IContainer parent, final Definition definition, final Profile profile, final IProgressMonitor monitor ) throws Exception
{
monitor.beginTask ( makeJobLabel ( definition, profile ), 100 );
final IFolder output = parent.getFolder ( new Path ( "output" ) ); //$NON-NLS-1$
if ( output.exists () )
{
output.delete ( true, new SubProgressMonitor ( monitor, 9 ) );
}
output.create ( true, true, new SubProgressMonitor ( monitor, 1 ) );
final Builder builder = new Builder ( definition, profile );
final Recipe recipe = builder.build ();
try
{
final Map<String, Object> initialContent = new HashMap<String, Object> ();
initialContent.put ( "output", output ); //$NON-NLS-1$
recipe.execute ( initialContent, new SubProgressMonitor ( monitor, 90 ) );
}
finally
{
monitor.done ();
}
}
示例2: deleteEmptyDirectories
import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private void deleteEmptyDirectories(IFolder folder, IProgressMonitor progressMonitor) throws CoreException {
for (IResource member : folder.members()) {
if (member instanceof IFolder) {
deleteEmptyDirectories((IFolder) member, progressMonitor);
}
}
if (folder.members().length == 0) {
folder.delete(true, progressMonitor);
}
}
示例3: removeTemprarySourcePackage
import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private void removeTemprarySourcePackage() {
IPath tempSrcFolder = new Path(PathConstant.TEMP_BUILD_PATH_COMPILATION_PACKAGE);
IFolder folder = BuildExpressionEditorDataSturcture.INSTANCE.getCurrentProject().getFolder(tempSrcFolder);
try {
if (folder.exists()) {
folder.delete(true, new NullProgressMonitor());
}
} catch (CoreException e) {
LOGGER.error("CoreException occurred while removing temporary source folder", e);
}
LOGGER.debug("Removed temporary build path at " + PathConstant.TEMP_BUILD_PATH_SETTINGS_FOLDER);
}