Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.eclipse.pde.ds.internal.annotations.tests;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
Expand Down Expand Up @@ -64,9 +63,10 @@ public IStatus runInWorkspace(IProgressMonitor m) throws CoreException {
Path projectLocation = Files.createDirectories(wsRoot.resolve(project.getName()));
copyResources(bundle, entry.getValue(), projectLocation);
Files.createDirectories(projectLocation.resolve("OSGI-INF"));
File projectFile = projectLocation.resolve("test.project").toFile();
if (projectFile.isFile()) {
projectFile.renameTo(projectLocation.resolve(".project").toFile());
Path projectFile = projectLocation.resolve("test.project");
if (Files.isRegularFile(projectFile)) {
Files.move(projectFile, projectLocation.resolve(".project"),
StandardCopyOption.REPLACE_EXISTING);
}
} catch (IOException e) {
throw new CoreException(Status.error("Error copying test project content.", e));
Expand Down Expand Up @@ -96,8 +96,8 @@ public void afterAll(ExtensionContext context) throws Exception {
Job wsJob = new WorkspaceJob("Test Workspace Cleanup") {
@Override
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
for (String projectId : PROJECTS.keySet()) {
IProject project = wsRoot.getProject("ds.annotations." + projectId);
for (String projectName : PROJECTS.keySet()) {
IProject project = wsRoot.getProject(projectName);
if (project.exists()) {
project.delete(true, true, monitor);
}
Expand Down
Loading