-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Support reviewing resolutions with merge editor (#103)
Changes: 1. add optional configuration property "diffEditorType". If set to "merge" then open resolutions using merge editor. Otherwise use the diff editor. 2. create text document content provider for serving read only virtual files to be used as left side of the merge. Register the provider under "konveyorReadOnly" scheme. --------- Signed-off-by: Radoslaw Szwajkowski <[email protected]>
- Loading branch information
Showing
6 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { | ||
CancellationToken, | ||
Event, | ||
ProviderResult, | ||
TextDocumentContentProvider, | ||
Uri, | ||
workspace, | ||
} from "vscode"; | ||
|
||
export default class KonveyorReadOnlyProvider implements TextDocumentContentProvider { | ||
onDidChange?: Event<Uri> | undefined; | ||
provideTextDocumentContent(uri: Uri, _token: CancellationToken): ProviderResult<string> { | ||
return workspace.fs | ||
.readFile(Uri.from({ ...uri, scheme: "file" })) | ||
.then((buffer) => buffer?.toString() ?? ""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export const KONVEYOR_SCHEME = "konveyorMemFs"; | ||
export const KONVEYOR_READ_ONLY_SCHEME = "konveyorReadOnly"; | ||
export const RULE_SET_DATA_FILE_PREFIX = "analysis"; | ||
export const SOLUTION_DATA_FILE_PREFIX = "solution"; |