-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Implementing copy/paste #57262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Implementing copy/paste #57262
Changes from 33 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
36e67a4
Testing basic changes
navya9singh 5d931f8
Basix structure working
navya9singh 17f9897
Allows different text in each cursor location
navya9singh 64da77e
working changes
navya9singh 89ef072
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 4fe48f6
removing extra code
navya9singh 17ff23a
Fixing protocol changes and tests
navya9singh 1b89d2e
Removing deleted files
navya9singh e6515ea
Removing deleted files
navya9singh bfe79a9
fixing eslint errors
navya9singh ab542b5
fiixng formatting and baseline changes
navya9singh 9ef3d85
Minor fixes
navya9singh 281e2f1
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 7f41f30
Fixing baselines
navya9singh d3816d3
changes based on reviews 1
navya9singh 3914539
changes based on review 2
navya9singh 83a4328
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh c6b6f23
fixing formatting
navya9singh c8c3e29
baseline changes
navya9singh 5192ff2
accepting baselines
navya9singh 215e778
Removing updateGraph for reverting the file
navya9singh ccd35b1
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 1fe2754
changing protocol name
navya9singh c67137b
Removing extra baselines
navya9singh e83eae1
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 392dd75
adressing pr comments
navya9singh d7cbcd0
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 778e2b4
protocol changes and fixed tests
navya9singh f302b65
missed change for fourslash tests
navya9singh 7027ea3
changes to avoid duplicated imports for symbols that are added to exi…
navya9singh a9f7127
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 8e486d6
fixing tests
navya9singh 835acda
small fixes
navya9singh 3b79cb1
new fixes for non exported symbols in import adder
navya9singh d7f7b15
Merging with main
navya9singh 82fc3bf
adressing pr comments
navya9singh 5e7e39b
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 0ef7161
fixing merge conflicts
navya9singh 4980cc5
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 7c6a146
resolving merge conflicts
navya9singh eaa1aaf
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 4ec4ccc
fixing tests
navya9singh 1a36951
small fixes
navya9singh 4d37a06
Adressing pr comments
navya9singh 66ca5be
adressing pr comments
navya9singh e8189c3
adding `getPasteEdits` to session.ts and services.ts
navya9singh 213587e
adding changes to handle pasted text
navya9singh 68ce405
Removing baselines for deleted tests
navya9singh 5e1ff78
adressing pr comments
navya9singh a3fbd69
adding changes tests and protocol
navya9singh 8c23899
fixing test formatting
navya9singh 1958d1a
Merge branch 'main' of https://github.com/navya9singh/TypeScript into…
navya9singh 3fe8f48
fixing error in pasteEdit.ts
navya9singh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,6 +161,7 @@ export const enum CommandTypes { | |
GetApplicableRefactors = "getApplicableRefactors", | ||
GetEditsForRefactor = "getEditsForRefactor", | ||
GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", | ||
GetPasteEdits = "getPasteEdits", | ||
/** @internal */ | ||
GetEditsForRefactorFull = "getEditsForRefactor-full", | ||
|
||
|
@@ -625,6 +626,28 @@ export interface GetMoveToRefactoringFileSuggestions extends Response { | |
}; | ||
} | ||
|
||
/** | ||
* Request refactorings at a given position post pasting text from some other location. | ||
*/ | ||
|
||
export interface GetPasteEditsRequest extends Request { | ||
command: CommandTypes.GetPasteEdits; | ||
arguments: GetPasteEditsRequestArgs; | ||
} | ||
|
||
export type GetPasteEditsRequestArgs = FileRequestArgs & { | ||
pastedText: string[]; | ||
pasteLocations: TextSpan[]; | ||
copiedFrom?: { file: string; range: TextSpan[]; }; | ||
andrewbranch marked this conversation as resolved.
Show resolved
Hide resolved
navya9singh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
navya9singh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export interface GetPasteEditsResponse extends Response { | ||
body: PasteEditsAction; | ||
} | ||
export interface PasteEditsAction { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the future we will likely want a
navya9singh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
edits: FileCodeEdits[]; | ||
fixId?: {}; | ||
} | ||
|
||
export interface GetEditsForRefactorRequest extends Request { | ||
command: CommandTypes.GetEditsForRefactor; | ||
arguments: GetEditsForRefactorRequestArgs; | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "../pasteEdits"; |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.