Skip to content

Open changes (compare files) of custom editors using code editor #14337

Answered by safisa
safisa asked this question in Q&A
Discussion options

You must be logged in to vote

I have resolved it by overriding the DiffService class:

  1. first I have added 2 settings properties, one (boolean) to disable the use of custom editor in diff/comapre, and another one (array) that contains all file extensions that will ignore the custom editor use in diff/compare (in case the first setting is not disabled)
  2. overriding the DiffService by extending it and rebind the new class
@injectable()
export class CustomDiffService extends DiffService {

    @inject(PreferenceService)
    protected readonly preferenceService: PreferenceService;

    public async openDiffEditor(left: URI, right: URI, label?: string, options?: OpenerOptions): Promise<void> {
        //super.openDiffEditor(…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pisv
Comment options

Answer selected by safisa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants