| /******************************************************************************* |
| * Copyright (c) 2015 EclipseSource Muenchen GmbH 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: |
| * Stefan Dirix - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.papyrus.compare.diagram.tests.modelextension.data.nullparametermodel; |
| |
| import java.util.Map; |
| |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel; |
| import org.eclipse.papyrus.infra.core.resource.IModel; |
| |
| /** |
| * Test Model Class to test for models which return {@code null} as save parameter. |
| * |
| * @author Stefan Dirix <sdirix@eclipsesource.com> |
| */ |
| public class NullParameterModel extends AbstractBaseModel implements IModel { |
| |
| @Override |
| protected String getModelFileExtension() { |
| return "nullparametermodeltest"; |
| } |
| |
| @Override |
| public String getIdentifier() { |
| return "nullparametermodeltest"; |
| } |
| |
| @Override |
| protected Map<Object, Object> getSaveOptions() { |
| return null; |
| } |
| |
| // since Papyrus 2.0 we have to implement canPersist |
| // we omit @Override on purpose to be backward compatible |
| @SuppressWarnings("all") |
| public boolean canPersist(EObject eObject) { |
| return false; |
| } |
| |
| // since Papyrus 2.0 we have to implement persist |
| // we omit @Override on purpose to be backward compatible |
| @SuppressWarnings("all") |
| public void persist(EObject object) { |
| // no implementation |
| } |
| } |