Show TOC Start of Content Area

Procedure documentation Registering a Plug-in  Locate the document in its SAP Library structure

You can register a plug-in to be called during the generation of a PAR file, enabling you to modify the process of packing and unpacking a PAR file.

      During packing, the plug-in is called before the final packing of the PAR file.

      During unpacking, the plug-in is called after the initial unpacking of the PAR file.

Prerequisites

The new plug-in must:

      Be loaded at SAP NetWeaver Developer Studio startup.

      Be registered to the PAR plug-in.

      Implement two interfaces, one for packing and one for unpacking.

Procedure

Implementation

...

       1.      Implement the org.eclipse.ui.Istartup interface with its method earlyStartup() in the base class of the plug-in (the first class that is called when the plug-in is started, and where org.eclipse.ui.plugin.AbstractUIPlugin is extended).

       2.      In the plugin.xml add:

<extension

   point="org.eclipse.ui.startup">

</extension>

Register

       3.      Call the static method of com.sap.portal.developmentTools.ideSpecific.eclipse.PortalPlugin class registerPlugin(String pluginId, IParIdePlugin aPlugin). The plug-in ID must be unique.

Interfaces

       4.      To register a plug-in, implement the com.sap.portal.developmentTools.general.api.IparIdePlugin and set the implementation class as a parameter when it registers.

The plug-in has to specify the final state of the operation clearly using the method setFinalState(int status) from the class com.sap.portal.developmentTools.general.api.IfinishResult. If the final state is OK or Warning, then the PAR process continues; otherwise, it is stopped. Inside the IfinishResult, you can add messages with their level.

 

 

End of Content Area