@Override public void inputChanged(Viewer v, Object oldInput, Object newInput) { /* * Set the viewer */ m_viewer = (TreeViewer) v; /* * Update the input */ m_input = null; if (newInput != null) { IProcedure proc = (IProcedure) newInput; /* * Set procId */ m_procId = proc.getProcId(); /* * Set the input */ m_input = new CallstackProcedureModel(m_procId, proc); /* * Subscribe to events */ if (oldInput == null) { ProcedureBridge.get().addProcedureStackListener(this); ProcedureBridge.get().addProcedureStatusListener(this); } } }
/** * ************************************************************************* Constructor * ************************************************************************ */ public StackModel(StackView view) { m_view = view; ProcedureBridge.get().addProcedureListener(this); if (s_mgr == null) { s_mgr = (ProcedureManager) ServiceManager.get(ProcedureManager.ID); } emptyModel(); }
@Override public void dispose() { ProcedureBridge.get().removeProcedureStackListener(this); ProcedureBridge.get().removeProcedureStatusListener(this); }