java - How to set the input for the UI part in eclipse e4? -


I am using the eclipse e4 application I use EventBroker to pass values ​​from one part to another I am here. If many parts (like a tab) are open, then how to pass the values ​​of that part (tab) that are currently selected? I'm using @UIEventTopic to get the value for the part. But the problem is that the values ​​are duplicated in all tabs. In other words, I'm trying to show different Jeffrechts in different tabs, but the last tab The chart is duplicated in

Can someone suggest some suggestions to me?

Thanks

Whatever the event broker is always working with the event To broadcast, you can not use it to send a special item

If you are in the handler then you can get the current part in the @excute method and directly in your class. Value can be set - like something:

  @Execute Public Nil Execution (@ nominated (IServiceConstants.ACTIVE_PART) MPart activePart) {Object C = activePart.getObject (); If (examples of part of Mystals) {(MyClass part) .setValue (xxxx); }}   

Update:

If you are in any other part, use EPartService to get an active part:

>  @ Inject EPartService partService; ... MPart activePart = partService.getActivePart (); Object part = activePart.getObject (); If (examples of part of Mystals) {(MyClass part) .setValue (xxxx); }   

You can also use EPartService.findPart ("part id") to search for a part with the given ID.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -