Merged
Conversation
bpasero
requested changes
Nov 9, 2017
Member
bpasero
left a comment
There was a problem hiding this comment.
Good start, some minor things.
| import { IModeService } from 'vs/editor/common/services/modeService'; | ||
|
|
||
|
|
||
| export class ClipboardContentProvider implements ITextModelContentProvider { |
Member
There was a problem hiding this comment.
Can we inline this into the CompareWithClipboardAction, I do not think it deserves its own top level thing.
| const provider = instantiationService.createInstance(ClipboardContentProvider); | ||
| // this.toDispose.push(provider); | ||
|
|
||
| const registrationDisposal = textModelService.registerTextModelContentProvider(CompareWithClipboardAction.SCHEME, provider); |
Member
There was a problem hiding this comment.
Can we move the registration into the run method and dispose it after the run has finished? This makes sure we are not keeping the clipboard content provider around for any longer than for the invocation of the action.
| ); | ||
|
|
||
|
|
||
| if (resource && resource.scheme === 'file') { |
Member
There was a problem hiding this comment.
You do not need to check for resource.scheme === 'file' again, the previous call makes sure of that.
Member
|
@maxfurman thanks! |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #7278
Open the clipboard contents side-by-side with the currently open buffer
Also I found a typo in one of the tslint error messages.