-
Notifications
You must be signed in to change notification settings - Fork 6
BaijiGenerator Usage
BaijiGenerator can be used to edit Baiji IDL, then generate Java/C#/Objective-C code from IDL. As an editor, it supports syntax highlighting, keyword hinting and error hinting, also it provides shortcut keys for common operations.
In this article, we introduce basic code generation functions of BaijiGenerator, for Baiji IDL definition, please refer to this wiki.
Click Generate -> Generate Java Code menu item, Java code generation dialog will pop up. First you need to input or choose Output Folder.
Then choose Code Type:
- Data Objects Only: only generate data objects
- Client-Side Prox: generate data objects and client proxy class.
- Server-Side stub: generate data objects and server side interface.
Then you may choose a few code generation options:
- Generate Comments: should the document comments in IDL be generated as code comments in code.
- Generate Public Fields: should the data fields in class be generated as public, if not chosen, field will be generated as privte(accessed via get/set method).
- Generate Includes: should the included IDL file(s) be generated to target source.
Optionally, in the Operation Selection section, you may choose a few operations you want for code generation(only effective for Data Objects and Client-Side Proxy options). This option is useful for mobile(iOS/Android/WinPhone) client code generation scenarios, as we know, mobile device may have resource limitation, it's not desirable to have a very big compiled executable, so you may prefer generating a few useful operations to your moible APP to minimize the size of the target code base.
Finally, Client Generate button to generate target source code.
Just click Generate -> Generate C#(or Objective-C) menu item, then C# or Objective-C code generation dialog will be shown. Other options will be similar to Java code generation above.
Click Generate -> Options menu item, you many choose a few global code generation options here.
Shortcut Keys | Function | Shortcut Keys | Function |
---|---|---|---|
Ctrl + N | New File | Ctrl + A | Select All |
Ctrl + O | Open File | Ctrl + F | Find |
Ctrl + S | Save File | F3 | Find Next |
Ctrl + Z | Undo | Ctrl + H | Replace |
Ctrl + Y | Redo | Ctrl + G | Jump to |
Ctrl + X | Cut | Ctrl + - | Jump to pervious position of the cursor |
Ctrl + C | Copy | Ctrl + Shift - | Jump to next position of the cursor |
Ctrl + V | Paste |