开发者

Adding title to window border for Eclipse RCP detached view

开发者 https://www.devze.com 2022-12-12 23:06 出处:网络
I am working on an Eclipse RCP project which has detachable views.I would like to be able to put some text on the window border which surrounds the view once it is detached.Does anyone have any experi

I am working on an Eclipse RCP project which has detachable views. I would like to be able to put some text on the window border which surrounds the view once it is detached. Does anyone have any experience with this? Deve开发者_JAVA百科lopment environment is Eclipse 3.4 on Windows. THANKS.


I am not sure it is possible through the conventional update triggering a updateTitle():
If you take a look at the code of org.eclipse.ui.internal.DetachedWindow, you will see a disturbing method updateTitle():

private void updateTitle() {
    if (activePart != null) {
        // Uncomment to set the shell title to match the title of the active part
        // String text = activePart.getTitle();
        //
        // if (!text.equals(s.getText())) {
        //     s.setText(text);
        // }
    }
}

All commented!


You cannot. The detached one is a tool window rather than a main window, so it isn't good to have a title on it

0

精彩评论

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