Skip to content

Commit

Permalink
Try making pdom files on the same vdisk as the projects
Browse files Browse the repository at this point in the history
This isn't a suitable thing to merge, but I simply don't understand
why this is failing on GH.
  • Loading branch information
jonahgraham committed Oct 26, 2022
1 parent 9dc67ad commit 241fd24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
import org.eclipse.cdt.internal.core.pdom.CModelListener;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;

import junit.framework.AssertionFailedError;
Expand Down Expand Up @@ -111,13 +112,15 @@ protected void deleteOnTearDown(File file) {
}

protected File createTempFile(String prefix, String suffix) throws IOException {
File file = File.createTempFile(prefix, suffix);
File file = File.createTempFile(prefix, suffix,
ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile());
filesToDeleteOnTearDown.add(file);
return file;
}

protected File nonExistentTempFile(String prefix, String suffix) {
File file = new File(System.getProperty("java.io.tmpdir"), prefix + System.currentTimeMillis() + suffix);
File file = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile(),
prefix + System.currentTimeMillis() + suffix);
filesToDeleteOnTearDown.add(file);
return file;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ protected void deleteOnTearDown(File file) {
}

protected File createTempFile(String prefix, String suffix) throws IOException {
File file = File.createTempFile(prefix, suffix);
File file = File.createTempFile(prefix, suffix,
ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile());
filesToDeleteOnTearDown.add(file);
return file;
}

protected File nonExistentTempFile(String prefix, String suffix) {
File file = new File(System.getProperty("java.io.tmpdir"), prefix + System.currentTimeMillis() + suffix);
File file = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile(),
prefix + System.currentTimeMillis() + suffix);
filesToDeleteOnTearDown.add(file);
return file;
}
Expand Down

0 comments on commit 241fd24

Please sign in to comment.