Working with UI Examples

The examples plug-in demonstrates the UI programming model based on the SAP UI toolkit. There is a range of UI topics displayed on several tabs. The relevant source code is structured in short, easy-to-read units. It will help you to become familiar with UI programming quickly – similar to using a tutorial.

 

Executing the examples plug-in

Procedure

1.       Choose the Window ® Show View ® Other ... menu.

2.       Choose SAP UI Examples and confirm by choosing OK.

 

 

Result

Eclipse creates an instance of the examples plug-in in an additional Workbench view and opens it for the current perspective.

 

Displaying and using sources

Procedure

1.       Create a new Java project – for example, SAP UI Examples (no plug-in project necessary).

2.       Select the new project, then choose Properties from the context menu.

3.       Choose Java Build Path, then choose the Libraries tab.

4.       Choose Add External JARs and add the UI examples plugin.jar from the eclipse plugins directory com.tssap.util.examples.

5.       Select the plugin.jar file you have added and choose Attach Source.

6.       Choose the source zip file and confirm by choosing OK.

 

Result

The referenced library should now be visible in the Packages view. If you now choose a Java file <Java_file_name.class>, the Java source code will now appear in the Editor. You cannot, however, change the source code.

If you want to use the source code, simply copy and paste it into your own project file.