Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 7.1.166 Pro] - What's this? |
|
Selecting text in SQL Editor puts an icon on the line number bar. It has "Create sync range" in its tooltip. I couldn't find anything about it in the documentation. What is this?
|
|
Fri Oct 31, 2014 7:19 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
It's called "synchronous editing" and should be in the documentation.
In a nutshell, highlight a range of text containing multiple references to the same variable, table name, or column name, other type of identifier/name... Press the Sync Edit icon. The selection will stick. Now edit one of the references. All other references to the same identifier, will be changed synchronously.
|
|
Fri Oct 31, 2014 8:22 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Hmmmm, this is freaking awesome :)
By the way, which chapter is it in? I looked for "synchronous editing" in SqlAssist.pdf but the search came up with nothing.
EDIT: Never mind, I've found it. It's in chapter 30, Using Integrated SQL Editors (found after searching for "sync edit"). You might want to include the tooltip text ("Create sync range") somewhere in that chapter, though, so that it could be found by looking for that string.
|
|
Fri Oct 31, 2014 8:30 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you for your suggestion
|
|
Fri Oct 31, 2014 8:55 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Actually, this is brilliant. Really. Since when is this feature there?
Do you think it would be possible to turn this on for snippets that contain some predefined keyword so that the contents they insert into the editor automatically become "sync ranged"? And assign a hotkey to it?
EDIT: there are some glitches associated to it. Creating a new sync range without removing the existing one(s) can cause strange behavior and various side effects. I think, adding a creating a new one should automatically "unmount" the previous one as well.
|
|
Fri Oct 31, 2014 9:13 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I believe it should be possible because the same edit control is now (mean 7.1 version) is used in the Options dialog for snippets. I need to ask our dev team to confirm.
|
|
Fri Oct 31, 2014 10:56 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
 |
 |
there are some glitches associated to it. Creating a new sync range without removing the existing one(s) can cause strange behavior and various side effects. I think, adding a creating a new one should automatically "unmount" the previous one as well. |
Not sure I understand correctly. Each range is independent, you can have multiple ranges. Would you please describe "various side effects" in more details?
|
|
Fri Oct 31, 2014 1:13 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Sure. Check this video. The editor contains three discrete ranges. Editing a multi-referenced item in the last two ranges makes nothing unexpected but doing it in the first range seemingly influences the last two ranges (shrinks/grows/moves them depending on whether there was characters added to or removed from the item).
|
|
Fri Oct 31, 2014 5:18 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you. This has been confirmed as a bug and it's going to be fixed in the next build
|
|
Sun Nov 02, 2014 3:44 pm |
|
 |
|