Skip to content

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?

@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
@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