Skip to content

Package: VElementUtil

VElementUtil

nameinstructionbranchcomplexitylinemethod
getCleanName(VElement)
M: 10 C: 6
38%
M: 3 C: 1
25%
M: 2 C: 1
33%
M: 1 C: 2
67%
M: 0 C: 1
100%

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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.model;
15:
16: /**
17: * This class provides helper methods for working with VElements.
18: *
19: * @author Eugen Neufeld
20: * @since 1.6
21: *
22: */
23: public final class VElementUtil {
24:
25:         private VElementUtil() {
26:                 // intentionally left empty
27:         }
28:
29:         /**
30:          * Return the cleaned Name of the {@link VElement}.
31:          *
32:          * @param vElement The {@link VElement} to get the cleaned name for
33:          * @return the cleaned name
34:          */
35:         public static String getCleanName(VElement vElement) {
36:•                if (vElement.getName() != null && vElement.getName().startsWith("%")) { //$NON-NLS-1$
37:                         return vElement.getName().substring(1);
38:                 }
39:                 return vElement.getName();
40:         }
41: }