This interface represents a source file.
interface ISourceFile extends ${IWindow} {
// Properties
readonly ${filename}: string;
// Methods
${save}(): void;
${saveAs}(newFilename: string): void;
${copy}(): void;
${paste}(): void;
${select}(textSelection: ${ITextSelection}): void;
${clearSelection}(): void;
${moveCursor}(line: number): void;
${moveCursor#moveCursor1}(position: ${ITextPosition}): void;
${setText}(text: string): void;
${addText}(text: string): void;
${insertText}(text: string, pos: ${ITextPosition}): void;
}
// This interface is not available in managed environment
// This interface is not available in native environment
readonly filename: string;
// This property is not available in managed environment
// This property is not available in native environment
Full path to the source file.
save(): void;
// This method is not available in managed environment
// This method is not available in native environment
Saves changes made to a source file.
saveAs(newFilename: string): void;
// This method is not available in managed environment
// This method is not available in native environment
newFilenameSaves the source file to a different file.
copy(): void;
// This method is not available in managed environment
// This method is not available in native environment
Copy the current selection to the Clipboard.
paste(): void;
// This method is not available in managed environment
// This method is not available in native environment
Paste text from the Clipboard.
select(textSelection: ${ITextSelection}): void;
// This method is not available in managed environment
// This method is not available in native environment
textSelectionSelect a given range in a source file.
clearSelection(): void;
// This method is not available in managed environment
// This method is not available in native environment
Clears the current selection.
moveCursor(line: number): void;
// This method is not available in managed environment
// This method is not available in native environment
lineMove the cursor to the beginning of a given line.
moveCursor(position: ${ITextPosition}): void;
// This method is not available in managed environment
// This method is not available in native environment
positionMove the cursor to the given position.
setText(text: string): void;
// This method is not available in managed environment
// This method is not available in native environment
textReplace the text in a source file.
addText(text: string): void;
// This method is not available in managed environment
// This method is not available in native environment
textAdd text to the end of the source file.
insertText(text: string, pos: ${ITextPosition}): void;
// This method is not available in managed environment
// This method is not available in native environment
textposInsert a text text at position pos.