Comment/Uncomment code in the Rx IDE using keyboard shortcut
-
- Posts: 1
- Joined: Wed Feb 18, 2015 9:28 am
Comment/Uncomment code in the Rx IDE using keyboard shortcut
Is there any way to comment and uncomment code using keyboard shortcuts in the IDE? Like Ctrl+Shift+C / Ctrl+Shift+U in Visual Studio?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hello tijnasarsimovich,
Yes, this is possible, but you have to edit the ICSharpCode.SharpDevelop.addin file manually.
The file can be found in the directory "C:\Program Files (x86)\Ranorex 5.3\RanorexStudio\AddIns".
Just add the line shortcut="Control|Shift|X" to the section "<MenuItem id = "Comment"" as shown below.
Regards,
Bernhard
Yes, this is possible, but you have to edit the ICSharpCode.SharpDevelop.addin file manually.
The file can be found in the directory "C:\Program Files (x86)\Ranorex 5.3\RanorexStudio\AddIns".
Just add the line shortcut="Control|Shift|X" to the section "<MenuItem id = "Comment"" as shown below.
<MenuItem id = "Comment" icon = "Icons.16x16.CommentRegion" label = "${res:XML.TextAreaContextMenu.CommentUncommentSelection}" shortcut="Control|Shift|X" class = "ICSharpCode.SharpDevelop.Editor.Commands.CommentRegion"/>Please don't use Ctrl+Shift+C because this is already in use.
Regards,
Bernhard
-
- Posts: 82
- Joined: Fri Oct 24, 2014 10:58 am
- Location: Bucharest
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hi,
The correct code is:
For some reasons "shortcut" appears twice in previous code.
The correct code is:
Code: Select all
<MenuItem id = "Comment"
icon = "Icons.16x16.CommentRegion"
label = "${res:XML.TextAreaContextMenu.CommentUncommentSelection}"
shortcut="Control|Shift|X"
class = "ICSharpCode.SharpDevelop.Editor.Commands.CommentRegion"/>
Lucian Teodorescu
NetSun Software
NetSun Software
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hello lucian.teodorescu,
Thank you very much for the hint this was some kind of a typo.
I changed the line in my previous post in order to prevent confusion for other users.
Than you.
Regards,
Bernhard
Thank you very much for the hint this was some kind of a typo.
I changed the line in my previous post in order to prevent confusion for other users.
Than you.
Regards,
Bernhard
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Unless I'm missing something, there is no need to modify anything? It's already possible to comment/uncomment code (selected row or block) using Ctrl+/ shortcut. I'm using it on a daily basis I believe I've found it in SharpDevelop documentation?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hi odklizec,
normally it should not work out of the box with the shortcut you described in your post. Are you sure that you didn't modify the addin file .
Regards,
Bernhard
normally it should not work out of the box with the shortcut you described in your post. Are you sure that you didn't modify the addin file .
Regards,
Bernhard
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hi Bernhard,
Most probably no. I don't remember modifying this file and I guess I would have to modify it every time I update Ranorex with newest version? I can't even find such shortcut there? Maybe it's something hardcoded?
PS: I believe I found it here (search for "Toggle comments"):
https://github.com/icsharpcode/SharpDev ... -Shortcuts
Most probably no. I don't remember modifying this file and I guess I would have to modify it every time I update Ranorex with newest version? I can't even find such shortcut there? Maybe it's something hardcoded?
PS: I believe I found it here (search for "Toggle comments"):
https://github.com/icsharpcode/SharpDev ... -Shortcuts
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hello odklizec,
That's strange. I discussed that with one of our developers and it is not defined in the source code as well.
Is there another SharpDevelop version installed on your machine?
But Ranorex should also not use this addon file.
Regards,
Bernhard
That's strange. I discussed that with one of our developers and it is not defined in the source code as well.
Is there another SharpDevelop version installed on your machine?
But Ranorex should also not use this addon file.
Regards,
Bernhard
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hi Bernhard,
No, I don't have SharpDevelop on this machine. Just Ranorex 5.3.2. And I just tried it on my VM and it works here as well. And I'm quite sure I did not modify anything on that VM. Can't you reproduce it at your side with clean Ranorex setup?
No, I don't have SharpDevelop on this machine. Just Ranorex 5.3.2. And I just tried it on my VM and it works here as well. And I'm quite sure I did not modify anything on that VM. Can't you reproduce it at your side with clean Ranorex setup?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 82
- Joined: Fri Oct 24, 2014 10:58 am
- Location: Bucharest
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Ctrl+/ works for me too.
Lucian Teodorescu
NetSun Software
NetSun Software
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Comment/Uncomment code in the Rx IDE using keyboard shortcut
Hi everybody,
The reason seems to be the keyboard layout. I guess you have an English keyboard. I have a German one and that's why it didn't work for me.
On a German keyboard it works with the shortcut Ctrl+#. It must be defined hard-coded in the SharpDevelop source code.
Thank you.
Regards,
Bernhard
The reason seems to be the keyboard layout. I guess you have an English keyboard. I have a German one and that's why it didn't work for me.
On a German keyboard it works with the shortcut Ctrl+#. It must be defined hard-coded in the SharpDevelop source code.
Thank you.
Regards,
Bernhard