Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 115372 - ListenerList in org.eclipse.core.commands - consider using a core.runtime version
Summary: ListenerList in org.eclipse.core.commands - consider using a core.runtime ver...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Douglas Pollock CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 91598 (view as bug list)
Depends on: 94156 117519
Blocks: 49497
  Show dependency tree
 
Reported: 2005-11-07 14:29 EST by Susan McCourt CLA
Modified: 2005-12-14 15:47 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2005-11-07 14:29:36 EST
Just noticed that the jface.util.ListenerList has been deprecated in favor of 
a new core.commands.util.ListenerList.  If the JFace class is to be 
deprecated, wouldn't this be a good time for clients to start using a common 
runtime ListenerList instead of introducing new API in another package?  It 
seems in bug #94156 that we are close to having an API ListenerList supported 
by the runtiem plugin.

This does mean that ListenerList would have to be in the "approved runtime 
classes" that JFace can use.
Comment 1 Douglas Pollock CLA 2005-11-07 14:36:31 EST
Nick: For consideration when the runtime split thing happens.  
Comment 2 John Arthorne CLA 2005-11-22 10:13:29 EST
The runtime ListenerList API class is now available.  It is found in org.eclipse.equinox.common, which encapsulates almost all of JFace's external dependencies.  Note that the runtime ListenerList provides the option of comparing listeners using equality or identity, and that it uses copy on write to ensure thread safety.  I.e., it will be slower to modify than the current commands ListenerList, but faster to access. This trade-off makes sense for listener lists that are infrequently changed but frequently used.
Comment 3 Douglas Pollock CLA 2005-11-22 16:55:12 EST
I have opened Bug 117519, which covers some missing API from org.eclipse.core.runtime.ListenerList.

There is now EventManager, which is a convenience superclass for handling listeners.  ListenerList in org.eclipse.core.commands.util is now deprecated, and should be removed before 3.2 ships.

All classes in the workbench have been switched to using EventManager or org.eclipse.core.runtime.ListenerList.
Comment 4 Douglas Pollock CLA 2005-12-13 14:42:22 EST
Verified in I20051213-0010.  There are a couple of issues outstanding: the clear() method needs to be removed from the subclasses, as it's now generally available in the superclass; and the ListenerList in org.eclipse.core.commands needs to be deleted (waiting for others to finish adapting).
Comment 5 Susan McCourt CLA 2005-12-14 15:47:53 EST
*** Bug 91598 has been marked as a duplicate of this bug. ***