alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<cheatsheet title="Test commands in subitems">
  <intro>
    <description>A cheat sheet which demonstrates the use of perform-when and conditional subitems
    <br/>
Verify that each step performs as indicated in the description, that the description for each step is visible and that all steps can be completed. </description> </intro> <item title="Select which view to open"> <description>Select a view which will be opened in the following steps. Pick either, they work equally well.</description> <command returns = "result" serialization="org.eclipse.ui.dialogs.openMessageDialog(title=Select View,buttonLabel0=Package Explorer,message=Select a view ,buttonLabel1=Search View)"/> <onCompletion> Selected the ${result}. </item> <item title="Close Views"> <description>Close the search view and package explorer if open </item> <item title="Open the view from a perform when item." skip = "true"> <description>Uses perform when to open the view seleted previously. <perform-when condition = "${result}"> <command when = "Package Explorer" serialization="org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.jdt.ui.PackageExplorer)"/> <command when = "Search View" serialization="org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.search.ui.views.SearchView)"/> </perform-when> </item> <item title="Close Views"> <description>First verify that the view you selected was opened. Close the Search View/Package explorer, whichever is open.</description> </item> <item title="Open the view from a perform when subitem. "> <description>Uses perform when to open the view seleted previously. <subitem label="Perform when subitem" skip = "true"> <perform-when condition = "${result}"> <command when = "Package Explorer" serialization="org.eclipse.jdt.ui.PackageExplorer"/> <command when = "Search View" serialization="org.eclipse.search.ui.views.SearchView"/> </perform-when> </subitem> </item> <item title="Close Views"> <description>First verify that the view you selected was opened. Close the Search View/Package explorer, whichever is open.</description> </item> <item title="Open the view from a conditional subitem"> <description>Uses perform when to open the view seleted previously. <conditional-subitem condition="${result}"> <subitem when="Package Explorer" label="Open package explorer."> <command serialization = "org.eclipse.jdt.ui.PackageExplorer"/> </subitem> <subitem when="Search View" label="Open Search View"> <command serialization = "org.eclipse.search.ui.views.SearchView"/> </subitem> </conditional-subitem> </item> <item title="Close Views"> <description>First verify that the view you selected was opened. Close the Search View/Package explorer, whichever is open.</description> </item> <item title="Open both views from a repeated-subitem"> <description>Uses repeated-subitem to open the view seleted previously. <repeated-subitem values="org.eclipse.jdt.ui.PackageExplorer,org.eclipse.search.ui.views.SearchView"> <subitem label="Show ${this}"> <command serialization="${this}"/> </subitem> </repeated-subitem> </item> <item title="Final checks"> <description>Verify that both the package explorer and search view are open.
Verify that every item except this one has a checkmark to the left of the title.</description> </item> </cheatsheet>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.