Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
SPath (IProject project, IPath path) | |
SPath (IResource resource) | |
IPath | getProjectRelativePath () |
int | hashCode () |
boolean | equals (Object obj) |
String | toString () |
IFile | getFile () |
IResource | getResource () |
IFolder | getFolder () |
IProject | getProject () |
IPath | getFullPath () |
Protected Attributes | |
IPath | projectRelativePath |
IProject | project |
Objects of this class point to a document in the *workspace*, possibly with information about a specific open editor for that document.
An SPath consists of an IProject reference, IPath reference and editorType identifier.
SPaths are value objects and thus immutable.
Default constructor, initializing this SPath as a reference to the resource or editor identified by the given path in the given project.
path | May be null to represent "no editor".FIXME path == null causes a NPE |
IllegalArgumentException | if the path is not relative |
de.fu_berlin.inf.dpp.activities.SPath.SPath | ( | IResource | resource | ) |
Convenience constructor, which retrieves path and project from the given resource
boolean de.fu_berlin.inf.dpp.activities.SPath.equals | ( | Object | obj | ) |
IFile de.fu_berlin.inf.dpp.activities.SPath.getFile | ( | ) |
Returns the IFile represented by this SPath.
This method is using a straight forward implementation
IFolder de.fu_berlin.inf.dpp.activities.SPath.getFolder | ( | ) |
Returns the IFolder represented by this SPath.
IPath de.fu_berlin.inf.dpp.activities.SPath.getFullPath | ( | ) |
Convenience method for getting the full (workspace-relative) path of the file/editor identified by this SPath.
IProject de.fu_berlin.inf.dpp.activities.SPath.getProject | ( | ) |
Returns the project in which the referenced resource or editor is located.
IPath de.fu_berlin.inf.dpp.activities.SPath.getProjectRelativePath | ( | ) |
IResource de.fu_berlin.inf.dpp.activities.SPath.getResource | ( | ) |
int de.fu_berlin.inf.dpp.activities.SPath.hashCode | ( | ) |
String de.fu_berlin.inf.dpp.activities.SPath.toString | ( | ) |
The local IProject in which the document is contained which this SPath represents
4, Some Basics:
Individual Eclipse projects use IPaths to identify their resources. However, because Saros needs to keep track of resources across multiple projects, it encapsulates IPaths in an SPath that includes additional identifying information. The project relative path of the resource or editor this SPath represents.