Class FilePathCompletionResult
java.lang.Object
org.eclipse.lemminx.extensions.filepath.participants.FilePathCompletionResult
File path completion result information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilePathCompletionResultcreate(CharSequence content, String fileUri, int startNodeOffset, int endNodeOffset, int completionOffset, Character separator) Create the file path completion result.Returns the resolved base directory of the declared path.intReturns the end offset of the last path declared (ex : invalid input: '<'a href="path/to/file.xml|").intReturns the start offset of the last path declared (ex : invalid input: '<'a href="path/to/|file.xml").
-
Constructor Details
-
FilePathCompletionResult
-
-
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
Returns the resolved base directory of the declared path.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.
-