| /****************************************************************************** |
| * Copyright (c) 2005 IBM Corporation and others. |
| * 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: |
| * IBM Corporation - initial API and implementation |
| ****************************************************************************/ |
| |
| package org.eclipse.gmf.tests.runtime.emf.type.core.internal; |
| |
| import org.eclipse.emf.ecore.EObject; |
| |
| import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; |
| import org.eclipse.gmf.tests.runtime.emf.type.core.employee.Employee; |
| |
| /** |
| * @author ldamus |
| */ |
| public class ManagerMatcher |
| implements IElementMatcher { |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.gmf.runtime.emf.type.core.IElementMatcher#matches(org.eclipse.emf.ecore.EObject) |
| */ |
| public boolean matches(EObject eObject) { |
| |
| if (eObject instanceof Employee) { |
| Employee employee = (Employee) eObject; |
| |
| if (employee.getOffice().getNumberOfWindows() == 1 |
| && employee.getOffice().isHasDoor() == false) { |
| return true; |
| } |
| } |
| return false; |
| } |
| |
| } |