/** * Removes the given participant from the list of registered participants. * Has no effect if an identical participant is not already registered. * * @param participant the participant to remove */ private synchronized void removeSourceLookupParticipant(ISourceLookupParticipant participant) { if (fParticipants.remove(participant)) { participant.dispose(); } }
@Override public synchronized void dispose() { ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); launchManager.removeLaunchConfigurationListener(this); launchManager.removeLaunchListener(this); for (ISourceLookupParticipant participant : fParticipants) { //director may also be a participant if(participant != this) { participant.dispose(); } } fParticipants.clear(); if (fSourceContainers != null) { for (int i = 0; i < fSourceContainers.length; i++) { fSourceContainers[i].dispose(); } } fSourceContainers = null; fResolvedElements = null; }