Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » CommandStack deprecated method nottifyListeners().
CommandStack deprecated method nottifyListeners(). [message #213278] Tue, 04 April 2006 19:04 Go to next message
Eclipse UserFriend
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 Go to previous message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
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.
>
>
Previous Topic:Label is not painted when setBounds is calles
Next Topic:Adding header/footer when printing
Goto Forum:
  


Current Time: Fri Jan 24 04:54:18 GMT 2025

Powered by FUDForum. Page generated in 0.05359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top