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


Java IProject.delete方法代碼示例

本文整理匯總了Java中org.eclipse.core.resources.IProject.delete方法的典型用法代碼示例。如果您正苦於以下問題:Java IProject.delete方法的具體用法?Java IProject.delete怎麽用?Java IProject.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.core.resources.IProject的用法示例。


在下文中一共展示了IProject.delete方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testProject

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Test
public void testProject() throws CoreException, IOException, PgCodekeeperUIException,
InterruptedException{
    try(TempDir tempDir = new TempDir(workspacePath.toPath(), "dbSourceProjectTest")){
        File dir = tempDir.get().toFile();
        // create empty project in temp dir
        IProject project = createProjectInWorkspace(dir.getName());

        // populate project with data
        new ModelExporter(dir, dbPredefined, ApgdiffConsts.UTF_8).exportFull();
        project.refreshLocal(IResource.DEPTH_INFINITE, null);

        // testing itself
        assertEquals("Project name differs", dir.getName(), project.getName());
        performTest(DbSource.fromProject(new PgDbProject(project)));
        project.delete(false, true, null);
    }
}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:19,代碼來源:DbSourceTest.java

示例2: deleteProjects

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
private static void deleteProjects(final IProject[] projects, StringBuilder error) {
	for (final IProject project : projects) {
		if (project.exists()) {
			try {
				project.delete(true, true, new NullProgressMonitor());
			} catch (CoreException e) {
				error.append(e.getMessage());
			}
		}
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:12,代碼來源:AbstractBuilderTest.java

示例3: deleteProjectPluginResource

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
public void deleteProjectPluginResource(boolean deleteContent, String projectName) throws CoreException {
	cacheIProject.remove(projectName);
	IWorkspace myWorkspace = ResourcesPlugin.getWorkspace();
	IWorkspaceRoot myWorkspaceRoot = myWorkspace.getRoot();
	IProject resourceProject = myWorkspaceRoot.getProject(projectName);
	
	if (resourceProject.exists()) {
       	resourceProject.delete(deleteContent, false, null);
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:11,代碼來源:ConvertigoPlugin.java

示例4: cleanUp

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@AfterClass
public static void cleanUp(){
	IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
	
	for (IProject iProject : projects) {
		try {
			iProject.delete(true, true, null);
		} catch (CoreException e) {
			e.printStackTrace();
		}
	}
}
 
開發者ID:eclipse,項目名稱:gemoc-studio,代碼行數:13,代碼來源:TFSM_PlainK3ExampleWizardTest.java

示例5: createJavaProject

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
private IJavaProject createJavaProject(String name) throws CoreException {
  IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
  if (project.exists())
    project.delete(true, null);
  project.create(null);
  project.open(null);
  IProjectDescription description = project.getDescription();
  description.setNatureIds(new String[] { JavaCore.NATURE_ID });
  project.setDescription(description, null);
  IJavaProject javaProject = JavaCore.create(project);
  javaProject.setRawClasspath(new IClasspathEntry[] { JavaCore.newVariableEntry(new Path("JRE_LIB"), null, null) }, null);
  return javaProject;
}
 
開發者ID:RuiChen08,項目名稱:dacapobench,代碼行數:14,代碼來源:FullSourceWorkspaceModelTests.java

示例6: createProject

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
protected IProject createProject(IProgressMonitor monitor) {
	IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
	IProject project = root.getProject(HELLO_WORLD);
	try {
		if (project.exists())
			project.delete(true, monitor);
		project.create(monitor);
		project.open(monitor);
		addNature(project);
	} catch (Exception ex) {
		ex.printStackTrace();
	}
	return project;
}
 
開發者ID:Yakindu,項目名稱:solidity-ide,代碼行數:15,代碼來源:KickStartNewProjectAction.java

示例7: deleteProject

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
/***/
public static void deleteProject(IProject project) throws CoreException {
	project.delete(true, true, new NullProgressMonitor());
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:5,代碼來源:ProjectUtils.java


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