Auto indentation

Posted by ksv on 23-Apr-2009 05:10

When I'm typing "DO:" and pressing ENTER I get 2 major snags:

1. auto completion list appears and its first item is inserted in the code after the colon. So when I don't look at the screen I often discover things like that

DO:TRANSACTION

I understand that TRANSACTION is a highly recommended option for DO block, but I'd prefer to type it manually and before the colon. I like the autocompletion very much so I wouldn't like to turn it off.

2. I type "END" and it's not aligned under DO, so it looks like that

DO:

    END.

I agree it looks cool but I don't like that so I have to align every END manually.

Are there any ways to solve these little shortcomings which annoys me and the other members of my team?

All Replies

Posted by rbf on 23-Apr-2009 05:46

Hi Sergey,

I agree with your observations on both counts, although the first one really is a bug that is a bit more complicated. OEA misinterprets the colon and incorrectly suggests all methods it can find on the system. In addition to that the keywords are listed but inserted incorrectly when selected as you observed. The most annoying behavior for me is that OEA inserts the first method in the list when you type DO:.

A workaround for your second observation is typing CTRL-I. If you don't select any code, it applies to your entire source. That *can* be a good thing if you are aware of it.

Yet I like the auto-indentation and smart paste features, especially CTRL-I which has the potential to beautify your code. I even like it that much that I am willing to adopt the standards imposed by OEA, even though it would be nice if one could modify these.

I have already logged a bunch of issues with this, since I would really like Progress to get it perfect in the end.

I would suggest you three issues with Tech Support for this. The first two are bugs and the third one really an enhancement request.

-peter

Posted by ksv on 23-Apr-2009 06:43

Hi Peter,

Thank you, I haven't known of CTRL-I, I just played with it a bit and it looks really great. The only thing with it which concerns me that it applies to entire source file - it works just terribly with AB files. I'll definitely log my problems but what really disappoints me that PSC hasn't fixed them so far and there's no chance they will.

Posted by Matt Baker on 23-Apr-2009 08:26

You can turn off the auto-completion assistance in the editor preferences.  This will prevent you from getting prompted when you are not looking.  It will still be available on ctrl+space.  The preference is in Window->Preferences->OpenEdge Architect->Asssistance->Auto completion on '.' and ':'.

Posted by Matt Baker on 23-Apr-2009 08:28

Indentation, keyword expansion and casing can all work with a highlighted section of the code. So you can highlight a method or a block of your code and have it modified without touching the whole file.

Posted by ksv on 23-Apr-2009 08:40

Well, it's cool that you can turn off auto-completion but what was the point to implement it in the first place if it's better to keep it off?!

Posted by Matt Baker on 23-Apr-2009 09:18

Lots and lots of preferences.   I write a lot of java and C# code in both the JDT and Visual Studio and even as accurate as these top level tools appears to be, there are still plenty of times when I don't like what they do.  As code completion gets smarter with each release, I learn to use different parts of it to fit my style.

For example, there is a preference to overwrite vs insert when using code completion that controls where new code is put for content assistance.  It either overwrites what is present or appends to what is present and leave everything alone after the expansion point.  I prefer insert, but I know several people who insist on overwrite.

Posted by ksv on 24-Apr-2009 02:32

I agree that autocompletion might annoy you sometimes in IDEs such as VS, but in general it more helps than troubles, unfortunately I can't say that about OEA. Anyway CTRL-I with code selection seems to work well.

Posted by Lieven De Foor on 28-Apr-2016 09:44

It's seven (!) years later and these bugs are still there!

When will this get properly addressed?

Is anyone from Progress listening?

Btw, nowadays it's DO:ACCEPT-CHANGES () you get when typing DO: and waiting a split second before pressing enter...

Posted by tbergman on 28-Apr-2016 12:16
That’s not a bug, it’s a feature.
 
I like to turn off “Automatically propose completion on . or :” in the OpenEdge editor settings. It’s easy enough to press Ctrl-Space if I want some help.
 
Tom
 
Posted by Lieven De Foor on 29-Apr-2016 02:44

[quote user="tbergman"]
That’s not a bug, it’s a feature.
[/quote]

You forgot your <sarcasm> tags [;)]

[quote user="tbergman"]
I like to turn off “Automatically propose completion on . or :” in the OpenEdge editor settings. It’s easy enough to press Ctrl-Space if I want some help.
[/quote]

That's what I'm doing too now.
It's the

DO:

    END.

that's bothering me more...

This thread is closed