1

我有一个在规范测试中运行的 gem 命令。但是,当主应用程序运行命令时,我没有看到命令显示origen h。我使用这个文档作为我的指南。这是我创建的 gem 帮助命令,它在主应用程序中不起作用(仅在 gem 本身内)。

else
  # You probably want to also add the your commands to the help shown via
  # origen -h, you can do this by assigning the required text to @application_commands
  # before handing control back to Origen.
  @application_commands = <<-EOT
fetch_test_module <testmodule> --path <dir>
  EOT
end 

谢谢

4

1 回答 1

1

您链接到的文档涵盖了如何向应用程序添加命令,或者在插件的情况下,该命令仅在从其自己的工作区运行插件时可用。集成您希望对父应用程序可用的插件命令的过程略有不同。

您必须在插件中声明一个共享命令启动器,config/application.rb如下所示:http: //origen-sdk.org/origen/guides/plugins/creating/#Sharing_Other_IP

然后创建共享命令启动器,如下所示:http: //origen-sdk.org/origen/guides/plugins/creating/#Sharing_Application_Commands

执行此操作后,该命令将显示在插件自己的工作区和包含所述插件的应用程序的工作区中。

于 2018-02-12T10:37:16.167 回答