Code fragment window
A code fragment window holds a copy of some code lines and where they came from. Use it to keep a piece of code in view while you navigate elsewhere, to write notes about it, or to share it with a colleague. Its title names the declaration the code comes from.

| # | Name | Description |
|---|---|---|
| 1 | Object | The id and name of the object. Select it to go to the object. |
| 2 | Declaration | The group and name of the declaration. Select it to go to the declaration. |
| 3 | Code lines | The copied lines. |
| 4 | Line marker | Select it to go to the exact place of this line in the object. |
| 5 | Notes | Your notes about the code. See Share code with notes. |
| 6 | Copy source to clipboard | Copies the fragment, with your notes, to the clipboard. See What the copy holds. |
Opening a code fragment window
On the Prism tab of the Object view:
- Mark code lines (select a line, then another to mark the lines between them), right-click a marked line and choose Copy Code to New Window.
- Or right-click the Code header of a trigger or procedure and choose Copy code to new window to copy the whole block.
Each command opens a new window, so you can keep several fragments open. See Selecting and copying code for the other ways to copy code.
Share code with notes
- Open the code in a code fragment window.
- Type your explanation in Notes.
- Select Copy source to clipboard.
- Paste into the email or ticket.
The reader gets the code, your notes and where to find the code.
What the copy holds
The copy holds, in this order:
- Source code fragment context: the store, the object and the declaration.
- Notes, when you wrote any.
- Source code fragment text: the code.
The window does not save the notes: they are gone when you close it.