@@ -0,0 +1,1312 @@
+/******************************************************************************* %0A * Copyright (c) 2016 Red Hat, Inc. %0A * Distributed under license by Red Hat, Inc. All rights reserved. %0A * This program is made available under the terms of the %0A * Eclipse Public License v1.0 which accompanies this distribution, %0A * and is available at http://www.eclipse.org/legal/epl-v10.html %0A * %0A * Contributors: %0A * Red Hat, Inc. - initial API and implementation %0A ******************************************************************************/%0Apackage org.jboss.reddeer.workbench.condition;%0A%0Aimport org.jboss.reddeer.common.condition.AbstractWaitCondition;%0Aimport org.jboss.reddeer.workbench.impl.editor.TextEditor;%0A%0A/**%0A * Check if editor contains specified text%0A * @author rawagner%0A *%0A */%0Apublic class TextEditorContainsText extends AbstractWaitCondition%7B%0A%09%0A%09private String text;%0A%09private TextEditor editor;%0A%09%0A%09/**%0A%09 * Default constructor%0A%09 * @param editor to check%0A%09 * @param text editor should contain%0A%09 */%0A%09public TextEditorContainsText(TextEditor editor, String text) %7B%0A%09%09this.editor = editor;%0A%09%09this.text = text;%0A%09%7D%0A%0A%09@Override%0A%09public boolean test() %7B%0A%09%09return editor.getText().contains(text);%0A%09%7D%0A%0A%09@Override%0A%09public String description() %7B%0A%09%09return %22Editor '%22+editor.getTitle()+%22' contains text '%22+text+%22'%22;%0A%09%7D%0A%0A%7D%0A

Implement TextEditorHasText condition. Fixes #1485 (#1485)