if (obj instanceof FolderDescrNode)
{
if (iwp instanceof DBStructView)
{
// Get the FolderDescrNode and open the editor
FolderDescrNode fnd = (FolderDescrNode) obj;
if (Application.getLock(fnd.getDescr()))
{
page.openEditor(fnd, FolderDescrEditor.ID);
}
}
}
else
{
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);
}
}
}