@sathyamoorthi all of that code inside of handleFileCloseAll needs to move to the new function including the prompt.  Alternately you could create a new command (e.g. FILE_CLOSE_DOCUMENT_LIST) and pass the list in with the command data.  That might be easier and less code. You can invoke that command from your extension and have the command handler call a function that both it and handleFileCloseAll can call (passing in the commandData).  

I think you may need to add another function to DocumentManager to handle closing of files from a list.  You will need to check that if you're closing the currently open document that you clear the current one from the editor and handle closing all of the files in the list from the working set.