Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the title of my Eclipse RCP at runtime?

I'd like to change at runtime the name of my eclipse RCP application, so to include the name of the project the user is working on.

This seems a pretty simple question, but I was only able to find a way to set the name statically (in the article "branding your application").

like image 943
Matteo Avatar asked Dec 20 '22 20:12

Matteo


1 Answers

There is a simpler way to do it, after I tried to do it as suggested here, I got into problems getting a hold of the Application or WorkbenchWindowAdvisor. The solution was simply to get the shell of the workbench window and setText:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setText("My new title");
like image 165
Robert F Avatar answered Jan 05 '23 02:01

Robert F