本文整理匯總了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);
}