Author: dmaliarevich
Date: 2012-03-28 07:41:03 -0400 (Wed, 28 Mar 2012)
New Revision: 39865
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/VpeTest.java
Log:
https://issues.jboss.org/browse/JBIDE-11360 -- added assertion check for SourceDocument.
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/VpeTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/VpeTest.java 2012-03-28
11:37:40 UTC (rev 39864)
+++
trunk/vpe/tests/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/VpeTest.java 2012-03-28
11:41:03 UTC (rev 39865)
@@ -422,7 +422,13 @@
* @return
*/
protected Element findSourceElementById(VpeController controller, String elementId) {
- return getSourceDocument(controller).getElementById(elementId);
+ /*
+ *
https://issues.jboss.org/browse/JBIDE-11360
+ * Check that SourceDocument is found.
+ */
+ Document document = getSourceDocument(controller);
+ assertNotNull("SourceDocument is not found.", document); //$NON-NLS-1$
+ return document.getElementById(elementId);
}
/**