* Initialize event requests and state from the underlying VM. This method
* is synchronized to ensure that we do not start to process an events from
* the target until our state is initialized.
*/
protected synchronized void initialize() {
setEventDispatcher(new EventDispatcher(this));
setRequestTimeout(Platform.getPreferencesService().getInt(
JDIDebugPlugin.getUniqueIdentifier(),
JDIDebugModel.PREF_REQUEST_TIMEOUT,
JDIDebugModel.DEF_REQUEST_TIMEOUT,
null));
initializeRequests();
initializeState();
initializeBreakpoints();
getLaunch().addDebugTarget(this);
DebugPlugin plugin = DebugPlugin.getDefault();
plugin.addDebugEventListener(this);
fireCreationEvent();
// begin handling/dispatching events after the creation event is handled
// by all listeners
plugin.asyncExec(new Runnable() {
public void run() {
EventDispatcher dispatcher = getEventDispatcher();
if (dispatcher != null) {
Thread t = new Thread(
dispatcher,
JDIDebugModel.getPluginIdentifier()
+ JDIDebugModelMessages.JDIDebugTarget_JDI_Event_Dispatcher);