source: trunk/modelicaml/org.openmodelica.modelicaml.model.explorer.customization/src/org/openmodelica/modelicaml/model/explorer/customization/IsHaveMoreThanXProperties.java @ 846

Last change on this file since 846 was 846, checked in by wschamai, 13 years ago
  • Doc. header update
  • dependency name display
File size: 2.6 KB
Line 
1/*
2 * This file is part of OpenModelica.
3 *
4 * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
5 * c/o Linköpings universitet, Department of Computer and Information Science,
6 * SE-58183 Linköping, Sweden.
7 *
8 * All rights reserved.
9 *
10 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
11 * THIS OSMC PUBLIC LICENSE (OSMC-PL).
12 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
13 * OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
14 *
15 * The OpenModelica software and the Open Source Modelica
16 * Consortium (OSMC) Public License (OSMC-PL) are obtained
17 * from OSMC, either from the above address,
18 * from the URLs: http://www.ida.liu.se/projects/OpenModelica or 
19 * http://www.openmodelica.org, and in the OpenModelica distribution.
20 * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
21 *
22 * This program is distributed WITHOUT ANY WARRANTY; without
23 * even the implied warranty of  MERCHANTABILITY or FITNESS
24 * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
25 * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
26 *
27 * See the full OSMC Public License conditions for more details.
28 *
29 * Main author: Wladimir Schamai, EADS Innovation Works / Linköping University, 2009-now
30 *
31 * Contributors:
32 *   Uwe Pohlmann, University of Paderborn 2009-2010, contribution to the Modelica code generation for state machine behavior, contribution to Papyrus GUI adoptations
33 *   Parham Vasaiely, EADS Innovation Works / Hamburg University of Applied Sciences 2009-2011, implementation of simulation plugins
34 */
35package org.openmodelica.modelicaml.model.explorer.customization;
36import org.eclipse.gmt.modisco.infra.query.core.exception.ModelQueryExecutionException;
37import org.eclipse.gmt.modisco.infra.query.core.java.IJavaModelQuery;
38import org.eclipse.gmt.modisco.infra.query.core.java.ParameterValueList;
39import org.eclipse.uml2.uml.Classifier;
40
41// TODO: Auto-generated Javadoc
42/**
43 * checks if the class has more then x number of properties.
44 */
45public class IsHaveMoreThanXProperties implements IJavaModelQuery<Classifier, Boolean> {
46   
47    /* (non-Javadoc)
48     * @see org.eclipse.gmt.modisco.infra.query.core.java.IJavaModelQuery#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.gmt.modisco.infra.query.core.java.ParameterValueList)
49     */
50    public Boolean evaluate(final Classifier context, final ParameterValueList parameterValues)
51            throws ModelQueryExecutionException {
52        // TODO Auto-generated method stub
53        if (context.getAllAttributes().size() > 3 ) {
54            return false;
55        }
56        return true;
57    }
58}
Note: See TracBrowser for help on using the repository browser.