Quantcast
Channel: Jive Syndication Feed
Viewing all articles
Browse latest Browse all 10881

Brackets in the Source code

$
0
0

Have you ever tried writing an opening bracket "(" in an ABAP source in Eclipse (or probably in any other source in Eclipse)? For example, when you need to define a length? Or use a function of ABAP like "lines ( ... )"? Or wherever you need to put something in "( )"?

 

Well, when i started with AiE, i first tried to modify some of my existing sources, which all in all was not a big deal. But i struggled, when i came to the point, where i had to enter brackets in the code, especially the opening bracket "(". On a German keyboard (and i think on almost every keyboard) this character is typed by "Shift+8". Try to do this in the default setup of Eclipse ... you will not succeed, because "Shift+8" starts two Editor commands.

 

Well, i did not think any longer about that as long as i was modifying existing code, because there i used a workaround by copying the bracket and paste it to where i needed it. But when i created my first new program with AiE, i came to the same point, where i needed these brackets. And then i thought: "There should be a way to solve that without always opening a source with a bracket and copy it from there".

 

While searching around in the menus of Eclipse i found the solution in the preferences of Eclipse ("Window -> Preferences"). There you can find, under section "General", the key settings in "Keys". I sorted the table descending by column "Binding", and then looked for "Shift+8", which i found rather easy. I clicked on the command with "Shift+8, W", and changed it to "Ctrl+Shift+8, W", not without checking before, if this key sequence is free. I did the same with the next command ("Shift+8, I" -> "Ctrl+Shift+8, I"), and saved the new settings by clicking OK.

 

I tried the changes immediately, but didn't fully succeed. "Shift+8" did not start those two commands any more, but it also did not write a "(" into the source code. So i restarted Eclipse ... SUCCESS!

 

So far so good. But what do i do, if at one point in the evolution of Eclipse this new key sequence will be used for some other commands? Well, i decided to no longer think about this and wait what future will bring. Maybe at some point the developers of Eclipse notice, that there command keys could "kill" some essential feature of the keyboards by using those "Shift+<character>" key sequences. For now it should be ok for me, and perhaps for everyone, who has the same issue.

 

P.s.: i tried all other "Shift+<character>" sequences, to find out, if there could be more problems, but luckily this was the only example...


Viewing all articles
Browse latest Browse all 10881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>