Skip to content

Package: EGFNatures

EGFNatures

nameinstructionbranchcomplexitylinemethod
EGFNatures()
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%
hasFactoryComponentNature(IProject)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: *
3: * Copyright (c) 2009-2010 Thales Corporate Services S.A.S.
4: * This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-v2.0
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Thales Corporate Services S.A.S - initial API and implementation
13: *
14: */
15: package org.eclipse.egf.core.natures;
16:
17: import org.eclipse.core.resources.IProject;
18: import org.eclipse.core.runtime.CoreException;
19: import org.eclipse.egf.core.EGFCorePlugin;
20:
21: public class EGFNatures {
22:
23: public static final String EGF_NATURE = "org.eclipse.egf.core.EGFNature"; //$NON-NLS-1$
24:
25: public static final String PATTERN_BUILDER_ID = "org.eclipse.egf.pattern.ui.PatternBuilder"; //$NON-NLS-1$
26:
27: public static boolean hasFactoryComponentNature(IProject project) {
28: try {
29: return project.hasNature(EGF_NATURE);
30: } catch (CoreException ce) {
31: EGFCorePlugin.getDefault().logError(ce);
32: return false;
33: }
34: }
35:
36: }