| /******************************************************************************* |
| * Copyright (c) 2015 CEA LIST. |
| * 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: |
| * CEA LIST - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.papyrus.designer.languages.c.codegen.lib |
| |
| import org.eclipse.papyrus.designer.languages.cpp.profile.C_Cpp.NoCodeGen |
| import org.eclipse.uml2.common.util.UML2Util |
| import org.eclipse.uml2.uml.Classifier |
| import org.eclipse.uml2.uml.Element |
| import org.eclipse.uml2.uml.InterfaceRealization |
| |
| import static extension org.eclipse.papyrus.designer.languages.common.base.GenUtils.hasStereotypeTree |
| |
| class interfaceScript { |
| def public static getInterfaceRealizationClass(Classifier classifier) { |
| UML2Util.getInverseReferences(classifier).filter[it instanceof InterfaceRealization && !(it as Element).hasStereotypeTree(NoCodeGen)].map[(it as InterfaceRealization).clients] |
| } |
| } |