edu.rice.cs.drjava.project
Interface DocumentInfoGetter
public interface DocumentInfoGetter
Classes that implement this interface are expected to give information specific to a single document that is
to be saved by the project file builder. These objects are passed to the builder upon a save. These objects
should not be cached anywhere so that they may be gc'd. They are meant for temporary transmition of data.
getSelection
Pair<Integer,Integer> getSelection()
- Returns:
- the selection with the start and ending locations paired together. The cursor location is at the second
location in the pair while the selection is defined between the two.
getScroll
Pair<Integer,Integer> getScroll()
- Returns:
- the scroll offset of the scroll pane with the first element being the vertical scroll and the second
being the horizontal scroll
getFile
File getFile()
- Returns:
- the filename of the document being described by this getter.
getPackage
String getPackage()
- Returns the package declared in the java code within the document being described
- Returns:
- the package of this document.
isActive
boolean isActive()
- Returns:
- true iff the described document is the current active document.
isUntitled
boolean isUntitled()
- Returns:
- whether the document has a file currently associated with it.