blob: 35769279bbeb0d0afc15c5cd66e59ee31e38bc4c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013 RCP Vision (http://www.rcp-vision.com) 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:
* Lorenzo Bettini - Initial contribution and API
*******************************************************************************/
package org.eclipse.emf.parsley.tests.views;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage;
import org.eclipse.emf.parsley.examples.library.Library;
import org.eclipse.emf.parsley.tests.EmfParsleyAbstractTests;
import org.eclipse.emf.parsley.views.AbstractSaveableTableView;
public class TestSaveableResourceTableView extends AbstractSaveableTableView {
@Override
protected Object getContents(Resource resource) {
Library library=(Library) resource.getContents().get(0);
return library.getBooks();
}
@Override
protected EClass getEClass() {
return EXTLibraryPackage.Literals.BOOK;
}
@Override
protected URI createResourceURI() {
return URI.createPlatformResourceURI(
EmfParsleyAbstractTests.MY_EXTLIBRARY_RELATIVE_PATH, true);
}
}