if (obj instanceof FolderListNode)
{
if ((iwp instanceof DBDataView) || (iwp instanceof SearchView))
{
// Get the FolderDescrNode and open the editor
FolderListNode fld = ((FolderListNode) obj);
if (Application.getLock(fld.getDescr()))
{
page.openEditor(fld, FolderListEditor.ID);
}
}
}
else
{
if (obj instanceof DataPathNode)
{
// Open datapath editor
DataPathNode dnp = (DataPathNode) obj;
DataPathTitleNode dptn = (DataPathTitleNode) dnp.getParent();
dptn.addChild(dnp);
page.openEditor(dptn, DataPathEditor.ID);
// Update the tree view, but does not refresh the visible parts.
if (iwp instanceof DBStructView)
{
((DBStructView) iwp).getTree().refresh(dptn, true);
}
}
else
{
if (obj instanceof ListDescrNode)
{
if (iwp instanceof DBStructView)
{
// Get the ListDescrNode and open the editor
ListDescrNode fnd = ((ListDescrNode) obj);
if (Application.getLock(fnd.getDescr()))
{
page.openEditor(fnd, ListDescrEditor.ID);
}
}
}
else
{
if (obj instanceof EnumItemListNode)
{
// Open the EnumItem list editor
if (iwp instanceof DBDataView)
{
// Get the FolderDescrNode and open the editor
EnumItemListNode fld = ((EnumItemListNode) obj);
if (Application.getLock(fld.getDescr()))
{
page.openEditor(fld, EnumItemListEditor.ID);
}
}
}