Skip to Content

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:

/wp-content/uploads/2013/05/cc1_223172.png

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:

/wp-content/uploads/2013/05/cc2_223174.png       

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:

/wp-content/uploads/2013/05/cc3_223178.png

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,

Thomas.

   

10 Comments
You must be Logged on to comment or reply to a post.