How to Call Eclipse F5 Refresh Programmatically after Page Closes
===

I have been trying to call refresh (F5) programmatically in eclipse and get a NotHandledException, handler not found error.  Help would be much appreciated.

In my class: NewPreferencePage extends PreferencePage  implements IWorkbenchPreferencePage
I have the following code:


@Override        
public void dispose() {
     
        super.dispose();

        final String COMMAND_ID = "org.eclipse.ui.file.refresh";
        IHandlerService handlerService = (IHandlerService)   
                PlatformUI.getWorkbench().getService(IHandlerService.class);

        try {
           handlerService.executeCommand(COMMAND_ID,null);
        } catch (ExecutionException ex) {
           ex.printStackTrace();
        } catch (NotDefinedException ex) {
           ex.printStackTrace();
        } catch (NotEnabledException ex) {
           ex.printStackTrace();
        } catch (NotHandledException ex) {
           ex.printStackTrace();
        }
    }
}