Skip to content
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

feat: Add 'delete' into the view context menu #343

Merged
merged 16 commits into from
Oct 13, 2020
Merged

Conversation

xqzlgy2
Copy link
Contributor

@xqzlgy2 xqzlgy2 commented Sep 29, 2020

Enable User to delete package/file in context menu like below.

  • All deleted file will be moved to Recycle Bin/Trash by default.
  • Added File/Type into ContextValueType to distinguish common files and Java source files.
  • Added +enum/+class/+interface as attributes to Type for detecting different kinds of source files.
  • Added key binding for delete.
  • Preserve focus when open file through Java project explorer

image
image
image

part of #207

@xqzlgy2 xqzlgy2 changed the title feat: Add 'delete' into the view context menu (#207) feat: Add 'delete' into the view context menu Sep 29, 2020
@0dinD
Copy link
Contributor

0dinD commented Sep 29, 2020

Awesome, this is just what I wanted! If it's not too much to ask for, do you think you could add a 'rename' option to the menu? I think you can do it via the extension API, and hopefully vscode-java would be able to pick up on that rename event, in order to provide a refactoring to change the class name. (Which it does when you rename a java file from the file explorer.) I understand if this is not trivial to add because of API limitations, but it would be very nice to have if it's possible to implement.

@jdneo
Copy link
Member

jdneo commented Sep 29, 2020

@0dinD Yes, rename will be added after this PR.

// BTW, we will have the National Holiday at our side so it will happen after the holiday (about in Mid. Oct.)

Copy link
Member

@jdneo jdneo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xqzlgy2 Could you please also investigate if it is possible to set default keyboard shortcut for this command in package.json?

package.json Outdated Show resolved Hide resolved
@jdneo jdneo added the enhancement New feature or request label Sep 30, 2020
@jdneo jdneo added this to the 0.14.0 milestone Sep 30, 2020
src/explorerCommands/delete.ts Outdated Show resolved Hide resolved
src/explorerCommands/utils.ts Outdated Show resolved Hide resolved
src/explorerCommands/delete.ts Outdated Show resolved Hide resolved
src/explorerCommands/delete.ts Outdated Show resolved Hide resolved
@jdneo
Copy link
Member

jdneo commented Oct 13, 2020

Thanks @xqzlgy2!

@jdneo jdneo merged commit f385213 into microsoft:master Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants