A list of Domino Designer tips that help me build faster XPages applications. Some tips may have existed all along, others are new to Notes 9.
Tip #1 Formatting code. Right click -> Source -> Format -or- CTRL + SHIFT + F
Sometimes your getting code from the Internet or another developer, or your copy and pasting some blocks of code. When you merge with your code you may need to format it. Other times your getting inline code from a framework and need to explode it out to follow the code. The Eclipse designer has a source formatting option. When your editing code. You can right click in the code editor, select Source then Format. Right click -> Source -> Format
You can also create code templates so they auto insert code snippets. So if your using a document framework, you can define the comment block in designer then insert the comment block by using the Source menu option .
To create these templates, go to:
- Domino Designer – LotusScript Editor – Code Templates
- Domino Designer – LotusScript Editor – Comment Templates
- Java – Code Style – Code Templates (there are separate entries for comments and code)
Tip #2 Keystrokes
ctrl+D Deletes an entire line. This reminds me of Tetris when you nuke an entire row.
Indent massive lines of code. Highlight the code block and then hit the Tab key.
Outdent massive lines of code. Highlight the code block then hold Shift+Tag.
ctrl+Space Launches the properties window of a variable or method (intellisense).
ctrl+1 Initiates the quick fix suggestions.
ctrl+F6 Is similar to the Windows Tab key to switch between program. This hot key stroke lets you scroll through Domino Designer open editors. Open a bunch of design elements in designer until. Now hold ctrl and keep pressing F6 multiple times to keep scrolling through the list of open editors.
ctrl+F7 Move between views, this bypasses needing to open the view menu, then selecting more views to find the one you want.. When in editor, press Ctrl+F7 multiple times to switch to other views.
ctrl+M Maximize the current editor into full screen or umaximize current tab to the way it was.
ctrl+Shift+F Format source code
ctrl+Shift+L To show all the shortcuts
Tip #3 Show Line Numbers in text editors.
This will help you locate code faster and aid when working with other developers by referring to the line number as a reference.
File -> Preferences -> Domino Designer -> General -> Editors -> Text Editors
Tip #4 Coloring Syntax, specifically the CDATA in XML files.
Domino Designer -> Preferences -> XML -> XML Files -> Editor -> Syntax Coloring
Click on the “CDATA Content” element. When picking the color, click on “Define Custom Color”, and type in these values Hue:20, Sat:240, Lum:200, Red:255, Green:213, Blue:170
Click on the “Comment Content” element. I use the light gray listed in the predefined colors. Do the same for “Comment Delimiters” which are the < and > brackets.