Author: mareshkau
Date: 2008-07-21 09:00:18 -0400 (Mon, 21 Jul 2008)
New Revision: 9192
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java
Log:
JBIDE-2219
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java 2008-07-21
10:57:38 UTC (rev 9191)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java 2008-07-21
13:00:18 UTC (rev 9192)
@@ -20,6 +20,8 @@
import org.eclipse.swt.custom.StyledText;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
@@ -192,9 +194,12 @@
XulRunnerEditor xulRunnerEditor = controller.getXulRunnerEditor();
assertNotNull(xulRunnerEditor);
- IDOMDocument document = ((IDOMModel) NodesManagingUtil
- .getStructuredModel(controller.getSourceEditor()))
- .getDocument();
+ IStructuredModel model = null;
+ IDOMDocument document =null;
+ try {
+ model = StructuredModelManager.getModelManager()
+ .getExistingModelForRead(controller.getSourceEditor().getTextViewer().getDocument());
+ document = ((IDOMModel)model).getDocument();
for (String tag : ELEMENTS) {
@@ -233,6 +238,12 @@
}
}
+ } finally {
+ if(model!=null) {
+ model.releaseFromRead();
+ }
+ }
+
// check exception
if (getException() != null) {
throw getException();
Show replies by date