All Packages Class Hierarchy This Package Previous Next Index
Object | +----com.symantec.itools.vcafe.openapi.SourceFile
SourceFile
.
SourceFile
's editor window, and optionally save its contents.
SourceFile
's editor window.
SourceFile
objects represent the same file.
File
associated with this SourceFile
.
File
associated with this SourceFile
.
File
associated with this SourceFile
.
ProjectFile
associated with this SourceFile
.
Range
.
Range
as a String
.
Range
of the currently selected text.
SourceFile
's entire contents.
SourceFile
's entire contents as a String
.
SourceFile
is locked (on disk, or locked in source control).
SourceFile
has been modified.
SourceFile
is open in an editor window.
SourceFile
.
SourceFile
's editor window with the contents on disk.
SourceFile
to disk.
SourceFile
.
Range
with the new text.
Range
with the new text String
.
SourceFile
's entire contents.
SourceFile
's entire contents with the contents of a String
.
String
that represents this object.
public SourceFile()
public abstract void addSourceFileListener(SourceFileListener listener)
SourceFile
.
All changes to this SourceFile
are broadcast to the listeners registered with it.
SourceFile
.
public abstract void close(boolean saveChanges)
SourceFile
's editor window, and optionally save its contents.
true
to save this file's contents, false
to discard any changes made to
this SourceFile
.
public abstract void edit()
SourceFile
's editor window.
If this SourceFile
isn't open yet, it is opened.
public abstract boolean equals(SourceFile sourceFile)
SourceFile
objects represent the same file.
public abstract java.io.File getFile()
File
associated with this SourceFile
.
This method never returns null
, but the actual file may not exist on disk
(i.e. File.exists() == false
).
File
associated with this SourceFile
.
public abstract java.lang.String getFullName()
File
associated with this SourceFile
.
SourceFile
.
public abstract int getInsertionPoint()
SourceFile
is not
currently open.
public abstract java.lang.String getName()
File
associated with this SourceFile
.
The base name is everything in the pathname after the last occurrence of the
separator character (i.e. no directory information).
public abstract com.symantec.itools.vcafe.openapi.ProjectFile getProjectFile()
ProjectFile
associated with this SourceFile
. If this file
is not in a project, returns null
.
ProjectFile
, or null
if this file is not in a project.
public abstract java.lang.StringBuffer getRangeText(Range theRange)
Range
.
The current selection range of this SourceFile
is not changed by this method.
Range
from which to get the text.
StringBuffer
containing the in-range text.
public abstract java.lang.String getRangeTextString(Range theRange)
Range
as a String
.
The current selection range of this SourceFile
is not changed by this method.
Range
from which to get the text.
String
containing the in-range text.
public abstract com.symantec.itools.vcafe.openapi.Range getSelectionRange()
Range
of the currently selected text.
null
if the SourceFile
is not
currently open.
public abstract java.lang.StringBuffer getText()
SourceFile
's entire contents.
StringBuffer
containing the entire SourceFile
contents.
public abstract java.lang.String getTextString()
SourceFile
's entire contents as a String
.
String
containing the entire SourceFile
contents.
public abstract boolean isLocked()
SourceFile
is locked (on disk, or locked in source control).
true
if locked either on disk or in source control, false
if it is not locked.
public abstract boolean isModified()
SourceFile
has been modified.
true
if it has been modified, false
otherwise.
public abstract boolean isOpen()
SourceFile
is open in an editor window.
true
if the file is open, false
otherwise.
public abstract void removeSourceFileListener(SourceFileListener listener)
SourceFile
.
The listener stops receiving notifications of changes to this SourceFile
.
public abstract void revertToSaved()
SourceFile
's editor window with the contents on disk.
public abstract void save()
SourceFile
to disk.
public abstract boolean setModified(boolean modified)
SourceFile
.
Note: Use this method ONLY for marking the SourceFile
as modified when
the changes haven't been set with setRangeText()
or setText()
.
Note: Use of this method does not result in listeners being notified of the change.
This can be useful when making a change that hasn't been committed, so
that if the user closes the SourceFile
's editor window, the user is
prompted to save the changes. You can then flush or commit your changes.
You should listen for other changes to the SourceFile
, so you don't inadvertantly
set the SourceFile
as unmodified, when it has been modified elsewhere.
SourceFile
.
SourceFile
.
public abstract void setRangeText(StringBuffer newText, Range theRange)
Range
with the new text. The resulting new Range
is then
returned in theRange.
public abstract void setRangeText(String newText, Range theRange)
Range
with the new text String
.
The resulting new Range
is then returned in theRange.
public abstract void setSelectionRange(Range newRange)
public abstract void setText(StringBuffer newText)
SourceFile
's entire contents.
SourceFile
.
public abstract void setText(String newText)
SourceFile
's entire contents with the contents of a String
.
SourceFile
.
public java.lang.String toString()
String
that represents this object.
String
.
All Packages Class Hierarchy This Package Previous Next Index