Package: DatabindingFailedReport
DatabindingFailedReport
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DatabindingFailedReport(Throwable) |
|
|
|
|
|
||||||||||||||||||||
getSeverity() |
|
|
|
|
|
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: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.core.services.databinding;
15:
16: import java.text.MessageFormat;
17:
18: import org.eclipse.emfforms.spi.common.report.AbstractReport;
19:
20: /**
21: * A rendering report indicating that the databinding is not possible due to an exception.
22: *
23: * @author Lucas Koehler
24: *
25: */
26: public class DatabindingFailedReport extends AbstractReport {
27:
28:         /**
29:          * Constructor.
30:          *
31:          * @param exception
32:          * the underlying exception
33:          */
34:         public DatabindingFailedReport(Throwable exception) {
35:                 super(exception,
36:                         MessageFormat.format("Databinding not possible due to: {0}.", //$NON-NLS-1$
37:                                 exception.getMessage()));
38:         }
39:
40:         /**
41:          * {@inheritDoc}
42:          *
43:          * @see org.eclipse.emfforms.spi.common.report.AbstractReport#getSeverity()
44:          */
45:         @Override
46:         public int getSeverity() {
47:                 return 2; // IStatus.Warning
48:         }
49:
50: }