Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » IEventBroker inside of the LifeCycle?
IEventBroker inside of the LifeCycle? [message #1008635] Wed, 13 February 2013 11:19 Go to next message
Alex Kipling is currently offline Alex Kipling
Messages: 250
Registered: July 2012
Senior Member
Hello!
I tried to use the IEventBroker inside of the LifeCycleManader, to know about

But my trigger is never executed when the application windows is shown.

Why doesn't it work? Any Ideas?

    @PostConstruct
    void postConstruct(final IEclipseContext context) {

        IEventBroker broker = context.get(IEventBroker.class);
        broker.subscribe(UIEvents.UILifeCycle.BRINGTOTOP, new EventHandler() {
            @Override
            public void handleEvent(Event event) {
                Shell shell = context.get(Shell.class);
                System.out.println("Bringtop");
            }
        });
    }
Re: IEventBroker inside of the LifeCycle? [message #1009248 is a reply to message #1008635] Thu, 14 February 2013 18:52 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 187
Registered: January 2012
Senior Member

The life cycle manager uses a separate set of annotations. See:

http://wiki.eclipse.org/Eclipse4/RCP/Lifecycle

Brian,


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: IEventBroker inside of the LifeCycle? [message #1009730 is a reply to message #1009248] Fri, 15 February 2013 15:51 Go to previous messageGo to next message
Alex Kipling is currently offline Alex Kipling
Messages: 250
Registered: July 2012
Senior Member
I am aware of that, but there is no BRINGTOTOP annotation among of them?
Re: IEventBroker inside of the LifeCycle? [message #1009741 is a reply to message #1009730] Fri, 15 February 2013 16:09 Go to previous message
Brian de Alwis is currently offline Brian de Alwis
Messages: 187
Registered: January 2012
Senior Member

My apologies -- I thought your trigger was referring to your postConstruct() method not being fired.

If you mean BRINGTOTOP being fired, then no, it is only fired by a call to EModelService.bringToTop().

You probably want to listen for UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Window icons in several sizes
Next Topic:Eclipse Service with DI
Goto Forum:
  


Current Time: Tue Sep 16 05:11:27 GMT 2014

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

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