Castor Plug-in for Eclipse

Usage
The following steps illustrate basic use of the Castor Plug-in for Eclipse:

Create a new Java project for your Castor-generated files. You can use an existing project, if you already have one. Make sure the project has at least one Java Source folder (i.e., it does not use the project root as both source and output folder for your Java files).

Create a new Java Source folder in your project; e.g., gen. This is the folder into which Castor Source Generator will place the generated Java files. This separation is not necessary, but makes it easier to distinguish generated files from those created manually.

Right-click the project and from the context menu select Castor -> Add Castor to build path... This will allow you to select Castor libraries to add to your project's Java build path. Alternatively, you can choose to import the libraries into your project, if you need to package and redistribute them with your code.

In your Project Navigator view, select the XML Schema (*.xsd) file from which you want Castor to generate Java sources. Note that the XML Schema file need not be in the generator's output project; it may come from an entirely different project. From the main menu, select Run -> External Tools -> Run As -> Castor Source Generator. This will bring up a launch dialog populated with default values.

Edit the values in the Generator tab to suit your needs. When ready, click Run to launch the Castor Source Generator. Any output messages will be printed into your Console view. When finished, the output folder will contain the generated files.

To edit your newly created launch configuration, select Run -> External Tools -> External Tools... in the main menu. To display a shortcut to this launch configuration in favorites menu, check the box in the Common tab. You may share this launch configuration with others (e.g., through a version control system) by marking it as Shared in the same tab; this will create a *.launch file (whose file name matches the launch configuration name) in the folder you specify. 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值