/** * <copyright> * * Copyright (c) 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM - Initial API and implementation * * </copyright> * * $Id: EMF_codetemplates.xml,v 1.1 2008/05/06 20:12:20 nickb Exp $ */ package at.bestsolution.e4.addressbook.model.handlers; import org.eclipse.e4.core.di.annotations.CanExecute; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.core.di.annotations.Optional; import at.bestsolution.e4.addressbook.model.addressbook.AddressBook; import at.bestsolution.e4.addressbook.model.addressbook.Person; @SuppressWarnings("restriction") public class RemovePerson { @CanExecute public boolean canRemove(@Optional Person person) { return person != null; } @Execute public void removePerson(AddressBook book, Person person) { book.getPersons().remove(person); } }