Author: vyemialyanchyk
Date: 2008-10-16 06:37:28 -0400 (Thu, 16 Oct 2008)
New Revision: 10875
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestUtilsCommon.java
Log:
refactoring for JBIDE-2077
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestUtilsCommon.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestUtilsCommon.java 2008-10-16
10:31:27 UTC (rev 10874)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestUtilsCommon.java 2008-10-16
10:37:28 UTC (rev 10875)
@@ -203,17 +203,22 @@
public List<IPath> copyLibs(IProject project, IJavaProject javaProject,
File res) throws CoreException {
+ return copyLibs2(project, javaProject,
+ res.getAbsolutePath() + File.separator + TestUtilsCommon.LIB_FOLDER);
+ }
+
+ public List<IPath> copyLibs2(IProject project, IJavaProject javaProject,
+ String absolutePath) throws CoreException {
IFolder dst = project.getFolder(TestUtilsCommon.LIB_FOLDER);
if (!dst.exists()) {
dst.create(false, true, null);
javaProject.getPackageFragmentRoot(dst);
}
- File libFolder = new File(res.getAbsolutePath()
- + "/" + TestUtilsCommon.LIB_FOLDER); //$NON-NLS-1$
+ File libFolder = new File(absolutePath);
if (!libFolder.exists()) {
String out = NLS.bind(
ConsoleTestMessages.MappingTestProject_folder_not_found,
- res.getAbsolutePath() + "/" + TestUtilsCommon.LIB_FOLDER); //$NON-NLS-1$
+ absolutePath);
throw new RuntimeException(out);
}
List<IPath> libs = new ArrayList<IPath>();