aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Pospychala2012-08-02 07:46:45 (EDT)
committerJacek Pospychala2012-08-02 07:46:45 (EDT)
commit9f9e752b1db07a6ee14318813045c3bcbaa3db64 (patch)
tree2ff9b9abd36ea73a90c4e00ff6821f8bbf75c166
parent59ea559ad04c0d63b28e4b18d957348d7981384b (diff)
downloadorg.eclipse.pdt-9f9e752b1db07a6ee14318813045c3bcbaa3db64.zip
org.eclipse.pdt-9f9e752b1db07a6ee14318813045c3bcbaa3db64.tar.gz
org.eclipse.pdt-9f9e752b1db07a6ee14318813045c3bcbaa3db64.tar.bz2
NPE
-rw-r--r--tests/org.eclipse.php.ui.tests/src/org/eclipse/php/ui/tests/contentassist/ContentAssistTests.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/org.eclipse.php.ui.tests/src/org/eclipse/php/ui/tests/contentassist/ContentAssistTests.java b/tests/org.eclipse.php.ui.tests/src/org/eclipse/php/ui/tests/contentassist/ContentAssistTests.java
index a3cac2e..5dd3e0f 100644
--- a/tests/org.eclipse.php.ui.tests/src/org/eclipse/php/ui/tests/contentassist/ContentAssistTests.java
+++ b/tests/org.eclipse.php.ui.tests/src/org/eclipse/php/ui/tests/contentassist/ContentAssistTests.java
@@ -195,7 +195,14 @@ public class ContentAssistTests extends AbstractPDTTTest {
}
protected static String executeAutoInsert(int offset) {
- StructuredTextViewer viewer = fEditor.getTextViewer();
+ StructuredTextViewer viewer = null;
+ int tries = 3;
+ while ((tries-- > 0) && ((viewer = fEditor.getTextViewer()) == null)) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ }
+ }
StyledText textWidget = viewer.getTextWidget();
textWidget.setCaretOffset(offset);
viewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);