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

后端 未结 2 602
轮回少年
轮回少年 2021-02-10 18:07

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 18:42

    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.

提交回复
热议问题