package de.tudresden.slr.model.bibtex.ui.presentation;

import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IReusableEditor;
import org.eclipse.ui.PartInitException;

import de.tudresden.slr.model.bibtex.ui.presentation.serialization.DocumentStorageEditorInput;

public class BibtexOverviewEditor extends BibtexEditor implements
		IReusableEditor {
	public static final String ID = "bibtex.presentation.BibtexOverviewEditor";
	public static final String name = "Bibtex Overview";
	private boolean init;

	public BibtexOverviewEditor() {
		super();
		init = true;
	}

	/**
	 * The <code>MultiPageEditorExample</code> implementation of this method
	 * checks that the input is an instance of <code>IFileEditorInput</code>.
	 */
	public void init(IEditorSite site, IEditorInput editorInput)
			throws PartInitException {
		super.init(site, editorInput);
		this.setPartName(name);
		init = false;
	}

	/*
	 * public void setFocus() { new BibtexOpenListener(BibtexEditor.ID,
	 * IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID) .openEditor(new
	 * StructuredSelection(this.document), true); }
	 */
	public void setInput(IEditorInput input) {
		super.setInput(input);
		if (!init && input instanceof DocumentStorageEditorInput) {
			extractDocument(input);
			this.setPartName(name);
			int page = this.getActivePage();
			for (int i = this.getPageCount() - 1; i >= 0; i--) {
				this.removePage(i);
			}
			this.createPages();
			this.setActivePage(page);
		}
	}
	
	protected void createPages(){
		createAbstractPage();
	}
}

@@ -417,16 +417,39 @@
 g ID = %22
+de.tudresden.slr.model.
 bibtex.p
@@ -483,16 +483,16 @@
 ditor%22;%0A
-
 %09public 
@@ -779,24 +779,35 @@
 code%3E.%0A%09 */%0A
+%09@Override%0A
 %09public void
@@ -1166,16 +1166,27 @@
  %7D%0A%09 */%0A
+%09@Override%0A
 %09public 
@@ -1542,17 +1542,27 @@
 %0A%09%09%7D%0A%09%7D%0A
-%09
+%0A%09@Override
 %0A%09protec
@@ -1583,16 +1583,17 @@
 ePages()
+ 
 %7B%0A%09%09crea

Fix plugin id's