Skip to content

Package: ApplicationWorkbenchWindowAdvisor

ApplicationWorkbenchWindowAdvisor

nameinstructionbranchcomplexitylinemethod
ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
createActionBarAdvisor(IActionBarConfigurer)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
preWindowOpen()
M: 23 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: *
14: *******************************************************************************/
15: package org.eclipse.emf.ecp.rap;
16:
17: import org.eclipse.swt.SWT;
18: import org.eclipse.swt.graphics.Point;
19: import org.eclipse.ui.application.ActionBarAdvisor;
20: import org.eclipse.ui.application.IActionBarConfigurer;
21: import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
22: import org.eclipse.ui.application.WorkbenchWindowAdvisor;
23:
24: /**
25: * Configures the initial size and appearance of a workbench window.
26: */
27: public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
28:
29:         /**
30:          * Default constructor.
31:          *
32:          * @param configurer the {@link IWorkbenchWindowConfigurer}
33:          */
34:         public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
35:                 super(configurer);
36:         }
37:
38:         @Override
39:         public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
40:                 return new ApplicationActionBarAdvisor(configurer);
41:         }
42:
43:         /**
44:          *
45:          * {@inheritDoc}
46:          *
47:          * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
48:          */
49:         @Override
50:         public void preWindowOpen() {
51:                 final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
52:                 configurer.setInitialSize(new Point(1800, 1000));
53:                 configurer.setShowCoolBar(false);
54:                 configurer.setShowStatusLine(false);
55:                 configurer.setTitle("ECP RAP"); //$NON-NLS-1$
56:                 configurer.setShellStyle(SWT.TITLE | SWT.RESIZE);
57:         }
58: }