uk.ac.kcl.cch.jb.pliny.editors
Class ResourceEditorInput

java.lang.Object
  extended byuk.ac.kcl.cch.jb.pliny.editors.ResourceEditorInput
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorInput, org.eclipse.ui.IPersistable, org.eclipse.ui.IPersistableElement, org.eclipse.ui.IStorageEditorInput

public class ResourceEditorInput
extends Object
implements org.eclipse.ui.IStorageEditorInput, org.eclipse.ui.IPersistableElement, org.eclipse.core.runtime.IAdaptable

The EditorInput object for the Pliny Resource-driven editors. The object holds the Resource that it refers to.

By making the object IPersistableElement and IAdaptable it is made possible for open editors to persist between Eclipse/Pliny sessions.

Author:
John Bradley
See Also:
Resource.idString2EditorInput(java.lang.String)

Field Summary
static String PAGE_NUMB_TAG
           
static String RESOURCE_EDIT_INPUT_FACTORY_ID
           
static String RESOURCE_KEY_TAG
           
 
Constructor Summary
ResourceEditorInput(Resource myResource)
           
 
Method Summary
 boolean equals(Object obj)
           
 boolean exists()
           
 Object getAdapter(Class adapter)
           
 String getFactoryId()
           
 org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
           
 Resource getMyResource()
           
 String getName()
           
 int getPageNo()
           
 org.eclipse.ui.IPersistableElement getPersistable()
           
 org.eclipse.core.resources.IStorage getStorage()
           
 String getToolTipText()
           
 void saveState(org.eclipse.ui.IMemento memento)
           
 void setPageNo(int numb)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_EDIT_INPUT_FACTORY_ID

public static String RESOURCE_EDIT_INPUT_FACTORY_ID

RESOURCE_KEY_TAG

public static String RESOURCE_KEY_TAG

PAGE_NUMB_TAG

public static String PAGE_NUMB_TAG
Constructor Detail

ResourceEditorInput

public ResourceEditorInput(Resource myResource)
Method Detail

getMyResource

public Resource getMyResource()

getPageNo

public int getPageNo()

setPageNo

public void setPageNo(int numb)

getStorage

public org.eclipse.core.resources.IStorage getStorage()
                                               throws org.eclipse.core.runtime.CoreException
Specified by:
getStorage in interface org.eclipse.ui.IStorageEditorInput
Throws:
org.eclipse.core.runtime.CoreException

exists

public boolean exists()
Specified by:
exists in interface org.eclipse.ui.IEditorInput

getImageDescriptor

public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
Specified by:
getImageDescriptor in interface org.eclipse.ui.IEditorInput

getName

public String getName()
Specified by:
getName in interface org.eclipse.ui.IEditorInput

getPersistable

public org.eclipse.ui.IPersistableElement getPersistable()
Specified by:
getPersistable in interface org.eclipse.ui.IEditorInput

getToolTipText

public String getToolTipText()
Specified by:
getToolTipText in interface org.eclipse.ui.IEditorInput

getAdapter

public Object getAdapter(Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

getFactoryId

public String getFactoryId()
Specified by:
getFactoryId in interface org.eclipse.ui.IPersistableElement

saveState

public void saveState(org.eclipse.ui.IMemento memento)
Specified by:
saveState in interface org.eclipse.ui.IPersistable

equals

public boolean equals(Object obj)