プラグイン・マニフェスト・ファイルの編集
プラグイン・マニフェスト・ファイルの編集
プラグイン・マニフェスト・ファイルを編集するには、MANIFEST.MFを開いて「Extensions」タブを選択して、「Add…」をクリックし、「org.eclipse.hyades.logging.parsers.logParse」と 「org.eclipse.hyades.logging.parsers.staticParser」を追加します。
次に「plugin.xml」タブを選択して、読み込むログファイルの場所と変換方法のみを指定する簡単なウィザードを作成します。実装は以下のようになり、ウィザードは図2のようになります。
point="org.eclipse.hyades.logging.parsers.logParser">
name="JMS Message Log Parser"
icon=""
description="parser for JMS Message Log"
class="jMSMessageLogParser.JMSMessageLogParserExtension"
ui_name="JMS Message Log Parser"
id="JMSMessageLogParser">
useBrowse="true"
defaultValue="d:\temp\sample.log"
name="Directory"
helpContextId=""
tooltip="Enter the absolute path of the log file."
id="file_path"
browseType="*.log">
useBrowse="false"
defaultValue="default"
name="Supported versions"
helpContextId=""
tooltip="The version of the log."
ui_type="combobox"
id="version">
name="default"
value="./../MyAdapter/static.adapter">
point="org.eclipse.hyades.logging.parsers.staticParser">
name="jMSMessageLogParser.JMSMessageLogParser">
![]()
最後にパーサのラッパークラスを作成します。このクラスはログ・インポートの際にアダプタ構成ファイルを実行するのに必要で、"src/jMSMessageLogParser"に「org.eclipse.hyades.logging.parsers.importer.ParserWrapper」を継承するクラスを定義します。実装は以下のようになります。
package jMSMessageLogParser;
import org.eclipse.hyades.logging.parsers.importer.ParserWrapper;
⁄**
* This is just a simple extension of the ParserWrapper in TPTP
* so that we can refer to it in our extension point.
*⁄
public class JMSMessageLogParserExtension extends ParserWrapper {
public JMSMessageLogParserExtension() {
super();
currentPlugin = "JMSMessageLogParser";
}
} ![]()
