SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[10.0.187 Pro] - SQL Editor issues

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[10.0.187 Pro] - SQL Editor issues
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post [10.0.187 Pro] - SQL Editor issues Reply with quote
There are at least two options in Editor Options in SQL Editor that does not seem to work correctly.

The first one is Unindent keep align. This setting cannot be changed. It starts as unchecked but when I check it, click Ok and reopen the Editor Options dialog it is unchecked again. It also behaves as if it was checked.

The second one is Auto indent mode. That setting seems to be ignored. It can be changed and the change is persistent (I mean it stays that way after reopening Editor Options) but regardless of its state (checked or otherwise) the editor always seem to be in Auto indent mode, that is, after pressing Enter it always positions the cursor on the first non-blank character of the preceding non-blank line.
Tue Nov 13, 2018 9:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
Thank you. I believe, both editor settings are superseded by indenting and auto-formatting settings in SQL Assistant area, which take over code indenting. Perhaps they are only effective if SQL Assistance is suspended. I'm going to log this anyway, perhaps it can be changed in a way that's less confusing or just hide them.
Tue Nov 13, 2018 10:18 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post Reply with quote
That could make sense in case of Auto Indent Mode as there's an Auto Indent Mode existing in SA Options > Code Formatting. But I couldn't find anything resembling the Unindent keep align. Which setting shall I look for?
Tue Nov 13, 2018 10:59 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
They are going to hide Auto indent mode in the 10.1 maintenance release as a way to eliminate conflicting and redundant options. Unfortunately I don't know how Unindent keep align is supposed to work, and the explanation given to me doesn't help me much. I've asked for more details.
Wed Nov 14, 2018 10:47 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post Reply with quote
It is supposed to work like this. Let's say you have the following code in the editor:
Code:

BEGIN
    IF ...
        BEGIN
            ...
            BEGIN
                ...
            END
            ...
        END
        ELSE
        BEGIN
            ...
        END
    -- comment here
END

and let's assume you selected the text from IF to -- comment here.

Now, if you have Unindent keep align unchecked and you hit Shift+Tab like there's no tomorrow, you're going to end up with the code like this, nice and flat against the left side pos 1 margin.
Code:

BEGIN
IF ...
BEGIN
...
BEGIN
...
END
...
END
ELSE
BEGIN
...
END
-- comment here
END


On the other hand, if that setting is checked, unindenting stops as soon as the leftmost character hits position 1, thus the code now looks like this, regardless of how hard you're pushing Shift+Tab through several levels of building down below:
Code:

BEGIN
IF ...
    BEGIN
        ...
        BEGIN
            ...
        END
        ...
    END
    ELSE
    BEGIN
        ...
    END
-- comment here
END

IF gets to pos 1 and prevents anyone else from doing so.
Wed Nov 14, 2018 11:17 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
Thank you. I get it now.
Wed Nov 14, 2018 1:07 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.