SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 9.0.199 Pro] - Formatting bug [FIXED]
Goto page Previous  1, 2
 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 9.0.199 Pro] - Formatting bug [FIXED]
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [SA 9.1.261 Pro] - Formatting rule disregarded Reply with quote
I've got a custom formatting rule set for ALTER PROCEDURE for SQL Server that is either disregarded when applying formatting . The rule for default is the following:
Code:

ALTER PROCEDURE ...
    @...
   ,@...
WITH ...
    ,...
AS
   <stmtList>
GO


Which formats the code below:
Code:

ALTER PROCEDURE uadmin.usp_set_foldhely_arkategoria
    @foldhely_id INT,
    @id_arkategoria INT,
    @debug INT=NULL
AS
BEGIN
SELECT 1 AS a
END
GO


to
Code:

ALTER PROCEDURE uadmin.usp_set_foldhely_arkategoria
    @foldhely_id INT
   ,
    @id_arkategoria INT
   ,
    @debug INT = NULL
AS
BEGIN
    SELECT
        1 AS a
END
GO

in case it does anything at all (see here).
The same rule for custom is:
Code:

ALTER PROCEDURE ...
   @..., @...
WITH   ..., ...
AS
   <stmtList>
GO

results in:
Code:

ALTER PROCEDURE uadmin.usp_set_foldhely_arkategoria
    @foldhely_id INT,
    @id_arkategoria INT,
    @debug INT=NULL
AS
BEGIN
    SELECT 1 AS a
END
GO

which puts SELECT where it belongs but moves the commas to the ends of the lines instead of moving all arguments to a single line.
Fri Mar 17, 2017 10:34 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
thank you for getting back. Does this happen when you have several editors open? SSMS and SA SQL Editor open at the same time and after change something in the options? If you restart the editors, can you reproduce it on demand without changing options?
Fri Mar 17, 2017 11:02 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
I rarely use SQL Server Management Studio nowadays, hence I usually have only one editor open, SE. SA Options is almost always open and I apply changes rather frequently (honing snippets every second). Yet it can be reproduced at will. All I have to do is to open SE. The first time I hit Ctrl+F11 in a tab it works and never again for unselected code. Formatting selected code sometimes works sometimes does not. Applying custom formatting (Ctrl+Shift+F11) works all the time, regardless of the code to be formatted being selected or formatting the whole contents of the editor. No SQL Server Management Studio instances or SA Options is open and neither were since the startup of SE.

Tabs that are connected to MySQL or SQLite behave as expected for both Ctrl+F11 and Ctrl+Shift+F11.
Fri Mar 17, 2017 11:18 am 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
Goto page Previous  1, 2
Page 2 of 2

 
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.