Author: yradtsevich
Date: 2009-04-15 07:59:15 -0400 (Wed, 15 Apr 2009)
New Revision: 14755
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
Log:
Code refactored.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java 2009-04-15
10:22:15 UTC (rev 14754)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java 2009-04-15
11:59:15 UTC (rev 14755)
@@ -73,32 +73,4 @@
throw getException();
}
}
-
- /**
- * Opens specified file in VPE editor
- *
- * @param projectName the name of the project
- * @param fileName the name of the file
- *
- * @return VpeController
- * @throws Throwable
- */
- private VpeController openInVpe(String projectName, String fileName) throws Throwable {
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(fileName,
- projectName);
- assertNotNull("Could not open specified file. componentPage = " +
fileName//$NON-NLS-1$
- + ";projectName = " + projectName, file);//$NON-NLS-1$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input); //$NON-NLS-1$
-
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
-
- VpeController vpeController = TestUtil.getVpeController(part);
-
- return vpeController;
- }
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2009-04-15
10:22:15 UTC (rev 14754)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2009-04-15
11:59:15 UTC (rev 14755)
@@ -323,4 +323,32 @@
}
}
}
+
+ /**
+ * Opens specified file in the VPE editor.
+ *
+ * @param projectName the name of the project
+ * @param fileName the name of the file
+ *
+ * @return VpeController
+ * @throws Throwable
+ */
+ protected VpeController openInVpe(String projectName, String fileName)
+ throws Throwable {
+ // get test page path
+ final IFile file =
+ (IFile) TestUtil.getComponentPath(fileName, projectName);
+ assertNotNull("Could not open specified file." //$NON-NLS-1$
+ + " componentPage = " + fileName //$NON-NLS-1$
+ + ";projectName = " + projectName, file); //$NON-NLS-1$
+
+ final IEditorInput input = new FileEditorInput(file);
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get the editor
+ final JSPMultiPageEditor part = openEditor(input);
+
+ final VpeController vpeController = TestUtil.getVpeController(part);
+ return vpeController;
+ }
}