How do you communicate between eclipse declarative services and Views (ContentProviders)

后端 未结 2 838
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 17:57

Say you have an eclipse plugin with various views, these views should display data from some OSGi bundle that pushes data to the Views. Rather than have every view communicate

2条回答
  •  野的像风
    2021-02-10 19:02

    One solution is to use a Singleton, and have one, or both, of the Application and Facade register with that Singleton.

    However, I really don't like the idea of throwing a global variable at this problem. It doesn't seem to make sense -- this must be a common problem, so I'm assuming there is an elegant solution and I just don't know how to search for it.

提交回复
热议问题