ing-bank/vscode-psl

Be able to jump to classes (ctrl +click) for METHOD^CLASS call

Presumably opened this issue · 7 comments

Be able to jump to classes (ctrl +click) for METHOD^CLASS call

Nice idea. But the assumption method^Class is not correct, {subRoutine}^Routine.
With classes in PSL files, it will work nice but will hit you with PROC files where PROCEDURE is not always class and for sure its name can be different from its routine name which you are referring with M^R notation.

So to make this generic you should check which procedure will be compiled to routine name you are clicking. Probably this can be limited to procedures anyway as it's even more complicated with filers.

PROC files where PROCEDURE is not always class

A simple solution will assume they are the same. I believe this is a requirement starting from 7.6

So to make this generic you should check which procedure will be compiled to routine name you are clicking

More complicated. Might not be implemented...

Yes it is... but at the same time
select procid,pgm,des from DBTBL25 where procid<>pgm
is not empty.

Of course. Still, having support for the simple case is still an improvement, and can be implemented with little effort.

Mapping procedure to routine for everything in the project will require some kind of in-memory structure that must be continuously refreshed. I'm putting off creating such a structure. However it would enable other improvements, for example a package explorer or saving CPU and time on unnecessary parsing.

That's a great starting point :)
And maybe a simple validation for PROC files to check if PROCID==PGM?

Great idea! I'll include them together :)

Has anyone started work on this yet? If not, I can see what I can do for the simple case.