Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.core
diff src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java @ 9:e63a64652f4d
added comments
author | dwinter |
---|---|
date | Mon, 03 Jan 2011 16:53:48 +0100 |
parents | 83c58ea33792 |
children | 1a7940ac5169 |
line wrap: on
line diff
--- a/src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java Mon Jan 03 09:13:17 2011 +0100 +++ b/src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java Mon Jan 03 16:53:48 2011 +0100 @@ -5,18 +5,26 @@ import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IPersistableElement; +/** + * Editor input for {@link de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart} + * @author dwinter + * + */ public class DigilibLinkEditorInput implements IEditorInput { - private IFile indexMetaFile; + private IFile file; public static int INDEX_META=0; private int type; - public IFile getIndexMetaFile() { - return indexMetaFile; + /** + * @return + */ + public IFile getFile() { + return file; } - public void setIndexMetaFile(IFile indexMetaFile) { - this.indexMetaFile = indexMetaFile; + public void setFile(IFile indexMetaFile) { + this.file = indexMetaFile; } public int getType() { @@ -27,8 +35,15 @@ this.type = type; } + /** + * + * @param file File to be worked with + * @param type currently only @see {{@value #INDEX_META}, file has to be an index.meta file following the + * standards of the MPIWG + * + */ public DigilibLinkEditorInput(IFile file, int type) { - indexMetaFile = file; + this.file = file; setType(type); } @@ -48,8 +63,9 @@ } public String getName() { - // TODO Auto-generated method stub - return "hello_name"; + + String name = file.getName(); + return name; } public IPersistableElement getPersistable() { @@ -58,8 +74,8 @@ } public String getToolTipText() { - // TODO Auto-generated method stub - return "hello"; + + return file.getFullPath().toOSString(); } }