开发者

How to view updated data on one property page updated by another property page without closing the properties in eclipse plugin?

开发者 https://www.devze.com 2023-03-09 17:43 出处:网络
I am facing a strange issue!开发者_StackOverflow中文版! I have a set of property page with same storage file.

I am facing a strange issue!开发者_StackOverflow中文版!

I have a set of property page with same storage file.

The scenario is as follow.. For the first time opening the properties by right clicking on the project, list of property pages are viewed. I click on the first property page and make changes then apply the changes to the file. Now I select the second page, it shows the changes that were applied from the first page.

But now without closing the properties i go back to first page and make changes then apply the changes. Then again I go to second page it wont show the updated data. The changes that were applied are not viewed until I close the properties and reopen then by right clicking on the project.

My question is "Is there any way to reflect changes on the pages without closing the properties??"

I appreciate your valuable time you will give for reading and replying..

Plz help


Your problem seems to just absent of reliable model which can notify problem.

If the properties are related IProject. You should use ScopedPreferenceStore as model.

IScopeContenxt scope = new ProjectScope(myProject);
IPreferenceStore store = 
    new ScopedPreferenceStore(scope, "myProperties(qualifier)");

IPreferenceStore can manipulate primitive data, default value. And it support property change event. You can create multiple instances of IPreferenceStore, If they have same scope and qualifier then automatically synchronized. So individual page can retrive input model without coupling.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号