定義外掛程式的 Java 類別

關於這項作業

若要定義外掛程式的 Java 類別:

程序

  1. 在「套件瀏覽器視圖」中,以滑鼠右鍵按一下專案。
  2. 選取新建 > 類別
  3. 顯示「新建 Java 類別」視窗時,為類別提供名稱,針對超類別輸入 RPUserPlugin,然後確保選中了繼承的抽象方法勾選框。

結果

外掛程式類別必須實作下列方法:

//called when the plug-in is loaded
public abstract void RhpPluginInit(final IRPApplication rhpApp);
//called when the plug-in's menu item under the "Tools" menu is selected
public void RhpPluginInvokeItem();
//called when the plug-in popup menu (if applicable) is selected
public void OnMenuItemSelect(String menuItem);
//called when the plug-in popup trigger (if applicable) is fired
public void OnTrigger(String trigger);
//called when the project is closed - if true is returned, the plug-in will be
unloaded
public boolean RhpPluginCleanup();
//called when Rhapsody exits
public void RhpPluginFinalCleanup();

意見回饋