@AfterClass public static void cleanUp() { new WaitWhile(new JobIsRunning()); EditorHandler.getInstance().closeAll(false); ProjectExplorer pe = new ProjectExplorer(); pe.open(); for (Project p : pe.getProjects()) { try { org.jboss.reddeer.direct.project.Project.delete(p.getName(), true, true); } catch (RuntimeException ex) { AbstractWait.sleep(TimePeriod.NORMAL); org.jboss.reddeer.direct.project.Project.delete(p.getName(), true, true); } } }
protected void deleteAllProjects() { new WaitWhile(new JobIsRunning()); EditorHandler.getInstance().closeAll(false); ProjectExplorer pe = new ProjectExplorer(); pe.open(); for (Project p : pe.getProjects()) { try { org.jboss.reddeer.direct.project.Project.delete(p.getName(), true, true); } catch (Exception ex) { AbstractWait.sleep(TimePeriod.NORMAL); if (!p.getTreeItem().isDisposed()) { org.jboss.reddeer.direct.project.Project.delete(p.getName(), true, true); } } } }
protected void deleteAllProjects() { EditorHandler.getInstance().closeAll(false); ProjectExplorer pe = new ProjectExplorer(); pe.open(); for (Project p : pe.getProjects()) { org.jboss.reddeer.direct.project.Project.delete(p.getName(), true, true); } }
@AfterClass public static void cleanUp() { EditorHandler.getInstance().closeAll(false); ProjectExplorer pe = new ProjectExplorer(); pe.open(); for (Project p : pe.getProjects()) { org.jboss.reddeer.direct.project.Project.delete(p.getName(), true, true); } }