eclipse plugin: get notification on debug terminate
问题 Is there a way for an eclipse plugin to get a notification when user clicks on the "Terminate Debug" button? 回答1: You can call DebugPlugin.getDefault().addDebugEventListener(listener); to set up an IDebugEventSetListener . The DebugEvent passed to the handleDebugEvents method of the listener has TERMINATE as one of the event kinds. For example this handler is from the Ant plugin: @Override public void handleDebugEvents(DebugEvent[] events) { for (int i = 0; i < events.length; i++) {