private void deleteSession()
    {
        System.out.println("Deleting a complete session ...");
        
        // ---------------------------------------------------
        
        // get list of features FESVo IDs:
        int [] ids = this.loader.getFeaturesIDs();
        
        // convert into array of Integer:
        Integer [] idsInt = Utilities.toIntegerArray(ids);
        
        // create a an input dialog for users to select a horizon source id:
        Integer selectedSrc = (Integer) JOptionPane.showInputDialog(
                null, "Please select a feature (e.g. horizon) source ID:", "Horizons source", 
                JOptionPane.QUESTION_MESSAGE, null, idsInt, null);
        
        // exit if no source id was selected:
        if (selectedSrc == null)
            return;
            
        // [TEST] print user's selection:
        System.out.println("User selected: " + selectedSrc);
        
        // ---------------------------------------------------
        
        // get list of insertion type grouping effective time:
        ArrayList<DataTimestamp> timestamps = this.loader.getInsertionTypeGroupingEffectiveTimestamps(selectedSrc);
        
        // insert a "Baseline" timestamp
        timestamps.add(timestamps.size(), new DataTimestamp(this.src.srdsSrcID));
        
        // if need to reload; to be used in the loop:
        boolean reload = false;
        
        while (true){
            // create a an input dialog for users to select a timestamp:
            DataTimestamp ts = (DataTimestamp) JOptionPane.showInputDialog(
                    null, "Please select a session to completely delete:", "Timestamps of Data Input", 
                    JOptionPane.QUESTION_MESSAGE, null, timestamps.toArray(), this.selectedTimestamp);

            // exit if no source id was selected:
            if (ts == null){
                if (reload)
                    break;
                else
                    return; //exit
            }//if

            // [TEST] print user's selection:
            System.out.println("User selected: " + ts);

            // load and render only selected timestamp:
            // ----------------------------------------
            
            // clear FESVo:
            this.loader.clearFeaturesCache();
            
            // set requested timestamp with an option to load only alone:
            this.loader.setFeaturesTimestamp(ts, true);
            
            // set requested feature ID:
            this.loader.setFeaturesIDsToLoad(selectedSrc);
            
            // reload and render:
            this.renderer.reloadHorizons();
            
            // ----------------------------------------

            // verify with user:
            int ans = JOptionPane.showConfirmDialog(
                    null, 
                    "Is this the object you want to delete?", 
                    "Confirmation of deletion",
                    JOptionPane.YES_NO_OPTION,
                    JOptionPane.WARNING_MESSAGE);

            
            if (ans != JOptionPane.YES_OPTION){
                reload = true; // need to reload
                continue;
            }//if
            
            
            // [23.2.2013] check if user didn't sign in:
            if (this.userID == 0){
                this.userSignIn("You must sign in to complete this task. Please, enter your user ID.");

                // if user decided not to sign in, exit:
                if (this.userID == 0){
                    JOptionPane.showMessageDialog(
                            frame, 
                            "This task was not completed as you didn't sign in!", 
                            "Error!", 
                            JOptionPane.ERROR_MESSAGE);

                    break;
                } 
            }
            
            // delete if user confirms:
            this.loader.deleteHorizon(selectedSrc, ts, this.userID);
            
            // exit the loop:
            break;
        
        }//while
        
        // clear FESVo:
        this.loader.clearFeaturesCache();

        // set requested timestamp to latest:
        this.loader.setFeaturesTimestamp(null);

        // reload and render:
        this.renderer.reloadHorizons();
        
    }//deleteSession()