本文整理汇总了Java中com.intellij.util.EventDispatcher.removeListener方法的典型用法代码示例。如果您正苦于以下问题:Java EventDispatcher.removeListener方法的具体用法?Java EventDispatcher.removeListener怎么用?Java EventDispatcher.removeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.EventDispatcher
的用法示例。
在下文中一共展示了EventDispatcher.removeListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unregisterListener
import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
@Override
public <F extends Facet> void unregisterListener(@NotNull FacetTypeId<F> typeId, @NotNull ProjectWideFacetListener<? extends F> listener) {
final EventDispatcher<ProjectWideFacetListener> dispatcher = myDispatchers.get(typeId);
if (dispatcher != null) {
dispatcher.removeListener(listener);
}
}
示例2: removeListener
import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
@Override
public <F extends Facet> void removeListener(final Class<F> facetClass, final FacetPointerListener<F> listener) {
EventDispatcher<FacetPointerListener> dispatcher = myDispatchers.get(facetClass);
if (dispatcher != null) {
dispatcher.removeListener(listener);
}
}
示例3: remove
import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public void remove(Object key) {
synchronized (myLock) {
final EventListenerWrapperI listenerWrapper = myListenersMap.remove(key);
if (listenerWrapper != null) {
for (EventDispatcher<EventListenerWrapperI> dispatcher : myExistingMulticasters.values()) {
dispatcher.removeListener(listenerWrapper);
}
}
}
}
示例4: addListener
import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public <T extends EventListener> Runnable addListener(Class<T> clazz, T value) {
EventDispatcher<T> eventDispatcher = myListeners.computeIfAbsent(clazz, EventDispatcher::create);
eventDispatcher.addListener(value);
return () -> eventDispatcher.removeListener(value);
}