How to set the main window of an Eclipse RCP application to its maximum size

I need to develop a simple Eclipse based application. I am using Luna Eclipse RCP IDE (4.4). I would like a declarative way to run my application with the maximum size of the main windows.

Thank you in advance

+3


source to share


1 answer


You can do this in org.eclipse.ui.application.WorkbenchWindowAdvisor

. You should find yours WorkbenchWindowAdvisor

in the kit where it is declared org.eclipse.core.runtime.applications

. The default name ApplicationNameWorkbenchWindowAdvisor

, where ApplicationName

is the name of your application. If you can't find it, take a look at the application class createWorkbenchWindowAdvisor()

.



@Override
public void postWindowCreate() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    IWorkbenchWindow window = configurer.getWindow();
    window.getShell().setMaximized(true);
}

      

+3


source







All Articles