private void showStatementInfo(TreePath treePath) {
        if(treePath != null) {
            TreeNode selectedNode = (TreeNode) treePath.getLastPathComponent();
            
            /* Get statement from the node which has been selected and show a 
             * relevent dialog */
            if(selectedNode instanceof IncludeNode) { // Include node
                StatementInfoDialog.showDialog(
                        this, ((IncludeNode) selectedNode).getIncludeDirective());
                
            }else if(selectedNode instanceof LabelNode) { // Label node
                StatementInfoDialog.showDialog(
                        this, ((LabelNode) selectedNode).getLabel());
                
            }else if(selectedNode instanceof MacroNode) { // Macro node
                StatementInfoDialog.showDialog(
                        this, ((MacroNode) selectedNode).getMacro());
                
            }else if(selectedNode instanceof ErrorNode) { // Error node
                // Displays a different dialog for errors
                ErrorInfoDialog.showDialog(
                        this, ((ErrorNode) selectedNode).getError());
            }
        }
    }