keeping things in perspective
Because Domino Designer is now based on Eclipse, we suddenly have these wonderful things called "perspectives": basically, that term just means the sum total of all the interface components you see. In the case of Designer, that includes (among others) the applications navigator, control and data palettes, and panes for properties, events and problems. But (again, because Designer is now based on Eclipse) we can finally customize what Designer looks like: we can move stuff around, remove what we don't use, and add Eclipse components that don't necessarily have anything to do with Designer. To add any optional component, simply select Window > Show Eclipse Views > Other, and choose from the categorized list that displays.
Arguably the most useful component that is available, but not enabled by default, is the "Package Explorer" (available in the aforementioned dialog under the "Java" category): this allows you to navigate the structure of any application as though it were a series of folders and subfolders on a network drive. This also allows you to navigate to portions of the NSF structure that you can't see at all from the applications navigator. Not only does this make it more convenient to incorporate custom (or downloaded) Java into your XPage applications than switching entirely to the Java perspective, but it has other convenient benefits even if you're not directly using Java at all.
For example, suppose you want to use the Blueprint CSS framework in your application, and don't have the luxury of an administrator who is willing to put the framework files directly on the server. In the Package Explorer, between the folder for Views and the folder for XPages, you'll see another folder called WebContent. Any files placed in this folder are treated as though they exist at the "root" of the NSF; similarly, subfolders created within this folder are treated as subfolders of the NSF. As a result, you can simply drag the parent folder for the Blueprint framework directly from your hard drive to that folder, and it will store the entire framework inside the NSF, using the same subfolder hierarchy it uses on your hard drive. You can then reference those files in your XPages (or even in traditional Domino design elements) relative to the root path of the NSF. This isn't the ideal, of course, but again, some administrators simply won't budge on these sorts of things, even if it means we have to duplicate storage and prevent users from caching CSS/image resources across applications.
In addition to adding Eclipse "views" to a perspective, we can also modify which menu options show up in various contexts by selecting Window > Customize Perspective. For instance, if you will be adding Java to your XPage applications but don't want to spend all day in the full-blown Java perspective, on the Shortcuts tab of the Customize Perspective dialog, select the "New" submenu, then enable whatever you want to see in that menu when you right-click an item in the Package Explorer. In my case, I've enabled "Folder" (under "General") and "Class", "Enum", "Interface" and "Package" (under "Java"). This saves me the hassle of having to choose New > Other > Java > Class > Next every time I want to add a class to my project... instead, I can just right click the package it will be added to and select New > Class. Sure, it only saves me three clicks each time, but it just feels so much faster, annoys me less, and over the course of a complex project, I have no doubt the savings add up.
There are various other ways in which you can tweak your perspective settings. Just be sure that, once you've made any changes that you want to be permanent (or, at least, to survive a restart), select Window > Save Perspective As - you can either just overwrite the existing perspective (this is the default behavior) or you can enter a new name, which will create a new perspective based on the current settings. Conversely, if you've made some changes and decide you'd rather go back to what you had, select Window > Reset Perspective, which will revert the settings to the defaults.
Comments
Posted by Nathan T. Freeman At 07:52:01 PM On 07/07/2010 | - Website - |
Posted by RobShaver At 06:34:35 PM On 07/08/2010 | - Website - |
Posted by Tim Tripcony At 08:51:14 PM On 07/08/2010 | - Website - |