Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2004-10-12 17:28:33 +0000
committerKai Maetzel2004-10-12 17:28:33 +0000
commit4a504f7ea9442a831c0c137b12d668fcb84b3576 (patch)
treebff49d4a1ce4f8113212f79c38008b8051f18921 /org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java
parent538567a1f4c5dcbfa0a1b1659113bd17a8e3abd3 (diff)
downloadeclipse.platform.text-4a504f7ea9442a831c0c137b12d668fcb84b3576.tar.gz
eclipse.platform.text-4a504f7ea9442a831c0c137b12d668fcb84b3576.tar.xz
eclipse.platform.text-4a504f7ea9442a831c0c137b12d668fcb84b3576.zip
tests for files in linked folders
Diffstat (limited to 'org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java')
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java25
1 files changed, 15 insertions, 10 deletions
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java
index 725029d637b..59d3984aba0 100644
--- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java
+++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java
@@ -101,23 +101,28 @@ public class ResourceHelper {
return file;
}
- public static IFile createLinkedFile(IContainer container, IPath linkedFilePath, File linkTarget) throws CoreException {
- IFile iFile= container.getFile(linkedFilePath);
- iFile.createLink(new Path(linkTarget.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+ public static IFile createLinkedFile(IContainer container, IPath linkPath, File linkedFileTarget) throws CoreException {
+ IFile iFile= container.getFile(linkPath);
+ iFile.createLink(new Path(linkedFileTarget.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
return iFile;
-
}
- public static IFile createLinkedFile(IContainer container, IPath filePath, Plugin plugin, IPath linkPath) throws CoreException {
- IFile iFile= container.getFile(filePath);
- File file= FileTool.getFileInPlugin(plugin, linkPath);
+ public static IFile createLinkedFile(IContainer container, IPath linkPath, Plugin plugin, IPath linkedFileTargetPath) throws CoreException {
+ File file= FileTool.getFileInPlugin(plugin, linkedFileTargetPath);
+ IFile iFile= container.getFile(linkPath);
iFile.createLink(new Path(file.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
return iFile;
}
- public static IFolder createLinkedFolder(IContainer container, IPath folderPath, Plugin plugin, IPath linkPath) throws CoreException {
- IFolder iFolder= container.getFolder(folderPath);
- File file= FileTool.getFileInPlugin(plugin, linkPath);
+ public static IFolder createLinkedFolder(IContainer container, IPath linkPath, File linkedFolderTarget) throws CoreException {
+ IFolder folder= container.getFolder(linkPath);
+ folder.createLink(new Path(linkedFolderTarget.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+ return folder;
+ }
+
+ public static IFolder createLinkedFolder(IContainer container, IPath linkPath, Plugin plugin, IPath linkedFolderTargetPath) throws CoreException {
+ File file= FileTool.getFileInPlugin(plugin, linkedFolderTargetPath);
+ IFolder iFolder= container.getFolder(linkPath);
iFolder.createLink(new Path(file.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
return iFolder;
}

Back to the top