edu.uky.rch.ept.projectexplorer.editorinputs
Class ProjectEditorInput

java.lang.Object
  extended byedu.uky.rch.ept.data.DataLayerEditorInput
      extended byedu.uky.rch.ept.projectexplorer.editorinputs.ProjectEditorInput
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IDataLayerEditorInput, org.eclipse.ui.IEditorInput, IProjectEditorInput

public class ProjectEditorInput
extends DataLayerEditorInput
implements IProjectEditorInput

Class implementing an editor input for accessing a data layer resource located within a project.

Author:
Neil Moore

Constructor Summary
ProjectEditorInput(Project project, String path)
          Create an editor input referring to a resource located within a project.
 
Method Summary
 Project getProject()
          Get the project to which this resource belongs.
 String getRelativeAddress()
          Get the project-relative address of the resource pointed to by this editor input.
 
Methods inherited from class edu.uky.rch.ept.data.DataLayerEditorInput
equals, exists, getAdapter, getAddress, getImageDescriptor, getInputStream, getName, getOutputStream, getOutputStream, getPersistable, getToolTipText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.uky.rch.ept.data.IDataLayerEditorInput
getAddress
 
Methods inherited from interface org.eclipse.ui.IEditorInput
exists, getImageDescriptor, getName, getPersistable, getToolTipText
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

ProjectEditorInput

public ProjectEditorInput(Project project,
                          String path)
                   throws MalformedAddressException,
                          IOException
Create an editor input referring to a resource located within a project. The resource's path may be project-relative or absolute.

Parameters:
project - the project to which the resource belongs
Throws:
MalformedAddressException - if the project's address is not well formed, or if the path is a relative path
IOException - if there was an error accessing the resource.
Method Detail

getProject

public Project getProject()
Description copied from interface: IProjectEditorInput
Get the project to which this resource belongs.

Specified by:
getProject in interface IProjectEditorInput
Returns:
the resource's project.

getRelativeAddress

public String getRelativeAddress()
Description copied from interface: IProjectEditorInput
Get the project-relative address of the resource pointed to by this editor input. I

Specified by:
getRelativeAddress in interface IProjectEditorInput
Returns:
the resource's project-relative path, without a leading separator
See Also:
IDataConstants.SEP_MAJOR