CommandStack deprecated method nottifyListeners(). [message #213278] |
Tue, 04 April 2006 19:04  |
Eclipse User |
|
|
|
Originally posted by: jsk_lam.hotmail.com
Hi,
I have the following code snippet:
public class DelegatingCommandStack extends CommandStack implements CommandStackListener
{
...
public void commandStackChanged(EventObject event) {
notifyListeners(); // DEPRECATED
}
}
The CommendStack#notifyListeners() method has been deprecated in Eclipse 3.1.
I couldn't find a replacement method to use. Has anyone had the solution for it?
Thanks
SL.
|
|
|
Re: CommandStack deprecated method nottifyListeners(). [message #213405 is a reply to message #213278] |
Wed, 05 April 2006 20:05  |
Eclipse User |
|
|
|
It may be deprecated, but with Eclipse API constraints it won't be removed
anytime soon.
A different pattern to get around it may be to use the delegating pattern
where your command stack contains an instance of CommandStack and redirects
all method calls to it.
Looking at the code below wouldn't that invoke an endless loop if
DelegatingCommandStack added a listener to itself?
-Steve
"sl" <jsk_lam@hotmail.com> wrote in message
news:e0ug10$mqu$1@utils.eclipse.org...
> Hi,
>
> I have the following code snippet:
>
> public class DelegatingCommandStack extends CommandStack implements
CommandStackListener
> {
> ...
> public void commandStackChanged(EventObject event) {
> notifyListeners(); // DEPRECATED
> }
> }
>
> The CommendStack#notifyListeners() method has been deprecated in Eclipse
3.1.
> I couldn't find a replacement method to use. Has anyone had the solution
for it?
>
> Thanks
> SL.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02684 seconds