TreeItem[] treeItems = tree.getSelection();
Point point = new Point(e.x, e.y);
TableItem selectedItem = table.getItem(point);
if (selectedItem != null) {
NodeType type = (NodeType) selectedItem.getData(NODE_TYPE);
if (type == NodeType.CONTAINER || type == NodeType.DATABASE
|| type == NodeType.SERVER) {
boolean find = false;
for (TreeItem treeItem : treeItems[0].getItems()) {
String treeText = treeItem.getText();
String tableText = selectedItem.getText(0);
if (treeText.equals(tableText)) {
find = true;
if (type == NodeType.CONTAINER
|| type == NodeType.DATABASE)
dbContainerTreeItemSelected(treeItem, false);
else if (type == NodeType.SERVER)
serverTreeItemSelected(treeItem, false);
history.add(treeItem);
btnBackward.setEnabled(true);
btnForward.setEnabled(false);
break;
}
}
if (!find)
MessageDialog.openInformation(shell,
i18nFile.getText(I18nFile.INFORMATION),
i18nFile.getText(I18nFile.NEWKEYFOUND)
+ text.getText());
} else {
dataProperties();
}
}
}
@Override
public void mouseDown(MouseEvent e) {
Point point = new Point(e.x, e.y);
TableItem selectedItem = table.getItem(point);
if (e.button == 3) {
if (selectedItem == null)
table.setMenu(menu_null);
else {
NodeType type = (NodeType) selectedItem
.getData(NODE_TYPE);
if (type == NodeType.ROOT)
table.setMenu(menu_null);
else if (type == NodeType.SERVER) {