vscode-ibmi icon indicating copy to clipboard operation
vscode-ibmi copied to clipboard

Refresh file

Open julesyan opened this issue 1 year ago • 3 comments

Changes

Added the ability to refresh an IFS file. Button is located in the top right of the editor, similar to Run Actions. Making use of the pre-existing command workbench.action.files.revert from VSCode

How to test this PR

  1. Open an IFS file
  2. Make/Trigger changes to the file elsewhere
  3. Click refresh button, file should update with latest content

Checklist

  • [x] have tested my change
  • [ ] have created one or more test cases
  • [ ] updated relevant documentation
  • [x] Remove any/all console.logs I added
  • [x] have added myself to the contributors' list in CONTRIBUTING.md

julesyan avatar May 08 '24 23:05 julesyan

@chrjorgensen @julesyan

Is there a way to warn the user about this? And save or discard the changes before refreshing?

This is a great point. I am guessing we might have to define our own command, which wraps a warning if the document is dirty before executing the command programmatically.

Julia, take a stab at that if you want - and feel free to reach out and I can offer my help whenever!

worksofliam avatar May 10 '24 13:05 worksofliam

@chrjorgensen @sebjulliand Any chance you can add discard.changes for FR and DA when you get a chance? Thanks!

worksofliam avatar May 15 '24 13:05 worksofliam

@chrjorgensen @sebjulliand Any chance you can add discard.changes for FR and DA when you get a chance? Thanks!

Sure:

"discard.changes": "Vos modifications vont être perdues",

sebjulliand avatar May 15 '24 13:05 sebjulliand