public void delete(){
        checkEnabledMenuAction();
        if(!deleteItem.isEnabled()){ return; }
        
        TreeItem item = getCurrentItem();
        TreeItem parentItem = (TreeItem) item.getParent();
        int index = parentItem.getIndex(item);
            
        parentItem.removeChild(item);
        //removeItem(item);
        
        int count = parentItem.getChildCount();
        if(count == 0){
            setCurrentItem(parentItem);
        }
        else{
            if(index == count){
                setCurrentItem((TreeItem) parentItem.getChildAt(index-1));
            }
            else{
                setCurrentItem((TreeItem) parentItem.getChildAt(index));
            }
        }
        //if(parentItem.ch)
        //setCurrentItem(rootItem);
        
        checkEnabledMenuAction();
        
        SaveMgr.requestSaveEnabled();
    }