Migrating static adapters from Generic Log Adapter V3.3 to V4.0

To migrate a static adapter from Generic Log Adapter V3.3 to V4.0:

  1. In an Eclipse workbench, locate the plug-in project and open the plugin.xml file in the plug-in editor.
    1. Click the plugin.xml tab.
    2. In the <requires> element, delete the <import plugin="org.eclipse.hyades.logging.adapter.config"> statement. This package was merged into the org.eclipse.hyades.logging.parsers package in the GLA 4.0 release.
    3. <requires>
      	<import plugin="org.eclipse.hyades.logging.parsers"/>
      </requires>
      
    4. Right-click and click Save.
  2. In the Package Explorer view of the Java perspective, right-click the plug-in project and click Properties.
    1. Click Java Build Path.
    2. Delete all the entries except JRE System Libraries and Plug-in Dependencies.
    3. Click OK.
  3. Delete the META-INF folder from the plug-in project.
  4. In the src folder of your workspace, create a class called CustomParserExtension. For example, <workspace>\TSMParser\src\com\ibm\tivoli\TSMParser\CustomParserExtension.java. This class must extend the ParserWrapper class. See the sample code below.
  5. package com.ibm.tivoli.TSMparser;
    import org.eclipse.hyades.logging.parsers.importer.ParserWrapper;
    public class CustomParserExtension extends ParserWrapper {
    	public CustomParserExtension() {
    		super();
    		currentPlugin = "com.ibm.tivoli.TSMparser";
    	}
    }
    
  6. In the plugin.xml file, delete the class="org.eclipse.hyades.logging.adapter.config.StaticParserWrapper" statement and add the class created in step 4. For example, class="com.ibm.tivoli.TSMparser.CustomParserExtension. See the sample code below.
  7. <extension
    	point="org.eclipse.hyades.logging.parsers.logParser">
    	<parser
    		name="%TSM_PARSER_ACTLOG_NAME"
    		icon="./icons/full/obj16/apache_error.gif"
    		description="%TSM_PARSER_ACTLOG_DESCRIPTION"
    		class="com.ibm.tivoli.TSMparser.CustomParserExtension"
    		ui_name="%TSM_PARSER_ACTLOG_NAME"
    		id="com.ibm.tivoli.TSMparser.ActlogQueryParser">
    		<field
    			useBrowse="true"
    			defaultValue="d:\test\query.log"
    			name="%TSM_PARSER_ACTLOG_FILE_PATH_NAME"
    			helpContextId=""
    			tooltip="%TSM_PARSER_ACTLOG_FILE_PATH_TOOLTIP"
    			id="file_path"
    			browseType="*.log">
    		</field>
    	</parser>
    </extension>
    
  8. In the plugin.xml file for the static parser class, add an org.eclipse.hyades.logging.parsers.staticParser extension element. See the sample code below.
  9. <extension
    	point="org.eclipse.hyades.logging.parsers.staticParser">
    	<parserClassname
    		name="com.ibm.tivoli.TSMparser.ActlogQueryParser">
    	</parserClassname>
    </extension>
    
  10. To test the adapter:
    1. Go to the Java perspective and click Debug As > Eclipse Application.
    2. Import a log for the static parser created above, deleting any previously imported files.