Author: dgolovin
Date: 2011-12-09 20:03:53 -0500 (Fri, 09 Dec 2011)
New Revision: 37199
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
https://issues.jboss.org/browse/JBIDE-10351 test failure in
org.jboss.tools.jsf.vpe.jsf.test
resolved
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 2011-12-10
00:40:07 UTC (rev 37198)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java 2011-12-10
01:03:53 UTC (rev 37199)
@@ -181,11 +181,10 @@
for (int j = 0; j < insertedString.length(); j++) {
styledText.setCaretOffset(offset + j);
styledText.insert(String.valueOf(insertedString.charAt(j)));
- TestUtil.delay();
}
TestUtil.delay(VpeController.DEFAULT_UPDATE_DELAY_TIME * 2); // ensure that vpe is
started to update
- TestUtil.waitForJobs();
+ TestUtil.waitForIdle();
assertNotNull(xulRunnerEditor.getSelectedElement());
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-12-10
00:40:07 UTC (rev 37198)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-12-10
01:03:53 UTC (rev 37199)
@@ -2118,7 +2118,8 @@
// node is created, see JBIDE-5105
visualEditor.reinitDesignMode();
visualBuilder.clearSelectionRectangle();
- //selectionManager = null;
+ // this is required because fullRefresh cannot be interrupded by messages from OS
queue
+ selectionManager = null;
IDOMModel sourceModel = (IDOMModel) getModel();
if (sourceModel != null) {
IDOMDocument sourceDocument = sourceModel.getDocument();
@@ -2134,6 +2135,8 @@
selectionManager = new SelectionManager(pageContext, sourceEditor,
visualSelectionController);
+ // selection should be restored after full refresh
+ selectionManager.refreshVisualSelection();
keyEventHandler = new KeyEventManager(sourceEditor, domMapping,
pageContext);