Skip to content

Package: NoRendererFoundException

NoRendererFoundException

nameinstructionbranchcomplexitylinemethod
NoRendererFoundException(VElement)
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getvElement()
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%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 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.view.spi.renderer;
15:
16: import org.eclipse.emf.ecp.ui.view.ECPRendererException;
17: import org.eclipse.emf.ecp.view.spi.model.VElement;
18:
19: /**
20: * Exception is thrown when no fitting Renderer could be found for a {@link VElement}.
21: *
22: * @author Eugen Neufeld
23: * @noextend This class is not intended to be subclassed by clients.
24: * @since 1.2
25: */
26: public class NoRendererFoundException extends ECPRendererException {
27:
28:         private static final String NO_RENDERER_FOUND = "No renderer for %1s found."; //$NON-NLS-1$
29:         private static final long serialVersionUID = -8540544811118107575L;
30:         private final VElement vElement;
31:
32:         /**
33:          * Constructor for an {@link Exception} indicating that a {@link VElement} is missing a renderer.
34:          *
35:          * @param vElement the {@link VElement} missing a renderer
36:          */
37:         public NoRendererFoundException(VElement vElement) {
38:                 super(String.format(NO_RENDERER_FOUND, vElement.eClass().getName()));
39:                 this.vElement = vElement;
40:         }
41:
42:         /**
43:          * The {@link VElement} no renderer could be found for.
44:          *
45:          * @return the vElement without a renderer
46:          */
47:         public final VElement getvElement() {
48:                 return vElement;
49:         }
50:
51: }