![SoftTree Technologies](templates/GreenTech/images/logo.gif) |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
SqlerOl
Joined: 13 Apr 2007 Posts: 8
|
|
code formatting issue in SSMS |
|
1. Create a procedure:
![](templates/GreenTech/images/code_header.gif) |
![](templates/GreenTech/images/spacer.gif) |
use MyDatabase
CREATE PROCEDURE dbo.xusp_SYS_SynchroMarkSet
@MarkName nvarchar(128)
AS
BEGIN
PRINT 'dbo.xusp_SYS_SynchroMarkSet'
END
|
2. Type in SSMS:
EXEC My[choose from popup].d[choose from popup].x[choose from popup]
3. Code formatting will be applied and you'll see:
![](templates/GreenTech/images/code_header.gif) |
![](templates/GreenTech/images/spacer.gif) |
EXEC MyDatabase.dbo.xusp_SYS_SynchroMarkSet
@MarkName = null
|
I want to see:
![](templates/GreenTech/images/code_header.gif) |
![](templates/GreenTech/images/spacer.gif) |
EXEC MyDatabase.dbo.xusp_SYS_SynchroMarkSet @MarkName = ?
|
Changing formatting rule, disabling formatting rule by unchecking appropriate check box and even deleting formatting rule doesn't help.
More of that, it will be useful to have an option not to insert parameters at all.
|
|
Fri Apr 13, 2007 4:33 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Thanks for the bug report.
In theory you should be able to change the formatting rule moving the parameter to the first line that should produce the effect you want. I'm not sure why it doesn't work this way. I am going to send this issue to developers for further investigation.
Note that the purpose of formatting patterns is to give you control over how the resulting code should look.
|
|
Fri Apr 13, 2007 5:35 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SqlerOl
Joined: 13 Apr 2007 Posts: 8
|
|
|
|
You see, that is a good idea. But I prefer to enter code myself in my preferred manner. I just want to get some help, but I don't need some software to do my job :)
Now I turned "Code formatting" option to None and deleted ALL formatting snippets and rules, as the result, keywords are not converted into upper case. BUT: when I'm typing "INSERT INTO bla-bla-bla" and then choosing something from popup menu, I'm getting complete insert snippet :(. It seems to me that this was either hardcoded or is stored somewhere...
|
|
Fri Apr 13, 2007 5:52 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
All you actually needed to do is to change one option on the Targets page:
![](http://upload7.postimage.org/694968/formatting_off.jpg)
|
|
Fri Apr 13, 2007 8:26 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SqlerOl
Joined: 13 Apr 2007 Posts: 8
|
|
|
|
Been there, done that :)
It turns of keywords "uppercasing" as well :( And it doesn't turns off formatting (see previous post). I think that it can be an installation issue - I'll check it on another computer after weekend...
|
|
Fri Apr 13, 2007 8:43 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
I think you are trying to disable the code auto-expansion feature. I don't think there is a facility in the options to disable this. I am going to add an enhancement request on your behave to provide an option for disabling code auto-expansion.
As a workaround for SELECT statements, you can simply skip the first popup appearing after SELECT keyword and use the second popup appearing after FROM keyword
|
|
Sat Apr 14, 2007 1:09 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Sorry, forgot to mention existence of undocumented option for use of the Shift key when selecting object names in the popup. If you hold the Shift key down when picking an object, the code auto-expansion is not used
|
|
Sun Apr 15, 2007 2:16 pm |
|
![](templates/GreenTech/images/spacer.gif) |
|
|
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
|
|
|