Skip to content

Package: ECPWizard

ECPWizard

nameinstructionbranchcomplexitylinemethod
ECPWizard()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCompositeProvider()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setCompositeProvider(CompositeProvider)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

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:
16: package org.eclipse.emf.ecp.spi.common.ui;
17:
18: import org.eclipse.jface.wizard.Wizard;
19:
20: /**
21: * An abstract class for all Wizard with only one page that use an {@link CompositeProvider} to create this page.
22: *
23: * @param <T> the {@link CompositeProvider} to use during build
24: *
25: * @author Eugen Neufeld
26: */
27: public abstract class ECPWizard<T extends CompositeProvider> extends Wizard {
28:         private T uiProvider;
29:
30:         /**
31:          * Sets the {@link CompositeProvider} for this wizard.
32:          *
33:          * @param compositeProvider the {@link CompositeProvider} to set
34:          */
35:         @SuppressWarnings("unchecked")
36:         public void setCompositeProvider(CompositeProvider compositeProvider) {
37:                 this.uiProvider = (T) compositeProvider;
38:         }
39:
40:         /**
41:          * Returns the set {@link CompositeProvider}.
42:          *
43:          * @return the {@link CompositeProvider} that was set
44:          */
45:
46:         protected T getCompositeProvider() {
47:                 return uiProvider;
48:         }
49: }