Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
majcon
Active Participant

Scharpen your ABAP Editor for Test-Driven-Development (TDD) - Part III.

How to optimize your Performance by using the new ABAP Editor

http://www.sxc.hu/pic/m/g/ge/gerard79/1327908_the_maze_3.jpg

[image from http://www.sxc.hu/pic/m/g/ge/gerard79/1327908_the_maze_3.jpg  - copyright www.digital-delight.ch]

Navigation is quite easy... really - it´s easy?

In my previous Blogs I described what is necessary for sharpen your ABAP Editor to use successful TDD. In this Blog I will show you:

  • the Split-View Option
  • create own local Bookmarks
  • Search and Replace of Code

Navigation Options in the new ABAP Editor

Every Developer has his own process to develop software. With the time I´ve collect some interesting Tips. I´ve tried to implement some methods and techniques in my daily work as a agile Developer. Some works for me and some works for others :smile:

And here are the topics:

  • the Split-View Option
  • create own local Bookmarks
  • Search and Replace of Code

The Split-View Option

The Split-View is only available if you have Coding which has more lines of code, than your Display can show...

If you don´t see the split-View-Button, then put some blank lines in your coding:

and the it is possible to use the split-View Option. Klick on the top-right Button and Drag it to the middle of your displayed coding.

Like in the following pics:

When you are finished the Operation your ABAP Editor have two area:

Often I arrange a the Top-Panel my Productive Coding and at the Bottom-Panel my local Testclasses.

This gave me the opportunity to scroll or jump with the Bookmark-Shortcuts in one area when the other are is still freezed.

Creating local Bookmarks

When I create a structure during my TDD my own applied Bookmarks help me to navigate really fast in my Coding.

Creating local Classes will left you to create an Definition and a Implementation Part.

You can image when your Code-Basis grows that scrolling could become very noisy :wink:

To creating own Bookmarks go with the mouse to the left column-pane as you can see here.

Please note, that I create my Bookmark in the Definition Part of my Production-Coding:

then choose one Bookmark-Id you like:

After selecting an Bookmark-Id you got an blue Flag with the Number 0 on the left-hand side:

Again, create the next Bookmark (here with Bookmark-Id No. 1). Now in the Implementation Part of your local Class.

Ok, that´s great! Let us create the Bookmarks in ower local ABAP Unit Testclasses.

I will here shorten it a little up. Create Bookmark No. 8 for the Definition Part of your Testclass.

And Bookmark No. 9 for the Implementation Part of your Testclass:

Now the fast Navigation is really easy. Press the Shortcuts CTRL + 0 or CTRL + 1 for the Production Code and CTRL + 8 or CTRL + 9 for your local Testclasses, and you jump immediately to the Place you want!

Search and Replace of Code

In TDD small iterations are recommended. After the Unit-Test (red) and a little Coding to pass the Test (green) you come to the Refactoring Part of TDD (blue). For the Refactoring Part I realized, that it is important to master the Search and Replace Mechanism of your Editor.

Navigate to the Place where you will  replace some coding.

Click with the Mouse the Coding-Part (for example an Variable) and Press also CTRL-Shortcut. After this the Variable is selected (and also copied internal). Now, right Click and the Context-Menu will be shown. Here Choose the Replace Item:

The following Replace-Diaglog is displayed. You see that your Variable is automaticly is filled in the Find what-Form. Check that the Checkbox Match Whole Word is marked. Now fill your new Variable-Name in the Replace With-Form.

Here I would suggest that you Press the Replace-Button so often till all Variables are replaced. By the way you can also choose the Replace All-Button, but be aware, if you had anouther Method with the same Variable Name all existing Places will be changed automaticly.

Another Option is to use the Find Incremental (Shortkey CTRL + I ) to search for names.

Image you have a lot of Variables which are named PLAYER_ etc. (something else) you whish to look only at the coding where PLAYER as one Whole Word is meant. So Press CTRL + I and start typing PLAYER the first available Place is found now you can Press again CTRL + I and you will be navigate to the next founded Place.


  My experience is..

It is brilliant that I realized that the combination of all the Navigation Tips make me really fast.

I realized, that the  usage happend unconscious and it enables me to concentrate on the relevant Part of my daily programming tasks.

Try out the Tips. Look if it speed up your work.

Your experience is?

What is your experience with using the above Tips?

What was good and what could be implemented better?

Have you something diffrent that works for you?

  Further Information

Blogs in this Series:

    

3 Comments