當前位置: 首頁>>代碼示例>>Java>>正文


Java IFolder.delete方法代碼示例

本文整理匯總了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 ();
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:27,代碼來源:RecipeHelper.java

示例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);
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:11,代碼來源:BuildInstruction.java

示例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);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:13,代碼來源:LaunchExpressionEditor.java


注:本文中的org.eclipse.core.resources.IFolder.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。