Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
oliver
Product and Topic Expert
Product and Topic Expert
0 Kudos


SAP's decision to use Eclipse as their RCP for the NetWeaver Developer Studio (NWDS) has been a great decision for us developers. Eclipse has been developed by IBM and was released as open source in 2001 and got a lot of attention in the developer community. One of the main reasons may have been that Eclipse was designed as a Rich Client Platform (RCP). A RCP is an application skeleton providing a plug-in framework that is used for building extensions. That said and by providing its own plug-in SDK out of the box, it becomes natural that Eclipse has always been a playground for developers. A lot of plug-ins have been build by the open source community using Eclipse itself. This gives you the ability to configure Eclipse to your special needs so that you don't have to leave your favourite IDE for most of your development tasks. In addition Eclipse has a build in Software Update Service that guides you for the tasks of downloading and installing plug-ins and keeping them up to date with the latest versions.

 

Only a few weeks back the latest Eclipse IDE version 3.2 was released. Unfortunatly NWDS for NetWeaver 2004 and 04s are based on Eclipse 2.x wich was released back in 2004. Because of a major change in the plug-in SDK from version 2.x to 3.0 all of the new plug-ins for 3.x won't work on the older releases. It's of course the 3.x release where most of the plug-in current development happens but you will still find older plug-ins for the 2.x release on the net and a handfull of them are still maintained for both releases.

 

In this series of articles I want to show you how to extend NWDS in a clean and easy way using free or even open source third party plug-ins that I have found on the net. The version I'm using here is NWDS 6.40 (2.0.14) but it works the same way in the latest NWDS 7.0 for NetWeaver 2004s! Unfortunately SAP has disabled the build in Software Update Service so that we have to manual install our plug-ins.

 

But before we start to add our first plug-in to the NWDS we have to do some preparations that help us in our task.

 

Log output to console and debug mode


 

To get a little insight into what's going on with NWDS and its plug-ins we are going to start it in debug mode with console output. Normally there should already exist a shortcut in your start menu with an additional "(Console)" in its name. If not create one.

 

The target field should read similar to this:
C:\Programme\SAP\IDE\eclipse\SapIde.exe -vm "C:\Programme\Java\jre1.5.0_06\bin\java.exe" -consolelog -debug

 

Starting NWDS using this shortcut will bring up a console window like this one:

 



 

Now we have a better look on what’s going on e.g. when a plug-ins throws an exception. You will find more information about the Eclipse runtime options on the Eclipse online documentaion.

 

Setting up an additional plug-in directory


 

Eclipse has the ability to load plug-ins that do not reside in the usual plug-in directory. This helps us from separating our extensions from the standard installation and will also give us the ability to have the same plug-ins for different NWDS installations on the same machine.

 

We assume NWDS is installed at C:\Programme\SAP\IDE\
Follow these steps:

  1. Create a directory where you want to store the Eclipse plug-ins. Let's assume we take C:\plugins.

  2. Create a directory named "eclipse" in your in step 1 created directory.

  3. Create two directories with the names "features" and "plugins" in the directory created in step 2. This is where actual the plug-ins get stored.

  4. Create a directory named "links" in your Eclipse directory at C:\Programme\SAP\IDE\eclipse.

  5. In your newly created "links" directory at C:\Programme\SAP\IDE\eclipse\links create a text file named ".link".

  6. Write the path to the newly created plug-ins directory into the file like this: path=c:/plugins


Be aware to use forward slashes even on Windows!
Now NWDS will look into the new created plug-ins directory at start up for additional plug-ins to load.

 

 

The first additional plug-in


 

The first plug-in I want to introduce here is Class Locator by Dani Kenan and Avner Linder. It will help you to find classes that are not in the current project’s classpath, automatically adds the location to the projects classpath and also adds the necessary import statement to your source. Writing applications for big frameworks like SAP’s Enterprise Portal you don’t want to miss this nice goody anymore.

 

To install Class Locator download the latest version from this location and unzip it to our newly created plug-in directory at C:\plugins\eclipse\plugins (the features directory won’t be used in this case). To active plug-ins you need to restart NDWS afterwards.

 

If the installation was successful you should now have an additional menu entry from where you can start a wizard to look up a class.

 



 

But before you can do that you need to set up the locations where you want Class Locator to search. A good start should probably the NWDS plug-ins directory (this time the original in the Eclipse directory) where the NetWeaver specific JARs are stored.

 



 

Now you can look up a JAR and its location by using the wizard or by selecting a class name and using the context menu.

 



 

Class Locator will show you all the JARs it has found where the class is included. Choose the one you need and Class Locator will extend the classpath of your project and will add the necessary import statement to the current active source.

 

You will find additional documentation for Class Locator here.

 

That’s all for now. Thanks for being with me and be sure i'll come back with more plug-ins to show.
Update & Disclaimer: This blog was created during my time when I was not with SAP. The process described here is not supported by SAP. For any help and support please get on contact with the community of the tool in question.

13 Comments