Skip to content

Add code action to generate binder source#463

Draft
SanjulaGanepola wants to merge 2 commits intomainfrom
feature/generate-binder-source
Draft

Add code action to generate binder source#463
SanjulaGanepola wants to merge 2 commits intomainfrom
feature/generate-binder-source

Conversation

@SanjulaGanepola
Copy link
Member

Changes

Implements #281

Added new code action:

image

Generates binder source in new file:

image

Checklist

  • have tested my change
  • Remove any/all console.logs I added
  • for feature PRs: PR only includes one feature enhancement.

Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>
@SanjulaGanepola
Copy link
Member Author

@worksofliam Was a code action what you were thinking when you opened #281?

@SanjulaGanepola SanjulaGanepola linked an issue Oct 1, 2025 that may be closed by this pull request
@worksofliam
Copy link
Member

@SanjulaGanepola I am not sure. I am a little concerned about using a code action for an entire file. A code action is typically used for a given position or range.

@SanjulaGanepola
Copy link
Member Author

Yes I was thinking that as well. Options:

  • Only show it when the cursor is inside an export procedure
  • Rather than have a code action, just have a command in the command pallette

Another thought, should add add a quick pick with multi-select from them to select which exported procedures to include in the generated binder source?

What do you think?

Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>
@SanjulaGanepola SanjulaGanepola marked this pull request as draft November 12, 2025 20:10
@bobcozzi
Copy link

Was this implemented? I was wondering what problem it was trying to solve?
Just FYI, once a *MODULE or *SRVPGM is created, you can do a RTVBNDSRC command and generated the Binder Source.
What would be marginally helpful, however, is when updating a tool that uses Binder Source, and adding a new exported procedure, to have the ability to "Add Procedure Export to Binder Source" command and target the Binder Source member--by inserting the EXPORT at the bottom of that source member, but above the ENDPGMEXP command.
Or even easier, how about a "Copy Procedure Export as Binder Source" that simply copies/adds the EXPORT command to the clipboard and the User can then paste it into the binder source where desired. That would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to generate binder source from module source

3 participants