开发者

Eclipse: PreferenceDialog strange "cache" behavior

In my app I use a PreferenceManager, entirely created from scratch.

Then I open a preferencePage:

PreferenceDialog dialog=new PreferenceDialog(parentShell, manager);
dialog.c开发者_如何学Pythonreate();
dialog.open();

I have 2 problems with this approach:

1) I cannot maintain a STATIC MANAGER throughout the app life-cycle. I need to create the Manager every time I create the dialogue, otherwise, even the tree isn't created. Creating a NEW Manager is a solution...

2) The PreferenceDialog somehow "seems to know about the last dialog"! The LAST page opened in the last dialog is known by the more recent dialog even before we open that page. This happens only with the last page opened, the others are fully created on-the-fly!

I know that when I use the ECLIPSE preferences, the dialog seems to "cache" all the pages that are opened, so the second time around they are ready to show...

But I'm intrigued because I'm creating a NEW PreferenceManager and PreferenceDialog !!!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜