Class FilePathCompletionResult

java.lang.Object
org.eclipse.lemminx.extensions.filepath.participants.FilePathCompletionResult

public class FilePathCompletionResult extends Object
File path completion result information.
  • Constructor Details

    • FilePathCompletionResult

      public FilePathCompletionResult(int startOffset, int endOffset, Path baseDir)
  • Method Details

    • getStartOffset

      public int getStartOffset()
      Returns the start offset of the last path declared (ex : invalid input: '<'a href="path/to/|file.xml").
      Returns:
      the start offset of the last path declared.
    • getEndOffset

      public int getEndOffset()
      Returns the end offset of the last path declared (ex : invalid input: '<'a href="path/to/file.xml|").
      Returns:
      the end offset of the last path declared.
    • getBaseDir

      public Path getBaseDir()
      Returns the resolved base directory of the declared path.

      Ex :

      the method will return 'file://C:/path/to'

      Returns:
      the resolved base directory of the declared path.
    • create

      public static FilePathCompletionResult create(CharSequence content, String fileUri, int startNodeOffset, int endNodeOffset, int completionOffset, Character separator)
      Create the file path completion result.
      Parameters:
      content - the xml content.
      fileUri - the file Uri.
      startNodeOffset - the start node offset where file path is declared.
      endNodeOffset - the end node offset where file path is declared.
      completionOffset - the completion offset.
      separator - the separator used to declare multiple files and null otherwise.
      Returns:
      the file path completion result.