use of com.cubrid.tool.editor.dialog.FindReplaceOption in project cubrid-manager by CUBRID.
the class TextEditorFindReplaceMediator method findPrevious.
/**
*
* Find previous searched string
*
* @return boolean
*/
public static boolean findPrevious() {
TextViewer st = getCurrentTextEditor();
if (st == null) {
return false;
}
String searchedStr = st.getTextWidget().getSelectionText();
if (searchedStr == null || searchedStr.trim().length() == 0) {
return false;
}
FindReplaceOption findReplaceOption = new FindReplaceOption();
findReplaceOption.setSearchedStr(searchedStr);
return findAndSelect(st.getTextWidget().getCaretOffset(), false, findReplaceOption) >= 0;
}
use of com.cubrid.tool.editor.dialog.FindReplaceOption in project cubrid-manager by CUBRID.
the class TextEditorFindReplaceMediator method findNext.
/**
*
* Find next searched string
*
* @return boolean
*/
public static boolean findNext() {
TextViewer st = getCurrentTextEditor();
if (st == null) {
return false;
}
String searchedStr = st.getTextWidget().getSelectionText();
if (searchedStr == null || searchedStr.trim().length() == 0) {
return false;
}
FindReplaceOption findReplaceOption = new FindReplaceOption();
findReplaceOption.setSearchedStr(searchedStr);
return findAndSelect(st.getTextWidget().getCaretOffset(), true, findReplaceOption) >= 0;
}
Aggregations