|
|
|
Re: how to configure Application Title at runtime? [message #460075 is a reply to message #460040] |
Wed, 13 December 2006 01:36  |
Eclipse User |
|
|
|
Thanks a lot, I got the solution now:
I pass a WorkbenchWindow parameter into Action constructor when create
the instance in ActionBarAdvisor.
Then in the action, we can use window.getShell().setText()....
Michael Spector wrote:
>
> I've used the following technique:
>
> public static void changeAppTitle(String newTitle) {
> Display display = Display.getDefault();
> if (display != null) {
> // Look at all the shells and pick the first one
> // that is a workbench window.
> Shell shells[] = display.getShells();
> for (int i = 0; i < shells.length; i++) {
> Object data = shells[i].getData();
> // Check whether this shell points to the Application main window's
> shell:
> if (data instanceof IWorkbenchWindow) {
> shells[i].setText(newTitle);
> break;
> }
> }
> }
> }
>
|
|
|
Powered by
FUDForum. Page generated in 0.04868 seconds