mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
minor vcs test tweaks
This commit is contained in:
@@ -381,15 +381,18 @@ public abstract class AbstractVcsTestCase {
|
||||
}
|
||||
|
||||
protected VirtualFile copyFileInCommand(final VirtualFile file, final VirtualFile newParent) {
|
||||
return copyFileInCommand(myProject, file, newParent);
|
||||
return copyFileInCommand(myProject, file, newParent, file.getName());
|
||||
}
|
||||
|
||||
public static VirtualFile copyFileInCommand(final Project project, final VirtualFile file, final VirtualFile newParent) {
|
||||
public static VirtualFile copyFileInCommand(final Project project,
|
||||
final VirtualFile file,
|
||||
final VirtualFile newParent,
|
||||
final String newName) {
|
||||
return new WriteCommandAction<VirtualFile>(project) {
|
||||
@Override
|
||||
protected void run(Result<VirtualFile> result) throws Throwable {
|
||||
try {
|
||||
result.setResult(file.copy(this, newParent, file.getName()));
|
||||
result.setResult(file.copy(this, newParent, newName));
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
Reference in New Issue
Block a user