將靜態剖析器從 1.3 移轉到 3.x

靜態剖析器的架構設計已從 1.3 變更成 3.x,且 org.eclipse.hyades.logging.events.* 類別已移轉成 org.eclipse.hyades.logging.events.cbe.* Common Base Event 類別。

請遵循下列步驟來移轉靜態剖析器:

將日誌剖析器專案匯入到現行工作區中

  1. 在「日誌和追蹤分析器」中, 選取檔案 > 匯入,以匯入現有的日誌剖析器專案。
  2. 在「匯入」精靈中,選取匯入現有的專案至工作區
  3. 專案內容欄位中指定專案的位置,再按一下完成。這時專案 內容會載入到工作區中。

更新專案內容中的 Java 建置路徑

  1. 切換至「外掛程式開發」視景。
  2. 您需要更新「Java 建置路徑」,才能指向現行版次所使用的程式庫。用滑鼠右鍵按一下專案, 以開啟該專案,然後選取內容
  3. 在「內容」對話框中,選取 Java 建置路徑
  4. 選取「Java 建置路徑」內容中的程式庫標籤。
  5. 選取清單中所有 1.3 版的 JAR 檔,再按一下移除
  6. 按一下新增外部 JAR,然後新增下列程式庫:
  7. 按一下確定來儲存變更。

更新靜態剖析器 Java 類別以使用 Common Base Event API

您需要更新在 Common Base Events 的靜態剖析器 Java 類別中所使用的類別。 org.eclipse.hyades.logging.events.* 的所有實例需要移轉至 org.eclipse.hyades.logging.events.cbe.*。 比方說,如果您有一組 import 陳述式:

import org.eclipse.hyades.logging.events.ICommonBaseEvent;
import org.eclipse.hyades.logging.events.IComponentIdentification;
import org.eclipse.hyades.logging.events.IReportSituation;
import org.eclipse.hyades.logging.events.ISituation;
在 3.x.x 中,您需要將這些陳述式更新成:
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent;
import org.eclipse.hyades.logging.events.cbe.ComponentIdentification;
import org.eclipse.hyades.logging.events.cbe.ReportSituation;
import org.eclipse.hyades.logging.events.cbe.Situation;
如需 org.eclipse.hyades.logging.events.cbe.* 類別的詳細資料,請參閱 Common Base Event Programming API

更新配接器配置檔

現在,「配接器配置編輯器」會驗證配接器中的其他欄位。例如, 實作建立日期角色建立日期欄位的值 必須符合 XML 日期時間格式 yyyy-MM-ddThh:mm:ss。 在執行配接器之前,請先確認顯示於「視圖」中的所有配接器錯誤資訊都是正確的。

  1. 開啟日誌剖析器的配接器檔案。請用滑鼠右鍵按一下配接器檔案,然後選取開啟工具 > 配接器配置編輯器
  2. 更新「問題」視圖中所顯示的任何欄位(表示指定錯誤或遺漏)。例如,元件欄位實作版本角色版本是 3.x.x 中的必要欄位。
  3. 將變更儲存到配接器檔案。

更新 plugin.xml 檔的版本

為您的日誌剖析器外掛程式更新 plugin.xml 檔中的版本號碼。
  1. 用滑鼠右鍵按一下專案 plugin.xml 檔,然後選取開啟工具 > 外掛程式 Manifest 編輯器
  2. 在編輯器中選取「概觀」標籤。
  3. 更新外掛程式的版本號碼。
  4. 儲存變更。

變更摘要

3.x.x 版配置 1.3.0 版配置
Java 建置路徑外掛程式 org.eclipse.hyades.logging.adapter.config\hglaconfig.jar
org.eclipse.hyades.logging.core\hlcore.jar
org.eclipse.hyades.logging.core\hlcbe101.jar
org.eclipse.hyades.logging.parsers\hparse.jar
org.eclipse.hyades.logging.adapter\hgla.jar
org.eclipse.emf.ecore\runtime\ecore.jar
org.eclipse.emf.common\runtime\common.jar
org.eclipse.hyades.logging.commons\hlcommons.jar
org.apache.jakarta_commons_logging\commons-logging.jar
org.eclipse.hyades.logging.adapter\hglaconfig.jar
org.eclipse.hyades.logging.core\hlcore.jar
org.eclipse.hyades.logging.core\hlevents.jar
org.eclipse.hyades.logging.parsers\hparser.jar
org.apache.xerces\xmlParserAPIs.jar
org.eclipse.hyades.logging.commons\common-loggings.jar
Common Base Event API org.eclipse.hyades.logging.events.cbe.* org.eclipse.hyades.logging.events.*
配接器配置檔變更 經過編輯器驗證的其他欄位:
  • 實作日期
  • 實作版本
  • 角色實作日期
  • 角色版本
N/A

相關概念
Hyades 通用日誌配接器概觀

相關作業
建立日誌剖析器

相關參照
配接器配置檔結構
配接器配置編輯器