protected void findForward() {
if (fBuffer == null)
find();
else {
Node node = service2.findNext(fBuffer.getFindNode(),
fBuffer.getSearchFrom(), fBuffer.getId(), fBuffer.getDb(),
fBuffer.getContainer(), fBuffer.getSearchNodeType(),
fBuffer.getPattern(), true);
if (node != null) {
TreeItem selected = gotoDBContainer(node.getId(), node.getDb(),
node.getKey(), true, true);
history.add(selected);
btnBackward.setEnabled(true);
btnForward.setEnabled(false);
fBuffer.setFindNode(node);
} else {
boolean ok = MessageDialog.openConfirm(shell,
i18nFile.getText(I18nFile.FINDFORWARD),
i18nFile.getText(I18nFile.FINDAGAIN));
if (ok) {
Set<Node> nodes = service2.find(fBuffer.getSearchFrom(),
fBuffer.getId(), fBuffer.getDb(),
fBuffer.getContainer(),
fBuffer.getSearchNodeType(), fBuffer.getPattern(),
true);
if (!nodes.isEmpty()) {
Node node1 = nodes.iterator().next();
TreeItem selected = gotoDBContainer(node1.getId(),
node1.getDb(), node1.getKey(), true, true);
history.add(selected);
btnBackward.setEnabled(true);
btnForward.setEnabled(false);
fBuffer.setFindNode(node1);