Author: yzhishko
Date: 2010-04-16 10:02:57 -0400 (Fri, 16 Apr 2010)
New Revision: 21533
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6189 - open on test fixed
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java 2010-04-16
13:57:04 UTC (rev 21532)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java 2010-04-16
14:02:57 UTC (rev 21533)
@@ -31,13 +31,13 @@
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.vpe.ui.test.OpenOnUtil;
import org.jboss.tools.vpe.ui.test.ProjectsLoader;
-import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
/**
* @author mareshkau
*
*/
+@SuppressWarnings("restriction")
public class JBIDE4509Test extends VpeTest{
public JBIDE4509Test(String name) {
@@ -141,18 +141,16 @@
*
* @author mareshkau
*/
- @SuppressWarnings("restriction")
private static final void checkOpenOnFromJarFile(final String jarFilePath,final String
jarEntryPath,
final int line, final int position,final String expectedResult) throws Throwable {
+
IProject project = ProjectsLoader.getInstance()
.getProject(JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME);
IJavaProject javaProject = JavaCore.create(project);
-
- IFile jarArchive = (IFile) project.findMember(jarFilePath);
-
- IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(jarArchive);
-
- JarPackageFragmentRoot jarRoot = (JarPackageFragmentRoot) root;
+
+ IPackageFragmentRoot root =
javaProject.getPackageFragmentRoot(project.getLocation().toString()+ "/"
+jarFilePath); //$NON-NLS-1$
+
+ JarPackageFragmentRoot jarRoot = (JarPackageFragmentRoot) root;
JarEntryFile fileInJar = new JarEntryFile(jarEntryPath);
fileInJar.setParent(jarRoot);
JarEntryEditorInput jarEditorInput = new JarEntryEditorInput(fileInJar);
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java 2010-04-16
13:57:04 UTC (rev 21532)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java 2010-04-16
14:02:57 UTC (rev 21533)
@@ -119,7 +119,6 @@
.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertEquals(
"Active page should be ", openedOnFileName,
activeEditor.getEditorInput().getName()); //$NON-NLS-1$
-
}
private static StructuredTextEditor findStructEditor (MultiPageEditorPart part,
IEditorInput input){