Skip to content

Package: InvalidGridDescriptionReportConsumer

InvalidGridDescriptionReportConsumer

nameinstructionbranchcomplexitylinemethod
InvalidGridDescriptionReportConsumer()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
reported(AbstractReport)
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 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: * Edgar Mueller - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.ui.view.swt;
15:
16: import org.eclipse.emf.ecp.view.spi.swt.reporting.InvalidGridDescriptionReport;
17: import org.eclipse.emfforms.spi.common.report.AbstractReport;
18: import org.eclipse.emfforms.spi.common.report.ReportServiceConsumer;
19:
20: /**
21: *
22: *
23: * @author emueller
24: * @since 1.5
25: *
26: */
27: public class InvalidGridDescriptionReportConsumer implements ReportServiceConsumer {
28:
29:         /**
30:          *
31:          * {@inheritDoc}
32:          *
33:          * @see org.eclipse.emfforms.spi.common.report.ReportServiceConsumer#reported(org.eclipse.emfforms.spi.common.report.AbstractReport)
34:          * @since 1.6
35:          */
36:         @Override
37:         public void reported(AbstractReport reportEntity) {
38:•                if (InvalidGridDescriptionReport.class.isInstance(reportEntity)) {
39:                         // TODO: mimics existing behavior; should we rather show a dialog?
40:                         throw new IllegalStateException("Invalid number of cells, expected exactly one cell!"); //$NON-NLS-1$
41:                 }
42:         }
43: }