Using Wildcards in Code Completion to insert code patterns
One of the most powerful features of source code editors is for sure the code completion.
In ABAP in Eclipse you use this for example also to insert code patterns into your source code.
I described this already in one of my last blogs: Insert Code Patterns and Templates within Eclipse.
Normally you just type the first characters of the method or function to insert the pattern into your code using SHIFT-ENTER:
But sometimes you don’t know the exact name of the function or method but only parts of it.
In the insert pattern dialog in SE80 you use the F4 help to find the object that you need.
But how can you do that in Eclipse?
It is quite simple. We also support wild cards in the code completion in ABAP in Eclipse.
So let’s assume you want to call on the ALV control a method to define the layout.
Here we go. Just use asterisks and press CTRL-SPACE to restrict the result of the code completion like here:
Or you are searching for a function that returns you information about classes. Wild cards also work for function modules as you see here in the example:
When choosing an item from the result list via SHIFT-ENTER the code pattern is generated into your code.
Another small but very helpful feature I guess.
Have fun and Regards,