Reload the postwindowclose () method in applicationworkbenchwindowadvisor
@ Override
Public void postwindowclose (){
// Todo auto-generated method stub
// Super. postwindowclose ();
Boolean openconfirm = messagedialog. openconfirm (null, messages. applicationworkbenchwindowadvisor_title, messages. applicationworkbenchwindowadvisor_content );
If (openconfirm)
{
Location instancelocation = platform. getinstancelocation ();
URL path = instancelocation. geturl ();
// Close the database connection
Sqlitedbhelper. getsqliteinstace (). Close ();
File workspace = new file (path. getpath (); // + file. Separator + sqlitedbhelper. db_file_name
// Delete Program Temporary running record
Deletefile (workspace );
}
}
// Delete folders and folder content
Public void deletefile (File targetfile)
{
If (targetfile. isdirectory ())
{
File [] list = targetfile. listfiles ();
For (INT I = 0; I <list. length; I ++ ){
Deletefile (list [I]);
}
//
Targetfile. deleteonexit ();
}
Else
Targetfile. deleteonexit ();
}