openedFile property

String? get openedFile

Currently opened file.

Implementation

String? get openedFile => _openedFile;
set openedFile (String? file)

Open a file using the controller API instead of passing filePath parameter to CodeForge

Implementation

set openedFile(String? file) {
  final previousFile = _openedFile;
  _openedFile = file;
  if (openedFile != null) {
    text = File(_openedFile!).readAsStringSync();
  }

  if (previousFile != openedFile &&
      lspConfig != null &&
      lspConfig!.isInitialized &&
      openedFile != null) {
    (() async {
      await _openDocumentInLsp(previousFile: previousFile);
    })();
  }
}