10.2A01: In which .jar is the function for SOURCE -> CORR

Posted by Stefan Marquardt on 04-May-2009 05:29

Hello,

i am struggeling with the correct case and user defined templates.

Meanwhile i can override every template (like for a new class, method, ...).

But some code is the result of a call to the class OETemplateUtil that is only available as binary so i can't change it without hexeditor.

My idea is using the function that is called during changing the selected source to the correct case. (in the editor)

Is there any function available i can use in the jet template that returns the correct case string and has one string parameter?

Perhaps it is anywhere in progresside.jar?

Stefan

All Replies

Posted by Thomas Mercer-Hursh on 04-May-2009 11:14

What about just accepting it as it is and correcting it on save?  Tacky, I know, and we should have a switch, but ...

Posted by Matt Baker on 04-May-2009 12:42

I would log a bug for this.  There is not a lot of code in OETemplateUtil that generates code.  Most of the methods are just convenience for the several lines required to make a new template generation call.  But there are a few cases such as generate comments, generate return statement, and catch/finally blocks that should be accessible through the templates.

Posted by Thomas Mercer-Hursh on 04-May-2009 12:57

Not only should they be accesible, but all templates should be processed according to case preference settings when they are read.  I.e., I should only have to edit a template if I want different content, not because I want different case.  I've been asking for this since 10.1A.

Posted by Stefan Marquardt on 05-May-2009 01:47

> but all templates should be processed according to case preference settings

I logged bugs for much case problems.

Macros, default templates, ... should be changed during insert at once and not during save.

Correct case misses much progress keywords if you load exisiting code with uppercase keywords and choose Source -> Correct case.

I think that OEA should know all keywords from progress ABL ;-)

Some examples:

NO-ERROR,ENTRY,QUERY,DATASET,CAN-DO, .....

Will be fixed (perhaps) in 10.2B ....

Posted by Stefan Marquardt on 05-May-2009 05:09

I noticed another thing in the templates:

The codestyle is different for every template!

Some imports system.util, some not, some use a data class, some parameters, some variables for the parameters, ...

I can't notice something like a style concept  for these templates, they seems to be written from different peoples

This thread is closed