| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| */ |
| package org.eclipse.osbp.ide.core.api.i18n; |
| |
| import org.eclipse.core.resources.IProject; |
| import org.eclipse.core.runtime.CoreException; |
| import org.slf4j.Logger; |
| import org.slf4j.LoggerFactory; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * The Class CoreUtil. |
| */ |
| public class CoreUtil { |
| |
| /** The Constant LOGGER. */ |
| private static final Logger LOGGER = LoggerFactory |
| .getLogger(CoreUtil.class); |
| |
| /** The nature id. */ |
| public static String NATURE_ID = "org.eclipse.osbp.ide.core.ui.shared.OSBPNature"; |
| |
| /** The Constant BUILDER_MODEL_ENHANCING_ID. */ |
| public static final String BUILDER_MODEL_ENHANCING_ID = "org.eclipse.osbp.ide.core.ui.shared.OSBPModelEnhancingBuilder"; |
| |
| /** The Constant BUILDER_I18N_ID. */ |
| public static final String BUILDER_I18N_ID = "org.eclipse.osbp.ide.core.ui.shared.OSBPI18nBuilder"; |
| |
| /** The Constant EVENT_TOPIC__BUILDER. */ |
| public static final String EVENT_TOPIC__BUILDER = "org/eclipse/osbp/ide/core/ui/builder"; |
| |
| /** |
| * Returns true, if the given project contains the OSBP Nature. |
| * |
| * @param project |
| * the project |
| * @return true, if successful |
| */ |
| public static boolean hasNature(IProject project) { |
| try { |
| if (project.isAccessible()) { |
| return project.hasNature(NATURE_ID); |
| } |
| } catch (CoreException e) { |
| LOGGER.error(e.getMessage(), e); |
| } |
| return false; |
| } |
| |
| } |