blob: 52195a1b81af6d634149aaf3c54f43b0f4941356 [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2021 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Asma Smaoui (CEA LIST) asma.smaoui@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.aas.ui.modelExplorer;
import org.eclipse.papyrus.aas.Asset;
import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.util.UMLUtil;
public class IsAStereotypeAssetQuery implements IJavaQuery2<Class, Boolean> {
@Override
public Boolean evaluate(final Class context,
final IParameterValueList2 parameterValues,
final IFacetManager facetManager)
throws DerivedTypedElementException {
return UMLUtil.getStereotypeApplication(context, Asset.class) != null;
}
}