@Override public synchronized void dispose() { super.dispose(); }};
/** * Dispatches a change event. * * @param event */ protected void dispatchChange(DebugEventHandler handler, DebugEvent event) { handler.handleChange(event); }
/** * Dispatches a create event. * * @param event */ protected void dispatchCreate(DebugEventHandler handler, DebugEvent event) { handler.handleCreate(event); }
/** * Dispatches a suspend event. Subclasses may override. * * @param event */ protected void dispatchSuspend(DebugEventHandler handler, DebugEvent event) { // stop timer, if any synchronized (this) { TimerTask task = fTimerTasks.remove(event.getSource()); if (task != null) { task.cancel(); } } DebugEvent resume = null; synchronized (this) { resume = fPendingSuspends.remove(event.getSource()); } if (resume == null) { handler.handleSuspend(event); } else { handler.handleLateSuspend(event, resume); } }
/** * Dispatches a resume event. By default, if the resume is for an evaluation * or a step, a timer is started to update the event source if the step or * evaluation takes more than 500ms. Otherwise the source is refreshed. * Subclasses may override. * * @param event */ protected void dispatchResume(DebugEventHandler handler, DebugEvent event) { if (event.isEvaluation() || event.isStepStart()) { // start a timer to update if the corresponding suspend does not // come quickly synchronized (this) { if (!isDisposed()) { PendingSuspendTask task = new PendingSuspendTask(handler, event); fTimerTasks.put(event.getSource(), task); fTimer.schedule(task, 500); } } if (!isDisposed()) { handler.handleResumeExpectingSuspend(event); } } else { handler.handleResume(event); } }
/** * Dispatches an unknown event. * * @param event */ protected void dispatchOther(DebugEventHandler handler, DebugEvent event) { handler.handleOther(event); }
/** * Fires the given delta, unless this handler has been disposed. * * @param delta the delta to fire in the backing model proxy */ protected void fireDelta(IModelDelta delta) { AbstractModelProxy modelProxy = getModelProxy(); if (modelProxy != null) { modelProxy.fireModelChanged(delta); } }
/** * Fires a model delta to indicate that the launch manager should be refreshed. * Subclasses should override individual handle events to provide deltas that * better reflect the actual change in the model. * * @param event the event that triggered the root refresh */ protected void refreshRoot(DebugEvent event) { ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.CONTENT); fireDelta(delta); }
@Override public synchronized void dispose() { fLastTopFrame.clear(); fThreadQueue.clear(); super.dispose(); }
@Override public synchronized void dispose() { super.dispose(); fTimer.cancel(); fTimerTasks.clear(); DebugPlugin.getDefault().removeDebugEventListener(this); for (int i = 0; i < fHandlers.length; i++) { DebugEventHandler handler = fHandlers[i]; handler.dispose(); } }