RCP Application Set Title of Application Window

Veröffentlicht von

To dynamically set the title of a RCP application, the following code snippet is useful:

private String fileName = "unknown.daf";

public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
    IWorkbenchWindowConfigurer windowConfigurer = configurer;
    String title = "DA-FormMaker - " + fileName;
    windowConfigurer.setTitle(title);

  return new ApplicationWorkbenchWindowAdvisor(configurer);
}

The window title can be set via the “_IWorkbenchWindowConfigurer”. You can get a reference to it in the “_ApplicationWorkbenchAdvisor”. The result looks like this (obviously Erstauntes Smiley):

image

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert