作为独立 Java 应用程序进行调试

关于此任务

要作为独立应用程序进行调试,需要编写用于模拟 IBM® Rational® Rhapsody® 回调的主操作,如下例所示:

   public static void main(String[] args) {
   //create an instance of my plug-in
   MyPlugin myPlugin = new MyPlugin ();
   //get Rhapsody application that is currently running
      IRPApplication app                                                
              =RhapsodyAppServer.getActiveRhapsodyApplication();
   //init the plug-in
   myPlugin.RhpPluginInit(app);
   //simulate a call to the plug-in
   myPlugin.RhpPluginInvokeItem();
}

一旦包括了此主操作,就可运行 Rational Rhapsody 及像其他 Java 应用程序一样调试该插件。


反馈