1 11 package org.eclipse.team.ui.history; 12 13 import org.eclipse.compare.ITypedElement; 14 import org.eclipse.core.resources.IFile; 15 import org.eclipse.team.core.TeamException; 16 import org.eclipse.team.internal.ui.history.EditionHistoryPage; 17 import org.eclipse.ui.part.Page; 18 19 23 public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { 24 25 33 public static ITypedElement getPreviousEdition(IFile file, Object element) throws TeamException { 34 return EditionHistoryPage.getPreviousState(file, element); 35 } 36 37 40 public ElementLocalHistoryPageSource() { 41 super(); 42 } 43 44 47 public final boolean canShowHistoryFor(Object object) { 48 return getFile(object) != null; 49 } 50 51 54 public final Page createPage(Object object) { 55 return new EditionHistoryPage(getFile(object), object); 56 } 57 58 64 protected abstract IFile getFile(Object element); 65 66 } 67 | Popular Tags |