Skip to content

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

Merged
Sheng Chen (jdneo) merged 16 commits into
microsoft:masterfrom
xqzlgy2:master
Oct 13, 2020
Merged

Sheng Chen (jdneo) merged 16 commits into
microsoft:masterfrom
xqzlgy2:master

Conversation

@xqzlgy2

@xqzlgy2 Qinzhou Xu (xqzlgy2) commented Sep 29, 2020 •

Copy link
Copy Markdown
Contributor

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 Qinzhou Xu (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

Odin Dahlström (0dinD) commented Sep 29, 2020 •

Copy link
Copy Markdown
Contributor

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

Sheng Chen (jdneo) commented Sep 29, 2020 •

Copy link
Copy Markdown
Member

Odin Dahlström (@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.)

@jdneo Sheng Chen (jdneo) left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread package.json Resolved
@jdneo Sheng Chen (jdneo) added the enhancement New feature or request label Sep 30, 2020
@jdneo Sheng Chen (jdneo) added this to the 0.14.0 milestone Sep 30, 2020
Comment thread src/explorerCommands/delete.ts Resolved
Comment thread src/explorerCommands/utils.ts Resolved
Comment thread src/explorerCommands/delete.ts Resolved
Comment thread src/explorerCommands/delete.ts Resolved
Comment thread src/explorerCommands/delete.ts Resolved
Comment thread src/explorerCommands/delete.ts Resolved
@jdneo

Copy link
Copy Markdown
Member

Thanks Qinzhou Xu (@xqzlgy2)!

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