If you're writing an editor that you want to be able to call from the BeIDE, here's what you do:
You don't have to install your editor anywhere special; the BeIDE looks for all apps that handles text files and adds them to its list of potential editors.  Currently, the communication between the BeIDE and your editor is limited to the B_REFS_RECEIVED message--you can't talk back to the BeIDE from your editor.  This may change in the future, as the BeIDE defines and supports a scripting suite.
When the BeIDE opens a file, it sends a B_REFS_RECEIVED message to the editor (one file per message).  The message tells you which file to open, and whether to create and display a text selection within the open file.
Field | Type | Meaning |
---|---|---|
"refs" | B_REF_TYPE | The file to open. |
"be:selection_offset"
(optional) |
B_INT32_TYPE | The location of the first character in the selection, measured in bytes from the beginning of the file. |
"be:selection_length"
(optional) |
B_INT32_TYPE | The number of bytes in the selection. |
"be:line"
(optional) |
B_INT32_TYPE | The line number of the selection (counting from line 1). |
Your editor should open the file represented in the "refs" fields, and then look in the other fields for information about the selection: