Search in sources :

Example 6 with Disposable

use of org.picocontainer.Disposable in project intellij-plugins by JetBrains.

the class BaseTestCase method markLastListenerForCleanup.

public void markLastListenerForCleanup() {
    IDEtalkListener[] listeners = getBroadcasterImpl().getListeners();
    final IDEtalkListener toRemove = listeners[listeners.length - 1];
    disposeOnTearDown(new Disposable() {

        @Override
        public void dispose() {
            getBroadcaster().removeListener(toRemove);
        }
    });
}
Also used : Disposable(org.picocontainer.Disposable)

Aggregations

Disposable (org.picocontainer.Disposable)6 CodePointerEventProvider (jetbrains.communicator.core.impl.transport.CodePointerEventProvider)1 GetProjectsDataProvider (jetbrains.communicator.core.impl.transport.GetProjectsDataProvider)1 GetVFileContentsProvider (jetbrains.communicator.core.impl.transport.GetVFileContentsProvider)1 TextMessageEventProvider (jetbrains.communicator.core.transport.TextMessageEventProvider)1 Transport (jetbrains.communicator.core.transport.Transport)1 XmlResponseProvider (jetbrains.communicator.core.transport.XmlResponseProvider)1 UserPresence (jetbrains.communicator.core.users.UserPresence)1 BecomeAvailableXmlMessage (jetbrains.communicator.p2p.BecomeAvailableXmlMessage)1 MockXmlMessage (jetbrains.communicator.p2p.MockXmlMessage)1 MockXmlResponseProvider (jetbrains.communicator.p2p.MockXmlResponseProvider)1 WaitFor (jetbrains.communicator.util.WaitFor)1 Element (org.jdom.Element)1 Presence (org.jivesoftware.smack.packet.Presence)1