codefori / vscode-ibmi-fs

File system provider for IBM i QSYS
MIT License
8 stars 4 forks source link

Edit *BNDDIR results in error #16

Closed ChrisHird closed 2 months ago

ChrisHird commented 2 months ago

When trying to edit the *BNDDIR we are getting the error The editor could not be opened due to an unexpected error: command 'code-for-ibmi.runCommand' not found

Just installed the extension but did reboot the VSCode environment.

ChrisHird commented 2 months ago

Checked the code in the repository, should be running Code4i.runCommand? do we have a bad package?

worksofliam commented 2 months ago

We don't actually provide a way to edit binding directories or message files in Code for IBM i. That is something we might provide in the future.

Clicking on the object and having that end in error is as expected.

Cc @sebjulliand

ChrisHird commented 2 months ago

Maybe I am trying to do something wrong here? vscode-ibmi-fs README Provides the ability to view QSYS objects as JSON with Code for IBM i.

Has support for:

Message Files (MSGF) Binding Directories (BNDDIR)

Maybe you cannot edit them but should still show the content and not the error?

worksofliam commented 2 months ago

@ChrisHird my bad. Didn't realise this was the fs repo.

I do believe the fs repo is out of date with our API, which explains why it doesn't work. We haven't worked on it in a while - partly why we haven't released it.

ChrisHird commented 2 months ago

No Problem, can we fix it or will it never get released? We use both object extensively and *BNDDIR is poorly supported on RDi (spits on ground)! Just being able to see the content would help a lot especially when debugging compiler errors so the JSON output would be fine, or just a list. Finally got round to displacing RDi (fed up with losing updates and getting strange code changes we did not do) so I am on the path to VSCode greatness :-)

worksofliam commented 2 months ago

@ChrisHird i can take a look at fixing it next week.

ChrisHird commented 2 months ago

Thanks,

sebjulliand commented 2 months ago

I'll can have a quick look tomorrow...it should be an easy fix, we haven't depreciated so many functions I guess 😅

sebjulliand commented 2 months ago

@ChrisHird the work was actully done, but as you said, you had the wrong package because we never re-generated a new vsix. Check out the latest pre-release, you'll find the updated vsix that works quite well: https://github.com/codefori/vscode-ibmi-fs/releases/tag/0.0.2. I listed supported types and possible operations.

@worksofliam you already did the work to edit BNDDIR entries 😁

ChrisHird commented 2 months ago

Seb, checked out and works well, one slight request is the dtaara edit, when is the value saved when you change it? We are testing with Ctl/S and it works OK but nothing to state it was updated. Closing and re-opening does show the changed value.

Thanks Chris...

sebjulliand commented 2 months ago

That's the whole point: this acts like an editor, which means that when the value gets changed, the editor tab will bear a plain dot: image

This means the editor is dirty and needs to be saved. Once it's saved, it goes back to it's initial state, with a cross: image

If there's a dot, it must be saved. Closing an editor with in a dirty state will prompt you to save, too. image

This is all standard VS Code stuff, nothing specific to the extension.