/******************************************************************************* * Copyright (c) 2010 Michal Antkiewicz. * 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: * Michal Antkiewicz - initial API and implementation ******************************************************************************/ package editors; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; import org.eclipse.ui.PartInitException; import org.eclipse.ui.part.EditorPart; public class EditorBase extends EditorPart { @Override public Object getAdapter(Class adapter) { if (IContentProvider.class.equals(adapter)) return createIContentProviderAdapter(); else if (EditorBase.class.equals(adapter)) return this; return super.getAdapter(adapter); } protected IContentProvider createIContentProviderAdapter() { return new EditorBaseContentProvider(); } @Override public void doSave(IProgressMonitor monitor) { // TODO Auto-generated method stub } @Override public void doSaveAs() { // TODO Auto-generated method stub } @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { // TODO Auto-generated method stub } @Override public boolean isDirty() { // TODO Auto-generated method stub return false; } @Override public boolean isSaveAsAllowed() { // TODO Auto-generated method stub return false; } @Override public void createPartControl(Composite parent) { // TODO Auto-generated method stub } @Override public void setFocus() { // TODO Auto-generated method stub } }