<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>&#44060;&#48156;&#51088;&#47484; &#45000;&#44988;&#45796;</title>
    <link>http://prodev.springnote.com/pages</link>
    <description>&#44060;&#48156;&#51088;&#47484; &#45000;&#44988;&#45796;</description>
    <language>ko-KR</language>
    <item>
      <title>Ruby&#51032; &#45236;&#51109;(&#51204;&#50669;) &#48320;&#49688;&#46308;</title>
      <description>&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#51221;&#44508; &#54364;&#54788;&#49885; &#44288;&#47144;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$` : &#54056;&#53556;&#50640; &#47588;&#52824;&#46104;&#45716; &#48512;&#48516;&#51032; &#50526;&#48512;&#48516;&#51060; &#51200;&#51109;&#46108;&#45796;. &#52824;&#54872;&#50640;&#49436;&#45716;&amp;nbsp;\`&#47196; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;. MatchData &#53364;&#47000;&#49828;&#51032; pre_match&#50752; &#44057;&#45796;.&lt;/li&gt;
&lt;li&gt;$&amp;amp; : &#54056;&#53556;&#50640; &#47588;&#52824;&#46104;&#45716; &#48512;&#48516;&#51060; &#51200;&#51109;&#46108;&#45796;. &#52824;&#54872;&#50640;&#49436;&#45716; \&amp;amp;&#47196; &#52572;&#44540; &#47588;&#52824; &#51204;&#52404;&#47196; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;.&lt;/li&gt;
&lt;li&gt;$' : &#54056;&#53556;&#50640; &#47588;&#52824;&#46104;&#45716; &#46263;&#48512;&#48516;&#51060; &#51200;&#51109;&#46108;&#45796;. &#52824;&#54872;&#50640;&#49436;&#45716; \'&#47196; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;. MatchData &#53364;&#47000;&#49828;&#51032; post_match&#50752; &#44057;&#45796;.&lt;/li&gt;
&lt;li&gt;$~ : &#54056;&#53556; &#47588;&#52824;&#50640; &#45824;&#54644; &#44417;&#44552;&#54644;&#54624; &#47564;&#54620; &#47784;&#46304; &#51221;&#48372;&#47484; &#45812;&#44256; &#51080;&#45716;&amp;nbsp;MatchData &#44061;&#52404;&#44032; &#51200;&#51109;&#46120;. &#49828;&#47112;&#46300; &#51648;&#50669; &#48320;&#49688;&#47196;&amp;nbsp;&#44536; &#51221;&#44508; &#54364;&#54788;&#49885;&#51060; &#49324;&#50857;&#46108; &#51648;&#50669; &#45236;&#50640;&#49436;&#47564; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;.&lt;/li&gt;
&lt;li&gt;$1 ~ $9 : &lt;strong&gt;()&lt;/strong&gt;&#50672;&#49328;(&lt;strong&gt;&#44536;&#47353;&lt;/strong&gt;)&#51032; &#47588;&#52824; &#44208;&#44284;. &#49828;&#47112;&#46300; &#51648;&#50669; &#48320;&#49688;&#47196; &#44536; &#51221;&#44508; &#54364;&#54788;&#49885;&#51060; &#49324;&#50857;&#46108; &#51648;&#50669; &#45236;&#50640;&#49436;&#47564; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;. &#51221;&#44508; &#54364;&#54788;&#49885; &#45236;&#50640;&#49436;&#45716; \1 ~ \9&#47196; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;.&amp;nbsp;MatchData&amp;nbsp;&#53364;&#47000;&#49828;&#51032; [1] ~ [9] &#50752; &#44057;&#45796;.&lt;/li&gt;
&lt;li&gt;$+ :&amp;nbsp;&#47560;&#51648;&#47561;&#51004;&#47196; &#47588;&#52824;&#46108; &#44536;&#47353;.&amp;nbsp;&#52824;&#54872;&#50640;&#49436;&#45716;&amp;nbsp;\+&#47196; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#54788;&#51116; &#52968;&#53581;&#49828;&#53944; &#44288;&#47144;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;$_ : &#54788;&#51116;&amp;nbsp;&#52968;&#53581;&#49828;&#53944;&#51032; &#51076;&#49884; &#48320;&#49688;.&amp;nbsp;&#47784;&#46304; &#50672;&#49328;&#50640;&#49436; &#47749;&#54869;&#54620; &#48320;&#49688;&#47484; &#51648;&#51221;&#54616;&#51648; &#50506;&#51012; &#46412; &#49324;&#50857;&#46108;&#45796;. Ruby&#50640;&#49436; &#49324;&#50857;&#51012; &#51088;&#51228;&#54616;&#45716; &#52628;&#49464;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;gets&#50640;&#49436; &#48152;&#54872;&#54616;&#45716; &#45236;&#50857;&lt;/li&gt;
&lt;li&gt;&#54532;&#47196;&#44536;&#47016;&#51032; &#51077;&#47141; &#54028;&#51068;( &#50500;&#45772; &#46319; )&lt;/li&gt;
&lt;li&gt;&#51221;&#44508; &#54364;&#54788;&#49885;&#50640;&#49436; &#45800;&#49692;&#54620; &#51221;&#44508;&#54364;&#54788;&#49885;&#47564; &#49324;&#50857;&#54624; &#44221;&#50864; $_&#44032; &#49324;&#50857;&#46108;&#45796;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;$. : &#54788;&#51116;&amp;nbsp;&#46972;&#51064; &#48264;&#54840; &#46608;&#45716; &#54788;&#51116;&#44620;&#51648; &#51077;&#47141; &#48155;&#51008; &#51460; &#49688;&lt;/li&gt;
&lt;li&gt;~ : ~ &#50672;&#49328;&#51088;&#45716; &#51221;&#44508;&#54364;&#54788;&#49885;&#51060; $_&#50640; &#47588;&#52845;&#54616;&#45716;&#51648; &#54032;&#45800;&#54620;&#45796;.&lt;/li&gt;
&lt;li&gt;$! : &#54644;&#45817; &#49828;&#47112;&#46300;&#50640;&#49436; &#47560;&#51648;&#47561;&#50640; &#48156;&#49373;&#54620; &#50696;&#50808;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#52964;&#47592;&#46300; &#44288;&#47144;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$? : `&#47196; &#46168;&#47084;&#49912;&#51064; &#52964;&#47592;&#46300;&#51032; &#51333;&#47308; &#49345;&#53468;&#44050;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#47749;&#47161;&#54665;&amp;nbsp;&#44288;&#47144;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ARGF : &#54532;&#47196;&#44536;&#47016;&#51032; &#51077;&#47141; &#54028;&#51068;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ARGF.each { |line| print line if line =~ /Ruby/ }&lt;/li&gt;
&lt;li&gt;print ARGF.grep&amp;nbsp;( /Ruby/ )&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ARGV : &#47749;&#47161;&#54665;&#51004;&#47196; &#49892;&#54665;&#49884; &#54532;&#47196;&#44536;&#47016; &#54028;&#51068; &#51060;&#47492; &#46244;&#51032; &#47588;&#44060;&#48320;&#49688;&#51032; &#48176;&#50676;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;C&#50752;&#45716; &#45804;&#47532; ARGV[0]&#51008; &#54532;&#47196;&#44536;&#47016;&#51032;&amp;nbsp;&#51060;&#47492;&#51060; &#50500;&#45768;&#46972;&amp;nbsp;&#54532;&#47196;&#44536;&#47016;&#51032; &#52395; &#48264;&#51704; &#47588;&#44060;&#48320;&#49688;&#51060;&#45796;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;$0 :&amp;nbsp;&#47749;&#47161;&#54665;&#51004;&#47196; &#49892;&#54665;&#49884; &#54788;&#51116; &#54532;&#47196;&#44536;&#47016;&#51032; &#51060;&#47492;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EVN :&amp;nbsp;&#50868;&#50689;&#52404;&#51228; &#54872;&#44221; &#48320;&#49688;&#50640; &#45824;&#54620; &#44061;&#52404;. &#54644;&#49884;&#45716; &#50500;&#45768;&#51648;&#47564;&amp;nbsp;ENV#to_hash&#47196; &#54644;&#49884;&#47196; &#48320;&#54872;&#54624; &#49688; &#51080;&#45796;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ENV['SHELL'],&amp;nbsp;ENV['HOME'], ENV['USER'], EVN.keys.size, ENV.keys[0, 7], ...&lt;/li&gt;
&lt;li&gt;&#51068;&#48512; &#54872;&#44221; &#48320;&#49688;&#51032; &#44050;&#51008; &#47336;&#48708;&#44032; &#52376;&#51020; &#49892;&#54665;&#46104;&#44592; &#49884;&#51089;&#54624; &#46412; &#51069;&#45716;&#45796;. &#51060;&#47084;&#54620; &#48320;&#49688;&#45716; &#48320;&#44221; &#49884;&#53020; &#51064;&#53552;&#54532;&#47532;&#53552;&#51032; &#46041;&#51089;&#51012; &#48320;&#44221; &#49884;&#53420; &#49688; &#51080;&#45796;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#47784;&#46280; &#44288;&#47144;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;$" :&amp;nbsp;require&amp;nbsp;&#54364;&#54788;&#49885;&#51004;&#47196; &#47196;&#46300;&#54620; &#44221;&#47196;&#47484; &#51200;&#51109;&#54620; &#48176;&#50676;. require&#50640; &#45336;&#44200;&#51652; &#51060;&#47492; &#44536;&#45824;&#47196;&#47484; &#51200;&#51109;&#54616;&#48064;&#47196; &#44057;&#51008; &#54028;&#51068;&#51012; &#45796;&#47480; &#44221;&#47196;&#47196; &#51456;&#45796;&#47732; &#46160; &#48264; &#51200;&#51109;&#46112; &#49688;&#46020; &#51080;&#45796;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#46160; &#48264; &#51200;&#51109;&#46104;&#45716; &#44221;&#50864;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;require '/usr/lib/ruby/1.9/English.rb'&lt;/li&gt;
&lt;li&gt;require '/usr/lib/ruby/1.9/rdoc/../English.rb'&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;$: :&amp;nbsp;require &#54364;&#54788;&#49885;&#51004;&#47196; &#44277;&#50976; &#46972;&#51060;&#48652;&#47084;&#47532;(*.so, *.dll)&#51012; &#47196;&#46300;&#54624; &#44221;&#50864; &#44277;&#50976; &#46972;&#51060;&#48652;&#47084;&#47532;&#47484; &#44160;&#49353;&#54624; &#46356;&#47113;&#53664;&#47532;(&#47196;&#46300; &#44221;&#47196;)&#47484; &#51200;&#51109;&#54620; &#48176;&#50676;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#45796;&#47480; &#54364;&#54788;&#51004;&#47196;&amp;nbsp;$LOAD_PATH &#44032; &#51080;&#45796;.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
      <pubDate>Sat, 05 May 2012 01:57:33 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/4113957</link>
      <guid>http://prodev.springnote.com/pages/4113957</guid>
    </item>
    <item>
      <title>2011-12-08</title>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Extending Eclipse - Plug-in Development Tutorial&lt;br /&gt;
&lt;br /&gt;
Lars Vogel&lt;br /&gt;
&lt;br /&gt;
Version 2.0&lt;br /&gt;
&lt;br /&gt;
Copyright &#169; 2007, 2008, 2009, 2010, 2010 Lars Vogel&lt;br /&gt;
&lt;br /&gt;
04.12.2011&lt;br /&gt;
&lt;br /&gt;
Revision History&lt;br /&gt;
Revision 0.1&amp;nbsp;&amp;nbsp;&amp;nbsp; 01.04.2008&amp;nbsp;&amp;nbsp;&amp;nbsp; Lars Vogel&lt;br /&gt;
Created&lt;br /&gt;
Revision 0.2 - 2.0&amp;nbsp;&amp;nbsp;&amp;nbsp; 14.04.2009 - 04.12.2011&amp;nbsp;&amp;nbsp;&amp;nbsp; Lars Vogel&lt;br /&gt;
bugfixes and enhancements&lt;br /&gt;
Eclipse Plug-ins Tutorial&lt;br /&gt;
&lt;br /&gt;
This article describes the creation and deployment of Eclipse plug-ins. The article is based on Eclipse 3.7 (Eclipse Indigo) and Java 1.6.&lt;br /&gt;
&lt;br /&gt;
Table of Contents&lt;br /&gt;
&lt;br /&gt;
1. Eclipse Plugins&lt;br /&gt;
2. Prerequisites&lt;br /&gt;
3. Hello World Plug-in&lt;br /&gt;
4. Contribute to existing UI elements&lt;br /&gt;
4.1. Overview&lt;br /&gt;
4.2. Contribute to package explorer&lt;br /&gt;
4.3. Restrict the extension - Visible When&lt;br /&gt;
5. Resources and Marker&lt;br /&gt;
5.1. Overview&lt;br /&gt;
5.2. Create markers&lt;br /&gt;
5.3. More on markers&lt;br /&gt;
6. Adapters&lt;br /&gt;
6.1. Overview&lt;br /&gt;
6.2. Example&lt;br /&gt;
7. Deploying a plugin&lt;br /&gt;
8. Tutorial: Deploying a plug-in&lt;br /&gt;
8.1. Export plug-in and put into dropin folder&lt;br /&gt;
8.2. Create a p2 update site&lt;br /&gt;
9. Thank you&lt;br /&gt;
10. Questions and Discussion&lt;br /&gt;
11. Links and Literature&lt;br /&gt;
11.1. Source Code&lt;br /&gt;
11.2. Eclipse Resources&lt;br /&gt;
11.3. vogella Resources&lt;br /&gt;
1. Eclipse Plugins&lt;br /&gt;
&lt;br /&gt;
The smallest software component in Eclipse are plug-ins. The Eclipse IDE allows the developer to extend the IDE functionality via plug-ins. For example you can create new menu entreis or new editors via plug-ins. This tutorial gives several examples how to do this.&lt;br /&gt;
&lt;br /&gt;
Eclipse is build upon the OSGi framework. The OSGi framework provides a dynamic modular architecture which is used for running the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
2.&amp;nbsp; Prerequisites&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are already familiar with using the Eclipse IDE and have experience in developing Java.&lt;br /&gt;
&lt;br /&gt;
3. Hello World Plug-in&lt;br /&gt;
&lt;br /&gt;
We will create a plug-in which contributes a menu entry to the standard Eclipse menu.&lt;br /&gt;
&lt;br /&gt;
Create a new plug-in project de.vogella.plugin.first via File &#8594; New &#8594; Project &#8594; Plug-in Development &#8594; Plug-in Project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the "Hello, World Command!" template and press Finish. This should automatically open the "Plug-in Development perspective".&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the file MANIFEST.MF, right click it, select Run-As &#8594; Eclipse Application&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A new workbench starts with a new menu entry. If you select this menu entry a message box will be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
4.&amp;nbsp; Contribute to existing UI elements&lt;br /&gt;
&lt;br /&gt;
4.1. Overview&lt;br /&gt;
&lt;br /&gt;
In this example we will add a new context menu entry to the Package explorer view. The context menu is displayed if the user select a file in the package explorer via a right mouse click. We will offer the option to create a HTML page for a Java source file.&lt;br /&gt;
&lt;br /&gt;
To contribute to an existing menu or toolbar you need to know the corresponding ID. This ID can be found via the "Menu Spy". See Eclipse Source Code Guide for details.&lt;br /&gt;
&lt;br /&gt;
4.2. Contribute to package explorer&lt;br /&gt;
&lt;br /&gt;
Create a new plug-in project de.vogella.plugin.htmlconverter. Do not use a template. Select the tab "Dependencies" of the file plugin.xml. Add the dependencies to org.eclipse.jdt.core and org.eclipse.core.resources.&lt;br /&gt;
&lt;br /&gt;
The following uses Eclipse Commands. See Eclipse Commands Tutorial to learn how to work with commands.&lt;br /&gt;
&lt;br /&gt;
Add a command with the ID de.vogella.plugin.htmlconverter.convert and the default handler de.vogella.plugin.htmlconverter.handler.Convert to your plug-in.&lt;br /&gt;
&lt;br /&gt;
Add this command to the menu via the extension point org.eclipse.ui.menus and use as the "locationURI" popup:org.eclipse.jdt.ui.PackageExplorer. Set the label to "Create HTML" for this contribution.&lt;br /&gt;
&lt;br /&gt;
The resulting file plugin.xml should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;?eclipse version="3.4"?&amp;gt;&lt;br /&gt;
&amp;lt;plugin&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;extension&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point="org.eclipse.ui.menus"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;menuContribution&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locationURI="popup:org.eclipse.jdt.ui.PackageExplorer"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commandId="de.vogella.plugin.htmlconverter.convert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label="Create HTML"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style="push"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/menuContribution&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;extension&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point="org.eclipse.ui.commands"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; defaultHandler="de.vogella.plugin.htmlconverter.handler.Convert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="de.vogella.plugin.htmlconverter.convert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name="Convert"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/plugin&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
Eclipse allows to save additional information for each file. You can use the IResource interface and the setPersistentProperty() and getPersistentProperty() methods. With these functions you can save Strings on files. We use these functions to save a directory for Java source files which already were exported via HTML.&lt;br /&gt;
&lt;br /&gt;
Create the de.vogella.plugin.htmlconverter.handler.Convert class.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
package de.vogella.plugin.htmlconverter.handler;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedWriter;&lt;br /&gt;
import java.io.FileWriter;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
&lt;br /&gt;
import org.eclipse.core.commands.AbstractHandler;&lt;br /&gt;
import org.eclipse.core.commands.ExecutionEvent;&lt;br /&gt;
import org.eclipse.core.commands.ExecutionException;&lt;br /&gt;
import org.eclipse.core.resources.IResource;&lt;br /&gt;
import org.eclipse.core.runtime.CoreException;&lt;br /&gt;
import org.eclipse.core.runtime.QualifiedName;&lt;br /&gt;
import org.eclipse.jdt.core.Flags;&lt;br /&gt;
import org.eclipse.jdt.core.ICompilationUnit;&lt;br /&gt;
import org.eclipse.jdt.core.IMethod;&lt;br /&gt;
import org.eclipse.jdt.core.IType;&lt;br /&gt;
import org.eclipse.jdt.core.JavaModelException;&lt;br /&gt;
import org.eclipse.jface.dialogs.MessageDialog;&lt;br /&gt;
import org.eclipse.jface.viewers.IStructuredSelection;&lt;br /&gt;
import org.eclipse.swt.widgets.DirectoryDialog;&lt;br /&gt;
import org.eclipse.ui.handlers.HandlerUtil;&lt;br /&gt;
&lt;br /&gt;
public class Convert extends AbstractHandler {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private QualifiedName path = new QualifiedName("html", "path");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object execute(ExecutionEvent event) throws ExecutionException {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IStructuredSelection selection = (IStructuredSelection) HandlerUtil&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .getActiveMenuSelection(event);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String directory = "";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Object firstElement = selection.getFirstElement();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (firstElement instanceof ICompilationUnit) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ICompilationUnit cu = (ICompilationUnit) firstElement;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IResource res = cu.getResource();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; boolean newDirectory = true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; directory = getPersistentProperty(res, path);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (directory != null &amp;amp;&amp;amp; directory.length() &amp;gt; 0) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; newDirectory = !(MessageDialog.openQuestion(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; HandlerUtil.getActiveShell(event), "Question",&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; "Use the previous output directory?"));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (newDirectory) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DirectoryDialog fileDialog = new DirectoryDialog(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; HandlerUtil.getActiveShell(event));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; directory = fileDialog.open();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (directory != null &amp;amp;&amp;amp; directory.length() &amp;gt; 0) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; analyze(cu);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; setPersistentProperty(res, path, directory);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; write(directory, cu);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; MessageDialog.openInformation(HandlerUtil.getActiveShell(event),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; "Information", "Please select a Java source file");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected String getPersistentProperty(IResource res, QualifiedName qn) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return res.getPersistentProperty(qn);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (CoreException e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return "";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO: Include this in the HTML output&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private void analyze(ICompilationUnit cu) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Cool JDT allows you to analyze the code easily&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // I don't see really a use case here but I just wanted to do this here&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // as I consider this as cool and&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // what to have a place where I can store the data&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IType type = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IType[] allTypes;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; allTypes = cu.getAllTypes();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;* Search the public class&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (int t = 0; t &amp;lt; allTypes.length; t++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (Flags.isPublic((allTypes[t].getFlags()))) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; type = allTypes[t];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (type != null) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String classname = type.getFullyQualifiedName();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IMethod[] methods = type.getMethods();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (JavaModelException e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void setPersistentProperty(IResource res, QualifiedName qn,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String value) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; res.setPersistentProperty(qn, value);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (CoreException e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private void write(String dir, ICompilationUnit cu) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cu.getCorrespondingResource().getName();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String test = cu.getCorrespondingResource().getName();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Need&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String[] name = test.split("\\.");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(test);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(name.length);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String htmlFile = dir + "\\" + name[0] + ".html";&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(htmlFile);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FileWriter output = new FileWriter(htmlFile);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BufferedWriter writer = new BufferedWriter(output);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;html&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;head&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;/head&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;body&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;pre&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write(cu.getSource());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;/pre&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;/body&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write("&amp;lt;/html&amp;gt;");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; writer.flush();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (JavaModelException e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (IOException e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
If you start this plugin you should be able to create HTML output from a Java source file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4.3. Restrict the extension - Visible When&lt;br /&gt;
&lt;br /&gt;
Currently our context menu is always displayed. We would like to show it only if a source file is selected. For this we will use a "visible-when" definition. To learn the details of visible-when please see Eclipse Advanced Usage of Commands .&lt;br /&gt;
&lt;br /&gt;
Add the dependency "org.eclipse.core.expressions" to your plugin. Select your menu contribution. Using the right mouse add the condition to the command that it should only be visible if a file is selected which represents a "org.eclipse.jdt.core.ICompilationUnit". For this exercise you use the predefined variable "activeMenuSelection" which contains the selection in the menu and iterate over it. If the selection can get adapted to ICompilationUnit then the contribution will be visible.&lt;br /&gt;
&lt;br /&gt;
This will result in the following "plugin.xml".&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;?eclipse version="3.4"?&amp;gt;&lt;br /&gt;
&amp;lt;plugin&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;extension&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point="org.eclipse.ui.menus"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;menuContribution&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locationURI="popup:org.eclipse.jdt.ui.PackageExplorer"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commandId="de.vogella.plugin.htmlconverter.convert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label="Create HTML"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style="push"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;visibleWhen&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; checkEnabled="false"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;with&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variable="activeMenuSelection"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;iterate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ifEmpty="false"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operator="or"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;adapt&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type="org.eclipse.jdt.core.ICompilationUnit"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/adapt&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/iterate&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/with&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/visibleWhen&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/menuContribution&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;extension&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point="org.eclipse.ui.commands"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; defaultHandler="de.vogella.plugin.htmlconverter.handler.Convert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="de.vogella.plugin.htmlconverter.convert"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name="Convert"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/command&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/plugin&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
If you now start your plugin the menu entry should only be visible if at least one compilation unit has been selected.&lt;br /&gt;
&lt;br /&gt;
5. Resources and Marker&lt;br /&gt;
&lt;br /&gt;
5.1.&amp;nbsp; Overview&lt;br /&gt;
&lt;br /&gt;
Eclipse represents Resources like Projects, Files, Folders, Packages as IResource.&lt;br /&gt;
&lt;br /&gt;
Marker represent additional informations for resources, e.g. an error marker. Every marker can have attributes (key / value combination). Markers can be displayed in the standard view, e.g. the Task, Bookmark or the problems view. To be displayed in these views you have to use predefined attributes.&lt;br /&gt;
&lt;br /&gt;
The following will demonstrate how to create marker for a selected resource.&lt;br /&gt;
&lt;br /&gt;
5.2. Create markers&lt;br /&gt;
&lt;br /&gt;
Create a plug-in project "de.vogella.plugin.markers". Add the dependency to org.eclipse.core.resources", "org.eclipse.jdt.core" and "org.eclipse.jdt.ui". Create the command "de.vogella.plugin.markers.AddMarker" with the default handler "de.vogella.plugin.markers.handler.AddMarker" and add this command to the menu.&lt;br /&gt;
&lt;br /&gt;
Create the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
package de.vogella.plugin.markers.handler;&lt;br /&gt;
&lt;br /&gt;
import org.eclipse.core.commands.AbstractHandler;&lt;br /&gt;
import org.eclipse.core.commands.ExecutionEvent;&lt;br /&gt;
import org.eclipse.core.commands.ExecutionException;&lt;br /&gt;
import org.eclipse.core.resources.IMarker;&lt;br /&gt;
import org.eclipse.core.resources.IResource;&lt;br /&gt;
import org.eclipse.jdt.core.IJavaProject;&lt;br /&gt;
import org.eclipse.jface.viewers.IStructuredSelection;&lt;br /&gt;
import org.eclipse.ui.handlers.HandlerUtil;&lt;br /&gt;
&lt;br /&gt;
public class AddMarker extends AbstractHandler {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object execute(ExecutionEvent event) throws ExecutionException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IStructuredSelection selection = (IStructuredSelection) HandlerUtil&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .getActiveSite(event).getSelectionProvider().getSelection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (selection == null) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Object firstElement = selection.getFirstElement();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (firstElement instanceof IJavaProject) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IJavaProject type = (IJavaProject) firstElement;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IResource resource = type.getUnderlyingResource();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IMarker marker = resource.createMarker(IMarker.TASK);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; marker.setAttribute(IMarker.MESSAGE, "This a a task");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
If you run you can create a marker in the TODO list if you select a Java project and click your menu entry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.3. More on markers&lt;br /&gt;
&lt;br /&gt;
For more on markers check the following tutorial from IBM developerworks Using markers, annotations, and decorators in Eclipse.&lt;br /&gt;
&lt;br /&gt;
6. Adapters&lt;br /&gt;
&lt;br /&gt;
6.1.&amp;nbsp; Overview&lt;br /&gt;
&lt;br /&gt;
Adapters help to display information about objects in view without having to adjust the existing views. In this example we will create a small view which allows to select objects and use the properties view to display them.&lt;br /&gt;
&lt;br /&gt;
Adapters are used on several places for example you can use an adapter to display your data in the outline view. See Outline View Example for an example how to do this.&lt;br /&gt;
&lt;br /&gt;
6.2.&amp;nbsp; Example&lt;br /&gt;
&lt;br /&gt;
We will simple use an adapter to show our data in the property view. Create a new plugin project "de.vogella.plugin.adapter". Use the "Plug-in with a view" template with the following settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add the dependency "org.eclipse.ui.views" in tab dependencies of plugin.xml.&lt;br /&gt;
&lt;br /&gt;
Create the following data model.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
package de.vogella.plugin.adapter.model;&lt;br /&gt;
&lt;br /&gt;
public class Todo {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private String summary;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private String description;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getSummary() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return summary;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setSummary(String summary) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.summary = summary;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getDescription() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return description;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setDescription(String description) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.description = description;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
Change the code of SampleView.java to the following. After this change you should be able to run your project, open your view and see your todo items.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
package de.vogella.plugin.adapter.views;&lt;br /&gt;
&lt;br /&gt;
import org.eclipse.jface.viewers.ArrayContentProvider;&lt;br /&gt;
import org.eclipse.jface.viewers.ITableLabelProvider;&lt;br /&gt;
import org.eclipse.jface.viewers.LabelProvider;&lt;br /&gt;
import org.eclipse.jface.viewers.TableViewer;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.graphics.Image;&lt;br /&gt;
import org.eclipse.swt.widgets.Composite;&lt;br /&gt;
import org.eclipse.ui.ISharedImages;&lt;br /&gt;
import org.eclipse.ui.PlatformUI;&lt;br /&gt;
import org.eclipse.ui.part.ViewPart;&lt;br /&gt;
&lt;br /&gt;
import de.vogella.plugin.adapter.model.Todo;&lt;br /&gt;
&lt;br /&gt;
public class SampleView extends ViewPart {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static final String ID = "de.vogella.plugin.adapter.views.SampleView";&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private TableViewer viewer;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; class ViewLabelProvider extends LabelProvider implements&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ITableLabelProvider {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public String getColumnText(Object obj, int index) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Todo todo = (Todo) obj;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return todo.getSummary();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public Image getColumnImage(Object obj, int index) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return getImage(obj);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public Image getImage(Object obj) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return PlatformUI.getWorkbench().getSharedImages()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .getImage(ISharedImages.IMG_OBJ_ELEMENT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;* This is a callback that will allow us to create the viewer and initialize&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;* it.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void createPartControl(Composite parent) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; | SWT.V_SCROLL);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewer.setContentProvider(new ArrayContentProvider());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewer.setLabelProvider(new ViewLabelProvider());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; getSite().setSelectionProvider(viewer);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewer.setInput(getElements());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;* Passing the focus request to the viewer's control.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setFocus() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewer.getControl().setFocus();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Build up a simple data model&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private Todo[] getElements() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Todo[] todos = new Todo[2];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Todo todo = new Todo();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo.setSummary("First Todo");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo.setDescription("A very good description");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todos[0] = todo;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo = new Todo();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo.setSummary("Second Todo");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo.setDescription("Second super description");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todos[1] = todo;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return todos;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
To displays its values in the property view, add the extension point "org.eclipse.core.runtime.adapters" to your project. The data of the extension point should be like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;lt;extension&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point="org.eclipse.core.runtime.adapters"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;factory&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adaptableType="de.vogella.plugin.adapter.model.Todo"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class="de.vogella.plugin.adapter.TodoAdapterFactory"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;adapter&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type="org.eclipse.ui.views.properties.IPropertySource"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/adapter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/factory&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
Implement the factory and the new class "TodoPropertySource" which implements "IPropertySource".&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
package de.vogella.plugin.adapter;&lt;br /&gt;
&lt;br /&gt;
import org.eclipse.core.runtime.IAdapterFactory;&lt;br /&gt;
import org.eclipse.ui.views.properties.IPropertySource;&lt;br /&gt;
&lt;br /&gt;
import de.vogella.plugin.adapter.model.Todo;&lt;br /&gt;
&lt;br /&gt;
public class TodoAdapterFactory implements IAdapterFactory {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object getAdapter(Object adaptableObject, Class adapterType) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (adapterType== IPropertySource.class &amp;amp;&amp;amp; adaptableObject instanceof Todo){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return new TodoPropertySource((Todo) adaptableObject);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Class[] getAdapterList() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return new Class[] { IPropertySource.class };&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
package de.vogella.plugin.adapter;&lt;br /&gt;
&lt;br /&gt;
import org.eclipse.ui.views.properties.IPropertyDescriptor;&lt;br /&gt;
import org.eclipse.ui.views.properties.IPropertySource;&lt;br /&gt;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;&lt;br /&gt;
&lt;br /&gt;
import de.vogella.plugin.adapter.model.Todo;&lt;br /&gt;
&lt;br /&gt;
public class TodoPropertySource implements IPropertySource {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private final Todo todo;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public TodoPropertySource(Todo todo) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.todo = todo;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public boolean isPropertySet(Object id) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object getEditableValue() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return this;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public IPropertyDescriptor[] getPropertyDescriptors() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return new IPropertyDescriptor[] {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; new TextPropertyDescriptor("summary", "Summary"),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; new TextPropertyDescriptor("description", "Description") };&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object getPropertyValue(Object id) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (id.equals("summary")) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return todo.getSummary();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (id.equals("description")) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return todo.getDescription();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void resetPropertyValue(Object id) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setPropertyValue(Object id, Object value) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String s = (String) value;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (id.equals("summary")) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo.setSummary(s);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (id.equals("description")) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; todo.setDescription(s);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
If you run your workbench and open your View via Windows -&amp;gt; Show View -&amp;gt; Others -&amp;gt; Sample Category -&amp;gt; Sample View and the property view you should be able to view your data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Deploying a plugin&lt;br /&gt;
&lt;br /&gt;
To use your plug-ins in your standard Eclipse installation you can either export it locally as plug-in and place it into your Eclipse installation or you export it as feature and use the Eclipse update manager to install it.&lt;br /&gt;
&lt;br /&gt;
If you export your plug-in locally you can put it into the Eclipse "dropin" folder of your Eclipse installation. After a restart of your Eclipse your plug-in should be available and ready to be used.&lt;br /&gt;
&lt;br /&gt;
If you want to install your plug-in into your running Eclipse IDE, you can also use "Install into host. Repository". In the export wizard dialog select in this case "Install into host. Repository". This will export your plugin into the selected directory (Repository) and install it directly into the running Eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you create and export an feature you can use the Eclipse update manager directly if you point to the created "metadata" repository during the export. You can then use the Eclipse update manager to install this feature.&lt;br /&gt;
&lt;br /&gt;
8. Tutorial: Deploying a plug-in&lt;br /&gt;
&lt;br /&gt;
8.1. Export plug-in and put into dropin folder&lt;br /&gt;
&lt;br /&gt;
Select your plugin.xml and select the tab overview. Press the hyperlink "Export Wizard".&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the plug-in you want to export.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will create a jar in the selected directory. Copy this jar to the "dropin" directory in your Eclipse installation directory and re-start Eclipse.&lt;br /&gt;
&lt;br /&gt;
After a restart of Eclipse your plug-in should now be available in your Eclipse installation and ready to be used. For example if you contributed a new view you find it under the Windows -&amp;gt; Show View menu entry.&lt;br /&gt;
&lt;br /&gt;
8.2. Create a p2 update site&lt;br /&gt;
&lt;br /&gt;
p2 is the technical component which allows to install, remove and update plugins to your existing Eclipse IDE installation.&lt;br /&gt;
&lt;br /&gt;
To create an update site you require a feature project. Create a feature project for your plugin.&lt;br /&gt;
&lt;br /&gt;
The Eclipse p2 update manager shows per default only features with a category. While the user can deflag this grouping it is often easier to deploy the feature including an category.&lt;br /&gt;
&lt;br /&gt;
In your feature project create file File -&amp;gt; New -&amp;gt; Other -&amp;gt; Plug-in development -&amp;gt; "Category Definition" a new category for your feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press "New Category" and create a category with a name which describes your functionality. Add your feature to this category.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Export your feature via File -&amp;gt; Export -&amp;gt; "Deployable features". Deploy it to a local directory on your machine. Make sure you select on the Option tab your "category.xml". Also make sure to select "Generate metadata repository".&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try if this feature can be installed into your Eclipse IDE. See Using the Eclipse Update Manager for information on how to use the Eclipse update manager. Use the update manager and point to your local directory. Restart the IDE after installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After a restart of Eclipse your plug-in should now be available in your Eclipse installation and ready to be used. For example if you contributed a new view you find it under the Windows -&amp;gt; Show View menu entry.&lt;br /&gt;
&lt;br /&gt;
9. Thank you&lt;br /&gt;
&lt;br /&gt;
Please help me to support this article:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
10. Questions and Discussion&lt;br /&gt;
&lt;br /&gt;
Before posting questions, please see the vogella FAQ. If you have questions or find an error in this article please use the www.vogella.de Google Group. I have created a short list how to create good questions which might also help you.&lt;br /&gt;
&lt;br /&gt;
11. Links and Literature&lt;br /&gt;
&lt;br /&gt;
11.1. Source Code&lt;br /&gt;
&lt;br /&gt;
Source Code of Examples&lt;br /&gt;
&lt;br /&gt;
11.2. Eclipse Resources&lt;br /&gt;
&lt;br /&gt;
http://wiki.eclipse.org/Eclipse_Plug-in_Development_FAQ Eclipse Plug-in Development FAQ&lt;br /&gt;
&lt;br /&gt;
http://www.eclipse.org/articles/article.php?file=Article-Adapters/index.html Adapters in Eclipse&lt;br /&gt;
&lt;br /&gt;
http://www.eclipse.org/articles/Article-Resource-deltas/resource-deltas.html How to react to Eclipse resource deltas&lt;br /&gt;
&lt;br /&gt;
OSGi Tutorial&lt;br /&gt;
&lt;br /&gt;
Eclipse RCP Tutorial&lt;br /&gt;
&lt;br /&gt;
11.3. vogella Resources&lt;br /&gt;
&lt;br /&gt;
Eclipse RCP Training (German) Eclipse RCP Training with Lars Vogel&lt;br /&gt;
&lt;br /&gt;
Android Tutorial Introduction to Android Programming&lt;br /&gt;
&lt;br /&gt;
GWT Tutorial Program in Java and compile to JavaScript and HTML&lt;br /&gt;
&lt;br /&gt;
Eclipse RCP Tutorial Create native applications in Java&lt;br /&gt;
&lt;br /&gt;
JUnit Tutorial Test your application&lt;br /&gt;
&lt;br /&gt;
Git Tutorial Put everything you have under distributed version control system&lt;/p&gt;
</description>
      <pubDate>Thu, 08 Dec 2011 00:53:59 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/9894132</link>
      <guid>http://prodev.springnote.com/pages/9894132</guid>
    </item>
    <item>
      <title>[&#54156;] http://wiki.eclipse.org/Platform_Command_Framework</title>
      <description>&lt;p&gt;[&#52636;&#52376;:&amp;nbsp;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework"&gt;http://wiki.eclipse.org/Platform_Command_Framework&lt;/a&gt;]&lt;/p&gt;
&lt;h1 class="firstHeading" style="background-image: none; background-color: rgb(255, 255, 255); font-weight: normal; margin-bottom: 0.1em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px; font-family: Arial, sans-serif; text-align: left;"&gt;Platform Command Framework&lt;/h1&gt;
&lt;div id="bodyContent" style="font-family: Arial, sans-serif; text-align: left; background-color: rgb(255, 255, 255); font-size: medium;"&gt;
&lt;div id="contentSub" style="font-size: 13px; line-height: 1.2em; margin-top: 0px; margin-right: 0px; margin-bottom: 1.4em; margin-left: 1em; color: rgb(125, 125, 125); width: auto;"&gt;&amp;nbsp;&lt;/div&gt;
&lt;table class="toc" id="toc" style="font-size: 15px; background-color: rgb(249, 249, 249); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(170, 170, 170); border-right-color: rgb(170, 170, 170); border-bottom-color: rgb(170, 170, 170); border-left-color: rgb(170, 170, 170); padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div id="toctitle" style="text-align: center;"&gt;
&lt;h2 style="background-image: none; margin-bottom: 0.6em; padding-top: 0px; padding-bottom: 0px; border-bottom-style: none; font-size: 15px; display: inline; border-top-style: none; border-right-style: none; border-left-style: none; border-color: initial; padding-right: 0px; padding-left: 0px; border-color: initial;"&gt;Contents&lt;/h2&gt;
&amp;nbsp;&lt;span class="toctoggle" style="font-size: 14px;"&gt;[&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework" class="internal" id="togglelink" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;" &gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/div&gt;
&lt;ul style="margin-top: 0.3em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Architecture_Overview" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Architecture Overview&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Eclipse_Commands_Tutorial" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Eclipse Commands Tutorial&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Other_Resources" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Other Resources&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Commands" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Commands&lt;/span&gt;&lt;/a&gt;
&lt;ul style="margin-left: 2em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li class="toclevel-2" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Executing_a_command_with_parameters" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;4.1&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Executing a command with parameters&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Using_an_IActionDelegate_to_execute_a_command" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;4.2&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Using an IActionDelegate to execute a command&lt;/span&gt;&lt;/a&gt;
&lt;ul style="margin-left: 2em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li class="toclevel-3" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Generic_Command_Action_Delegate" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;4.2.1&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Generic Command Action Delegate&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Handlers" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;5&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Handlers&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#KeyBindings" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;6&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;KeyBindings&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Contexts" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;7&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Contexts&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Menu_Contributions" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;8&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Menu Contributions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1" style="margin-bottom: 0.1em;"&gt;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Tracing_Option" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;span class="tocnumber"&gt;9&lt;/span&gt;&amp;nbsp;&lt;span class="toctext"&gt;Tracing Option&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Architecture Overview&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-ui-home/R3_1/contributions-proposal/requestForComments_html_m41374bdb.png" title="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-ui-home/R3_1/contributions-proposal/requestForComments_html_m41374bdb.png" class="external free" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-ui-home/R3_1/contributions-proposal/requestForComments_html_m41374bdb.png&lt;/a&gt;&lt;/p&gt;
Figure 1: High Level Architecture&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Eclipse Commands Tutorial&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html" title="http://www.vogella.de/articles/EclipseCommands/article.html" class="external free" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;http://www.vogella.de/articles/EclipseCommands/article.html&lt;/a&gt;&amp;nbsp;Tutorial about using Eclipse Commands by Lars Vogel&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Other Resources&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;a href="http://blog.eclipse-tips.com/search/label/Commands" title="http://blog.eclipse-tips.com/search/label/Commands" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands in Action&lt;/a&gt;&amp;nbsp;by&amp;nbsp;&lt;a href="http://blog.eclipse-tips.com/" title="http://blog.eclipse-tips.com/" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Prakash G.R.&lt;/a&gt;:&lt;/p&gt;
&lt;ul style="margin-top: 0.3em; margin-left: 1.5em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/01/commands-part-1-actions-vs-commands.html" title="http://blog.eclipse-tips.com/2009/01/commands-part-1-actions-vs-commands.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 1: Actions Vs Commands&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/01/commands-part-2-selection-and.html" title="http://blog.eclipse-tips.com/2009/01/commands-part-2-selection-and.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 2: Selection and Enablement of IHandlers&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2008/12/commands-part-3-parameters-for-commands.html" title="http://blog.eclipse-tips.com/2008/12/commands-part-3-parameters-for-commands.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 3: Parameters for Commands&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/01/commands-part-4-misc-items.html" title="http://blog.eclipse-tips.com/2009/01/commands-part-4-misc-items.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 4: Misc items ...&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/02/commands-part-5-authentication-in-rcp.html" title="http://blog.eclipse-tips.com/2009/02/commands-part-5-authentication-in-rcp.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 5: Authentication in RCP applications&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/03/commands-part-6-toggle-radio-menu.html" title="http://blog.eclipse-tips.com/2009/03/commands-part-6-toggle-radio-menu.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 6: Toggle &amp;amp; Radio menu contributions&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/05/commands-part-7-adding-standard.html" title="http://blog.eclipse-tips.com/2009/05/commands-part-7-adding-standard.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Commands Part 7: Adding standard commands&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/06/keyboard-accessibility-thru-command.html" title="http://blog.eclipse-tips.com/2009/06/keyboard-accessibility-thru-command.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Keyboard accessibility thru Command Framework&lt;/a&gt;&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://blog.eclipse-tips.com/2009/12/toggle-commands-toggle-other.html" title="http://blog.eclipse-tips.com/2009/12/toggle-commands-toggle-other.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Toggle Commands the toggle other contributions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;a href="http://wiki.eclipse.org/Command_Core_Expressions" title="http://wiki.eclipse.org/Command_Core_Expressions" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;Command Core Expressions&lt;/a&gt;&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Commands&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Commands are managed by the&amp;nbsp;&lt;strong&gt;org.eclipse.ui.commands&lt;/strong&gt;&amp;nbsp;extension point and the ICommandService.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;An example of using the extension point to create a command:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;extension&lt;/span&gt;
       &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;point&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.commands"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;category&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;description&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Actions take at lunch time."&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.category"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Lunch"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/category&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;command&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;categoryId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.category"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;description&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Go for the taco."&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Eat That Taco"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/command&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/extension&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;You can programmatically create commands as well. From within a view:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
ICommandService cmdService = &lt;span class="br0"&gt;(&lt;/span&gt;ICommandService&lt;span class="br0"&gt;)&lt;/span&gt; getSite&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;getService&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;
    ICommandService.&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
Category lunch = cmdService
    .&lt;span class="me1"&gt;getCategory&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.category"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;!lunch.&lt;span class="me1"&gt;isDefined&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
  lunch.&lt;span class="me1"&gt;define&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"Lunch"&lt;/span&gt;, &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"Actions take at lunch time."&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;span class="br0"&gt;}&lt;/span&gt;
Command eatTaco = cmdService
    .&lt;span class="me1"&gt;getCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;!eatTaco.&lt;span class="me1"&gt;isDefined&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
  eatTaco.&lt;span class="me1"&gt;define&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"Eat That Taco"&lt;/span&gt;, &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"Go for the taco."&lt;/span&gt;, lunch&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;span class="br0"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Note, however, that a plugin that programmatically defines commands is responsible for cleaning them up if the plugin is ever unloaded.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Also, like IAction you can execute a command directly ... but to get the proper environment it's better to execute it through the IHandlerService. See&amp;nbsp;&lt;a href="http://wiki.eclipse.org/Platform_Command_Framework#Handlers" title="" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;#Handlers&lt;/a&gt;.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;br /&gt;&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h2 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 24px;"&gt;&lt;span class="mw-headline"&gt;Executing a command with parameters&lt;/span&gt;&lt;/h2&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;When a Command specifies its parameters, it can also specify a parameter type and/or some valid values. For example, the showView command.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;command&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"%command.showView.name"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;description&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"%command.showView.description"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;categoryId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.category.views"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;defaultHandler&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.handlers.ShowViewHandler"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;commandParameter&lt;/span&gt;
        &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView.viewId"&lt;/span&gt;
        &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"%command.showView.viewIdParameter"&lt;/span&gt;
        &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;values&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.internal.registry.ViewParameterValues"&lt;/span&gt; &lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/command&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;To execute this command, you need to create a ParameterizedCommand with a Parameterization (an instance of a parameter and its value).&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
ICommandService commandService = ...;
                IHandlerService handlerService = ...;
                Command showView = commandService
                                .&lt;span class="me1"&gt;getCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"org.eclipse.ui.views.showView"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                IParameter viewIdParm = showView
                                .&lt;span class="me1"&gt;getParameter&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"org.eclipse.ui.views.showView.viewId"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
 
                &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// the viewId parameter provides a list of valid values ... if you&lt;/span&gt;
                &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// knew the id of the problem view, you could skip this step.&lt;/span&gt;
                &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// This method is supposed to be used in places like the keys&lt;/span&gt;
                &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// preference page, to allow the user to select values&lt;/span&gt;
                IParameterValues parmValues = viewIdParm.&lt;span class="me1"&gt;getValues&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                &lt;span class="kw3"&gt;String&lt;/span&gt; viewId = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
                &lt;span class="kw3"&gt;Iterator&lt;/span&gt; i = parmValues.&lt;span class="me1"&gt;getParameterValues&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;values&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;iterator&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;while&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;i.&lt;span class="me1"&gt;hasNext&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                        &lt;span class="kw3"&gt;String&lt;/span&gt; id = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; i.&lt;span class="me1"&gt;next&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                        &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;id.&lt;span class="me1"&gt;indexOf&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"ProblemView"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; != &lt;span class="nu0"&gt;-1&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                                viewId = id;
                                &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;break&lt;/span&gt;;
                        &lt;span class="br0"&gt;}&lt;/span&gt;
                &lt;span class="br0"&gt;}&lt;/span&gt;
 
                Parameterization parm = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Parameterization&lt;span class="br0"&gt;(&lt;/span&gt;viewIdParm, viewId&lt;span class="br0"&gt;)&lt;/span&gt;;
                ParameterizedCommand parmCommand = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ParameterizedCommand&lt;span class="br0"&gt;(&lt;/span&gt;
                                showView, &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Parameterization&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt; parm &lt;span class="br0"&gt;}&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
 
                handlerService.&lt;span class="me1"&gt;executeCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;parmCommand, &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;This executes the showView command with the problem view id. This is done for us when declaratively specifying a keybinding.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;key&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;sequence&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"M2+M3+Q X"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;contextId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.contexts.window"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;commandId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView"&lt;/span&gt;
      &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;schemeId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.defaultAcceleratorConfiguration"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;parameter&lt;/span&gt; 
        &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView.viewId"&lt;/span&gt;
        &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;value&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.ProblemView"&lt;/span&gt; &lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/key&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h2 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 24px;"&gt;&lt;span class="mw-headline"&gt;Using an IActionDelegate to execute a command&lt;/span&gt;&lt;/h2&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;In 3.1 and 3.2 there is no declarative support for a menu item to execute a command. But you can write an IActionDelegate (like GenericCommandActionDelegate) that can be used in the standard extension points (org.eclipse.ui.actionSets, org.eclipse.ui.popupMenus, org.eclipse.ui.editorActions, and org.eclipse.ui.viewActions) and use it to execute the command.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;We need to do these things to wire our command to a menu item:&lt;/p&gt;
&lt;ol style="line-height: 1.5em; margin-top: 0.3em; margin-left: 3.2em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Define an&amp;nbsp;&lt;code style="background-color: rgb(249, 249, 249);"&gt;action&lt;/code&gt;&amp;nbsp;in an extension point using plugin.xml markup&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Connect this action to our IActionDelegate instance (also in plugin.xml)&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Tell our IActionDelegate which command to execute (also in plugin.xml)&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Code the IActionDelegate class to perform the command execution. (see code example below).&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;For example, in the above section we saw the showView command takes one parameter, the view id. Here is how we create an Action to execute it:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;action&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.examples.actions.showOutlineView"&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;label&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Show View:Outline"&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;menubarPath&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.examples.actions.showViewMenu/additions"&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;style&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"push"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;class&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;class&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.tests.api.GenericCommandActionDelegate"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
     &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;parameter&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"commandId"&lt;/span&gt; 
                          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;value&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
     &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;parameter&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView.viewId"&lt;/span&gt; 
                          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;value&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.ContentOutline"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/class&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/action&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;action&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.examples.actions.showBookmarkView"&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;label&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Show View:Bookmark"&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;menubarPath&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.examples.actions.showViewMenu/additions"&lt;/span&gt;
  &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;style&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"push"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;class&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;class&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.tests.api.GenericCommandActionDelegate"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;parameter&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"commandId"&lt;/span&gt; 
                          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;value&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;parameter&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.showView.viewId"&lt;/span&gt; 
                          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;value&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.views.BookmarkView"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/class&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/action&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;strong&gt;Notes:&lt;/strong&gt;&lt;/p&gt;
&lt;ul style="margin-top: 0.3em; margin-left: 1.5em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;For commands without parameters, you can use the class attribute short from:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: 1.1em;"&gt;
class="org.eclipse.ui.tests.api.GenericCommandActionDelegate:my.commandId"
&lt;/pre&gt;
&lt;ul style="margin-top: 0.3em; margin-left: 1.5em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;your action definition looks more like a keybinding definition. You are specifying the command id and any parameters needed for that action.&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;We specifed the action using the &amp;lt;class/&amp;gt; element instead of the class attribute ... you'll get a couple of warnings, ignore them.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style="margin-top: 0.3em; margin-left: 1.5em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;The &lt;strong&gt;definitionId&lt;/strong&gt; that is currently in the &amp;lt;action/&amp;gt; element is for linking up legacy actions to a keybinding through a command. For example, you've had a ShowMyViewActionDelegate since 3.0, and you want to attach a keybinding to it. We don't want to use that.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style="margin-top: 0.3em; margin-left: 1.5em; line-height: 1.5em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;We have just shown the plugin.xml markup to trigger a command from within an action. Since the action can be inserted into a menu, this approach allows commands to be triggered by menu items. The glue between actions and commands is a single generic IActionDelegate implementation (shown below). All of the specific behavior code is now unified in the command and its handler. We no longer need an action delegate with a specific run() method for every menu item; consequently we don't need to link ActionSets to commands with the definitionId.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;strong&gt;Known Issues:&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;When you start up eclipse you'll get warnings about your actions not having a class attribute. It's not an error, and won't effect the action performance.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;You'll also see the actions in the Uncategorized section of the keybindings page. You can bind keys to them but they won't work from the keybinding. That's OK, you should be binding keys to the command not the action.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;br /&gt;&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h3 style="background-image: none; margin-bottom: 0.3em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; border-bottom-color: initial; font-size: 21px;"&gt;&lt;span class="mw-headline"&gt;Generic Command Action Delegate&lt;/span&gt;&lt;/h3&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;We'll need a more robust implementation, but in 3.2 your action delegate needs to look something like the class below. I've only tested this with org.eclipse.ui.actionSets, but it should work with the viewActions, editorActions, and popupMenus extension points as well. The latest version of the code lives in HEAD in the org.eclipse.ui.tests plugin: &lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.tests/Eclipse%20UI%20Tests/org/eclipse/ui/tests/api/GenericCommandActionDelegate.java?view=co" title="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.tests/Eclipse%20UI%20Tests/org/eclipse/ui/tests/api/GenericCommandActionDelegate.java?view=co" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;GenericCommandActionDelegate.java&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*******************************************************************************
  * Copyright (c) 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/&lt;/span&gt;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;tests&lt;/span&gt;.&lt;span class="me1"&gt;api&lt;/span&gt;;
 
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; java.&lt;span class="me1"&gt;util&lt;/span&gt;.&lt;span class="kw3"&gt;ArrayList&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; java.&lt;span class="me1"&gt;util&lt;/span&gt;.&lt;span class="kw3"&gt;Iterator&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; java.&lt;span class="me1"&gt;util&lt;/span&gt;.&lt;span class="kw3"&gt;Map&lt;/span&gt;;
 
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;commands&lt;/span&gt;.&lt;span class="me1"&gt;Command&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;commands&lt;/span&gt;.&lt;span class="me1"&gt;IParameter&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;commands&lt;/span&gt;.&lt;span class="me1"&gt;Parameterization&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;commands&lt;/span&gt;.&lt;span class="me1"&gt;ParameterizedCommand&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;commands&lt;/span&gt;.&lt;span class="me1"&gt;common&lt;/span&gt;.&lt;span class="me1"&gt;NotDefinedException&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;runtime&lt;/span&gt;.&lt;span class="me1"&gt;CoreException&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;runtime&lt;/span&gt;.&lt;span class="me1"&gt;IConfigurationElement&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;core&lt;/span&gt;.&lt;span class="me1"&gt;runtime&lt;/span&gt;.&lt;span class="me1"&gt;IExecutableExtension&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;jface&lt;/span&gt;.&lt;span class="me1"&gt;action&lt;/span&gt;.&lt;span class="me1"&gt;IAction&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;jface&lt;/span&gt;.&lt;span class="me1"&gt;viewers&lt;/span&gt;.&lt;span class="me1"&gt;ISelection&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IEditorActionDelegate&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IEditorPart&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IObjectActionDelegate&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IViewActionDelegate&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IViewPart&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IWorkbenchPart&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IWorkbenchWindow&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;IWorkbenchWindowActionDelegate&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;commands&lt;/span&gt;.&lt;span class="me1"&gt;ICommandService&lt;/span&gt;;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.&lt;span class="me1"&gt;eclipse&lt;/span&gt;.&lt;span class="me1"&gt;ui&lt;/span&gt;.&lt;span class="me1"&gt;handlers&lt;/span&gt;.&lt;span class="me1"&gt;IHandlerService&lt;/span&gt;;
 
 &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/**
  * This action delegate can be used to specify a command with or without
  * parameters be called from an &amp;amp;lt;action/&amp;amp;gt; specified in actionSets,
  * editorActions, viewActions, or popupMenus.
  */&lt;/span&gt;
 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; GenericCommandActionDelegate &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;implements&lt;/span&gt;
         IWorkbenchWindowActionDelegate, IViewActionDelegate,
         IEditorActionDelegate, IObjectActionDelegate, IExecutableExtension &lt;span class="br0"&gt;{&lt;/span&gt;
 
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span class="kw3"&gt;String&lt;/span&gt; PARM_COMMAND_ID = &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"commandId"&lt;/span&gt;;
 
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span class="kw3"&gt;String&lt;/span&gt; commandId = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
 
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span class="kw3"&gt;Map&lt;/span&gt; parameterMap = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
 
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; ParameterizedCommand parameterizedCommand = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
 
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; IHandlerService handlerService = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; dispose&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         handlerService = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
         parameterizedCommand = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
         parameterMap = &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; run&lt;span class="br0"&gt;(&lt;/span&gt;IAction action&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;handlerService == &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// what, no handler service ... no problem&lt;/span&gt;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;commandId != &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                 handlerService.&lt;span class="me1"&gt;executeCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;commandId, &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="br0"&gt;}&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;parameterizedCommand != &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                 handlerService.&lt;span class="me1"&gt;executeCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;parameterizedCommand, &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="br0"&gt;}&lt;/span&gt;
             &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// else there is no command for this delegate&lt;/span&gt;
         &lt;span class="br0"&gt;}&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;Exception&lt;/span&gt; e&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// exceptions reduced for brevity&lt;/span&gt;
             &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// and we won't just do a print out :-)&lt;/span&gt;
         &lt;span class="br0"&gt;}&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
      *      org.eclipse.jface.viewers.ISelection)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; selectionChanged&lt;span class="br0"&gt;(&lt;/span&gt;IAction action, ISelection selection&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// we don't care, handlers get their selection from the&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// ExecutionEvent application context&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
      *      java.lang.String, java.lang.Object)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; setInitializationData&lt;span class="br0"&gt;(&lt;/span&gt;IConfigurationElement config,
             &lt;span class="kw3"&gt;String&lt;/span&gt; propertyName, &lt;span class="kw3"&gt;Object&lt;/span&gt; data&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; CoreException &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="kw3"&gt;String&lt;/span&gt; id = config.&lt;span class="me1"&gt;getAttribute&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;IWorkbenchRegistryConstants.&lt;span class="me1"&gt;ATT_ID&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// save the data until our init(*) call, where we can get&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// the services.&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;data &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;instanceof&lt;/span&gt; &lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             commandId = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; data;
         &lt;span class="br0"&gt;}&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;data &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;instanceof&lt;/span&gt; &lt;span class="kw3"&gt;Map&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             parameterMap = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;Map&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; data;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;parameterMap.&lt;span class="me1"&gt;get&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;PARM_COMMAND_ID&lt;span class="br0"&gt;)&lt;/span&gt; == &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                 Status status = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Status&lt;span class="br0"&gt;(&lt;/span&gt;IStatus.&lt;span class="me1"&gt;ERROR&lt;/span&gt;,
                         &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"org.eclipse.ui.tests"&lt;/span&gt;, &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"The '"&lt;/span&gt; + id
                                 + &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"' action won't work without a commandId"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throw&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; CoreException&lt;span class="br0"&gt;(&lt;/span&gt;status&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="br0"&gt;}&lt;/span&gt;
         &lt;span class="br0"&gt;}&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;else&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             Status status = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Status&lt;span class="br0"&gt;(&lt;/span&gt;
                     IStatus.&lt;span class="me1"&gt;ERROR&lt;/span&gt;,
                     &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"org.eclipse.ui.tests"&lt;/span&gt;,
                     &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"The '"&lt;/span&gt;
                             + id
                             + &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"' action won't work without some initialization parameters"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throw&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; CoreException&lt;span class="br0"&gt;(&lt;/span&gt;status&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/**
      * Build a command from the executable extension information.
      * 
      * @param commandService
      *            to get the Command object
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; createCommand&lt;span class="br0"&gt;(&lt;/span&gt;ICommandService commandService&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="kw3"&gt;String&lt;/span&gt; id = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; parameterMap.&lt;span class="me1"&gt;get&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;PARM_COMMAND_ID&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;id == &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;parameterMap.&lt;span class="me1"&gt;size&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; == &lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             commandId = id;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;try&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             Command cmd = commandService.&lt;span class="me1"&gt;getCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;id&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;!cmd.&lt;span class="me1"&gt;isDefined&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                 &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// command not defined? no problem ...&lt;/span&gt;
                 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt;;
             &lt;span class="br0"&gt;}&lt;/span&gt;
             &lt;span class="kw3"&gt;ArrayList&lt;/span&gt; parameters = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; &lt;span class="kw3"&gt;ArrayList&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="kw3"&gt;Iterator&lt;/span&gt; i = parameterMap.&lt;span class="me1"&gt;entrySet&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;iterator&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;while&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;i.&lt;span class="me1"&gt;hasNext&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                 &lt;span class="kw3"&gt;Map&lt;/span&gt;.&lt;span class="me1"&gt;Entry&lt;/span&gt; entry = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;Map&lt;/span&gt;.&lt;span class="me1"&gt;Entry&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; i.&lt;span class="me1"&gt;next&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                 &lt;span class="kw3"&gt;String&lt;/span&gt; parmName = &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; entry.&lt;span class="me1"&gt;getKey&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
                 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;PARM_COMMAND_ID.&lt;span class="me1"&gt;equals&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;parmName&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;continue&lt;/span&gt;;
                 &lt;span class="br0"&gt;}&lt;/span&gt;
                 IParameter parm = cmd.&lt;span class="me1"&gt;getParameter&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;parmName&lt;span class="br0"&gt;)&lt;/span&gt;;
                 &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;parm == &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
                     &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// asking for a bogus parameter? No problem&lt;/span&gt;
                     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt;;
                 &lt;span class="br0"&gt;}&lt;/span&gt;
                 parameters.&lt;span class="me1"&gt;add&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Parameterization&lt;span class="br0"&gt;(&lt;/span&gt;parm, &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; entry.&lt;span class="me1"&gt;getValue&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             &lt;span class="br0"&gt;}&lt;/span&gt;
             parameterizedCommand = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ParameterizedCommand&lt;span class="br0"&gt;(&lt;/span&gt;cmd,
                     &lt;span class="br0"&gt;(&lt;/span&gt;Parameterization&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; parameters
                             .&lt;span class="me1"&gt;toArray&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Parameterization&lt;span class="br0"&gt;[&lt;/span&gt;parameters.&lt;span class="me1"&gt;size&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;catch&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;NotDefinedException e&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// command is bogus? No problem, we'll do nothing.&lt;/span&gt;
         &lt;span class="br0"&gt;}&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; init&lt;span class="br0"&gt;(&lt;/span&gt;IWorkbenchWindow window&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;handlerService != &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// already initialized&lt;/span&gt;
             &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
 
         handlerService = &lt;span class="br0"&gt;(&lt;/span&gt;IHandlerService&lt;span class="br0"&gt;)&lt;/span&gt; window
                 .&lt;span class="me1"&gt;getService&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;IHandlerService.&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;parameterMap != &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             ICommandService commandService = &lt;span class="br0"&gt;(&lt;/span&gt;ICommandService&lt;span class="br0"&gt;)&lt;/span&gt; window
                     .&lt;span class="me1"&gt;getService&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;ICommandService.&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
             createCommand&lt;span class="br0"&gt;(&lt;/span&gt;commandService&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; init&lt;span class="br0"&gt;(&lt;/span&gt;IViewPart view&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         init&lt;span class="br0"&gt;(&lt;/span&gt;view.&lt;span class="me1"&gt;getSite&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;getWorkbenchWindow&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction,
      *      org.eclipse.ui.IEditorPart)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; setActiveEditor&lt;span class="br0"&gt;(&lt;/span&gt;IAction action, IEditorPart targetEditor&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// we don't actually care about the active editor, since that&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// information is in the ExecutionEvent application context&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// but we need to make sure we're initialized.&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;targetEditor != &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             init&lt;span class="br0"&gt;(&lt;/span&gt;targetEditor.&lt;span class="me1"&gt;getSite&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;getWorkbenchWindow&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 
     &lt;span class="coMULTI" style="color: rgb(63, 95, 191); font-style: italic;"&gt;/*
      * (non-Javadoc)
      * 
      * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
      *      org.eclipse.ui.IWorkbenchPart)
      */&lt;/span&gt;
     &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; setActivePart&lt;span class="br0"&gt;(&lt;/span&gt;IAction action, IWorkbenchPart targetPart&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// we don't actually care about the active part, since that&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// information is in the ExecutionEvent application context&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// but we need to make sure we're initialized.&lt;/span&gt;
         &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;targetPart != &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
             init&lt;span class="br0"&gt;(&lt;/span&gt;targetPart.&lt;span class="me1"&gt;getSite&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;getWorkbenchWindow&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
         &lt;span class="br0"&gt;}&lt;/span&gt;
     &lt;span class="br0"&gt;}&lt;/span&gt;
 &lt;span class="br0"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Handlers&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Handlers are managed by the &lt;strong&gt;org.eclipse.ui.handlers&lt;/strong&gt; extension point and the IHandlerService. Many Handlers can register for a command. At any give time, either 0 or 1 handlers will be active for the command. A handler's active state and enabled state can be controlled declaratively. See &lt;a href="http://wiki.eclipse.org/Command_Core_Expressions" title="Command Core Expressions" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;Command Core Expressions&lt;/a&gt; for a more complex description of the declarative expressions. Handlers are responsible for interpreting any optional command parameters using the ExecutionEvent parameter.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;extension&lt;/span&gt;
       &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;point&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.handlers"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;handler&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;class&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.handlers.TacoHandler"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;commandId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
       &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;activeWhen&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;with&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;variable&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"activeContexts"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
             &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;iterate&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;operator&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"or"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
                &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;equals&lt;/span&gt; &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;value&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.contexts.taco"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
             &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/iterate&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/with&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
       &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/activeWhen&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/handler&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/extension&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Here the handler is checking the activeContexts variable (See &lt;a href="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/ISources.html" title="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/ISources.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;org.eclipse.ui.ISources&lt;/a&gt;) and if the "taco" context is active, the handler is active.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;The handler itself, &lt;strong&gt;TacoHandler&lt;/strong&gt;, must implement IHandler but would usually be derived from the abstract base class &lt;a href="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/commands/AbstractHandler.html" title="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/commands/AbstractHandler.html" class="external text" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: ; background-color: initial; padding-right: 13px; background-position: 100% 50%;"&gt;org.eclipse.core.commands.AbstractHandler&lt;/a&gt;.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;You can create and activate a handler programmatically:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
IHandlerService handlerService = &lt;span class="br0"&gt;(&lt;/span&gt;IHandlerService&lt;span class="br0"&gt;)&lt;/span&gt; getSite&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;
    .&lt;span class="me1"&gt;getService&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;IHandlerService.&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
IHandler handler = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; AbstractHandler&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
  &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw3"&gt;Object&lt;/span&gt; execute&lt;span class="br0"&gt;(&lt;/span&gt;ExecutionEvent event&lt;span class="br0"&gt;)&lt;/span&gt;
          &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException &lt;span class="br0"&gt;{&lt;/span&gt;
    &lt;span class="kw3"&gt;System&lt;/span&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"Eat that Taco"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
    &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;;
  &lt;span class="br0"&gt;}&lt;/span&gt;
&lt;span class="br0"&gt;}&lt;/span&gt;;
handlerService
    .&lt;span class="me1"&gt;activateHandler&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;, handler&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;As of 3.2 (and later releases) we should be calling the IHandlerService to run commands. We should not call the Command object execute method itself.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
handlerService.&lt;span class="me1"&gt;executeCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;, &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;In 3.1 it is still necessary to call the Command object directly since the IHandlerService didn't support executeCommand(*). But you can provide almost the same execution environment.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
Command eatTaco = cmdService
   .&lt;span class="me1"&gt;getCommand&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
eatTaco.&lt;span class="me1"&gt;execute&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ExecutionEvent&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;Collections&lt;/span&gt;.&lt;span class="me1"&gt;EMPTY_MAP&lt;/span&gt;, &lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;null&lt;/span&gt;, handlerService.&lt;span class="me1"&gt;getCurrentState&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;If you want the handler to evaluate an enablement expression you can do that using the expression parameter of the activateHandler() method. Here is how you need to setup your expression in order to properly work tracking selection changes:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
Expression expr = &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Expression&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
    &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; EvaluationResult evaluate&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; IEvaluationContext context&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
        &lt;span class="kw3"&gt;Object&lt;/span&gt; sel = context.&lt;span class="me1"&gt;getVariable&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;ISources.&lt;span class="me1"&gt;ACTIVE_CURRENT_SELECTION_NAME&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
        &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; EvaluationResult.&lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;TRUE&lt;/span&gt;/&lt;span class="kw2" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;FALSE&lt;/span&gt; depending on how much you like the selection&lt;span class="br0"&gt;)&lt;/span&gt;
    &lt;span class="br0"&gt;}&lt;/span&gt;
    &lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kw4" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; collectExpressionInfo&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; ExpressionInfo info&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
         &lt;span class="co1" style="color: rgb(63, 127, 95); font-style: italic;"&gt;// You need this to cause the expr to be evaluated on selection events&lt;/span&gt;
         info.&lt;span class="me1"&gt;markDefaultVariableAccessed&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
    &lt;span class="br0"&gt;}&lt;/span&gt;
&lt;span class="br0"&gt;}&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;KeyBindings&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;KeyBindings are managed by the &lt;strong&gt;org.eclipse.ui.bindings&lt;/strong&gt; extension point and the IBindingService. Keybindings cannot be updated programmatically.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;extension&lt;/span&gt;
       &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;point&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.bindings"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;key&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;commandId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.eatTaco"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;contextId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.contexts.taco"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;schemeId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.defaultAcceleratorConfiguration"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;sequence&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"CTRL+3"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/key&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/extension&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;A key binding is active when the context is active. A keybinding is associated with a command (with optional parameters specified by parameter id and value). If a command has a handler while the keybinding is invoked, the handler extracts the command parameters specified by the keybinding from the ExecutionEvent and invokes the appropriate action.&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Contexts&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Contexts are managed by the &lt;strong&gt;org.eclipse.ui.contexts&lt;/strong&gt; extension point and the IContextService.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Most contexts are created by the extension point, and activated programmatically when appropriate. But you can create contexts programmatically as well. The active contexts usually form a tree, although in the case of keybindings this tree is narrowed down to a branch.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-xml" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;extension&lt;/span&gt;
       &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;point&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.contexts"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;context&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;description&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"To allow the consumption of Tacos"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"z.ex.view.keybindings.contexts.taco"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"Mexican Food"&lt;/span&gt;
          &lt;span class="re0" style="color: rgb(0, 0, 102);"&gt;parentId&lt;/span&gt;=&lt;span class="st0" style="color: rgb(255, 0, 0);"&gt;"org.eclipse.ui.contexts.window"&lt;/span&gt;&lt;span class="re2" style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/context&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="sc3" style="color: rgb(0, 153, 0);"&gt;&lt;span class="re1" style="font-weight: bold; color: black;"&gt;&amp;lt;/extension&lt;span class="re2"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;For a context that was attached to a view, it would normally be activated in the view's createPartControl(*) method.&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
IContextService contextService = &lt;span class="br0"&gt;(&lt;/span&gt;IContextService&lt;span class="br0"&gt;)&lt;/span&gt; getSite&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;
  .&lt;span class="me1"&gt;getService&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;IContextService.&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
IContextActivation contextActivation = contextService.&lt;span class="me1"&gt;activateContext&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.contexts.taco"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;You can only de-activate a context that you are responsible for activating.&lt;/p&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Programmatically, you can create contexts:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-java" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
&lt;span class="kw3"&gt;Context&lt;/span&gt; tacos = contextService
    .&lt;span class="me1"&gt;getContext&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"z.ex.view.keybindings.contexts.taco"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;span class="kw1" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;!tacos.&lt;span class="me1"&gt;isDefined&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;
  tacos.&lt;span class="me1"&gt;define&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"Mexican Food"&lt;/span&gt;, &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"To allow the consumption of Tacos"&lt;/span&gt;,
      &lt;span class="st0" style="color: rgb(42, 0, 255);"&gt;"org.eclipse.ui.contexts.window"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;
&lt;span class="br0"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;Note, however, that a plugin that programmatically defines contexts is responsible for cleaning them up if the plugin is ever unloaded.&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Menu Contributions&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;See &lt;a href="http://wiki.eclipse.org/Menu_Contributions" title="Menu Contributions" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;Menu Contributions&lt;/a&gt;&lt;/p&gt;
&lt;a style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;&lt;/a&gt;
&lt;h1 style="background-image: none; font-weight: normal; margin-bottom: 0.6em; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(170, 170, 170); font-size: 30px;"&gt;&lt;span class="mw-headline"&gt;Tracing Option&lt;/span&gt;&lt;/h1&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;There are a couple of reasons why keybindings and commands might not work.&lt;/p&gt;
&lt;ol style="line-height: 1.5em; margin-top: 0.3em; margin-left: 3.2em; padding-left: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Keybindings are in a context that is not active&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;There is a keybinding conflict&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;No handler is currently active for the command&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;There is a handler conflict&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;To help track down the problem, you can run with debug tracing options. For example:&lt;/p&gt;
&lt;pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: 1.1em;"&gt;
org.eclipse.ui/debug=true
org.eclipse.ui/trace/keyBindings=true
org.eclipse.ui/trace/keyBindings.verbose=true
org.eclipse.ui/trace/sources=true
org.eclipse.ui/trace/handlers=true
org.eclipse.ui/trace/handlers.verbose=true
#org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.ui.edit.copy
org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.jdt.ui.navigate.open.type
org.eclipse.ui/trace/contexts=true
org.eclipse.ui/trace/contexts.verbose=true
&lt;/pre&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;br /&gt;
I put these options in a &lt;strong&gt;debug.options&lt;/strong&gt; file and run eclipse using:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-bash" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
bash$ eclipse -debug debug.options -data /opt/&lt;span class="kw3" style="color: rgb(122, 8, 116); font-weight: bold;"&gt;local&lt;/span&gt;/pw_workspace &amp;gt;debug.log &lt;span class="nu0"&gt;2&lt;/span&gt;&amp;gt;&amp;amp;&lt;span class="nu0"&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;This logs the debug output to the debug.log file. This works on windows as well:&lt;/p&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;pre class="source-dos" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); background-color: rgb(249, 249, 249); line-height: normal;"&gt;
C:\development&amp;gt; eclipse33\eclipsec.exe -debug debug.options -data workspaces\pw_workspace &amp;gt;debug.log &lt;span class="nu0"&gt;2&lt;/span&gt;&amp;gt;&amp;amp;&lt;span class="nu0"&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;strong&gt;handlers.verbose.commandId&lt;/strong&gt; allows you to track the information about a specific command that isn't working. org.eclipse.jdt.ui.navigate.open.type is the open type dialog (normally CTRL+SHIFT+T) and org.eclipse.ui.edit.copy (commented out) is COPY (normally CTRL+C)&lt;/p&gt;
&lt;div id="catlinks" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(170, 170, 170); border-right-color: rgb(170, 170, 170); border-bottom-color: rgb(170, 170, 170); border-left-color: rgb(170, 170, 170); background-color: rgb(249, 249, 249); padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; margin-top: 1em;"&gt;
&lt;p class="catlinks" style="margin-top: 0.4em; margin-bottom: 10px; line-height: 1.5em;"&gt;&lt;a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;Category&lt;/a&gt;: &lt;span&gt;&lt;a href="http://wiki.eclipse.org/Category:Eclipse_Project" title="Category:Eclipse Project" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-color: initial;"&gt;Eclipse Project&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
      <pubDate>Wed, 16 Nov 2011 15:18:23 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/9467724</link>
      <guid>http://prodev.springnote.com/pages/9467724</guid>
    </item>
    <item>
      <title>[&#54156;] Eclipse Commands Tutorial</title>
      <description>&lt;p&gt;[&#52636;&#52376; :&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html"&gt;http://www.vogella.de/articles/EclipseCommands/article.html&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="titlepage" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title"&gt;Eclipse Commands Tutorial&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section author" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="author"&gt;&lt;span class="firstname"&gt;Lars&lt;/span&gt;&amp;nbsp;&lt;span class="surname"&gt;Vogel&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;p class="releaseinfo" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Version 2.0&lt;/p&gt;
&lt;p class="releaseinfo" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;p class="copyright" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Copyright &#169; 2007- 2011 Lars Vogel&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;p class="pubdate" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;28.03.2011&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section revhistory" style="background-color: #F9F9D8;"&gt;
&lt;table width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th colspan="3" style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-left: 5px; padding-right: 4px; padding-top: 4px; vertical-align: top; background-color: rgb(247, 247, 247); font-size: 13px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;strong style=""&gt;Revision History&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Revision 0.1&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;30.03.2009&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Lars Vogel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="3" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Created&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Revision 0.2 - 2.0&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;11.04.2009 - 28.03.2011&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Lars Vogel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="3" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;bugfixes and improvements&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class="section abstract" style="background-color: #F9F9D8;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;
&lt;p class="title"&gt;&lt;strong style=""&gt;Eclipse Commands&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This article describes the usage of Eclipse commands. It describes how to create commands, handlers, add commands into the menu, pop-ups, views and editors and the usage of expressions to restrict UI contributions.&lt;/p&gt;
&lt;p&gt;This article is based on Eclipse Helios (3.6).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class="toc" style="line-height: 1.2; font-size: 14px; color: rgb(0, 0, 0); font-family: Georgia, serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;p&gt;&lt;strong style=""&gt;Table of Contents&lt;/strong&gt;&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;1. Eclipse Commands - Overview&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_overview" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;1.1. Overview&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_uri" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;1.2. Location URI - User interface&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_handler" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;1.3. Command Handler&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#prerequisite" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;2. Pre-requisite&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#firstcommand" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;3. Commands and menus&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_define" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;3.1. Defining commands&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_menu" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;3.2. Using commands in menus&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#toolbar" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;4. Commands and toolbars&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#toolbar_overview" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;4.1. Overview&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#toolbar_applicationtoolbar" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;4.2. Application toolbar (coolbar)&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#toolbar__viewtoolbar" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;4.3. Contribution to the View Toolbar&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_toolbardropdown" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;4.4. Drop down list&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#contextmenu" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;5. Commands and context menus&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#commands_advanced" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;6. Advanced Commands&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#thankyou" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;7. Thank you&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#questions" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;8. Questions and Discussion&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#resources" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;9. Links and Literature&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#sourcecode" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;9.1. Source Code&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#resources_eclipsecommands" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;9.2. Eclipse Commands Resources&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html#resources_general" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;9.3. vogella Resources&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;div class="section" title="1.&amp;amp;nbsp;Eclipse Commands - Overview" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;1.&amp;nbsp;Eclipse Commands - Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section" title="1.1.&amp;amp;nbsp;Overview"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;1.1.&amp;nbsp;Overview&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;A command in Eclipse is a declarative description of a component and is independent from the implementation details. Commands are defined via the extension point "org.eclipse.ui.commands". A command can be categorized, assigned to the user interface and a key binding can be defined for the command. The behavior of a command can be defined via a handler.&lt;/p&gt;
&lt;p&gt;To use a command in your User Interface you need:&lt;/p&gt;
&lt;div class="itemizedlist"&gt;
&lt;ul class="itemizedlist"&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;Command - Declarative description of the component&lt;/p&gt;
&lt;/li&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;Handler - Defines the behavior&lt;/p&gt;
&lt;/li&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;UI Assignment - Where and how should the command be included in the UI&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="1.2.&amp;amp;nbsp;Location URI - User interface"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;1.2.&amp;nbsp;Location URI - User interface&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Commands can be used in menus, toolbars and / or context menus. Where and how these commands are displayed is defined via a location URI.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="table"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;
&lt;p class="title"&gt;&lt;strong style=""&gt;Table&amp;nbsp;1.&amp;nbsp;Location URI's&lt;/strong&gt;&lt;/p&gt;
&lt;div class="table-contents"&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-left: 5px; padding-right: 4px; padding-top: 4px; vertical-align: top; background-color: rgb(247, 247, 247); font-size: small;"&gt;Contribution to&lt;/th&gt;
&lt;th style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-left: 5px; padding-right: 4px; padding-top: 4px; vertical-align: top; background-color: rgb(247, 247, 247); font-size: small;"&gt;Description&lt;/th&gt;
&lt;th style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-left: 5px; padding-right: 4px; padding-top: 4px; vertical-align: top; background-color: rgb(247, 247, 247); font-size: small;"&gt;Uri&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;Application menu&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;Displays the command in the menu of the application&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;"menu:org.eclipse.ui.main.menu"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;Application toolbar&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;displays the command in the toolbar of the application&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;"toolbar:org.eclipse.ui.main.toolbar"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;View toolbar&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;displays the command in the toolbar of the view&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;"toolbar:viewId". For example to display a menu to view with the Id "View1" use "toolbar:View1".&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;Context menu / pop-up&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;Command is displayed in a content menu, e.g. right mouse click on an object&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;n.a.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br class="table-break" /&gt;&lt;/p&gt;
&lt;p&gt;You can define the relative position of a command in this location URI by using the pattern ?before=id or ?after=id. The id can be an existing separator name, menu ID, or item ID. The command will then be placed before or after the element with the corresponding id. For example if you want to add a command to an existing menu with the id "fileMenu" behind the menu entry with the id "oneEntry" use the locationURI of "menu:fileMenu?after=oneEntry".&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="1.3.&amp;amp;nbsp;Command Handler"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;1.3.&amp;nbsp;Command Handler&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;The behavior of a command is defined via handlers. The handler is the class which will be executed once the command is called and must implement the interface "org.eclipse.core.commands.IHandler". "org.eclipse.core.commands.AbstractHandler" provides a default implementation for the IHandler interface.&lt;/p&gt;
&lt;p&gt;IHandler defines the following important methods which can be implemented:&lt;/p&gt;
&lt;div class="itemizedlist"&gt;
&lt;ul class="itemizedlist"&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;isEnabled: Called during instantiation, defines if this handler is enabled&lt;/p&gt;
&lt;/li&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;isHandled: Defines if the handler can be called or not&lt;/p&gt;
&lt;/li&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;execute: Coding which performs the action&lt;/p&gt;
&lt;/li&gt;
&lt;li class="listitem"&gt;
&lt;p&gt;fireHandlerChanged: needs to be called if isEnabled is changed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the execute method you get access to frequently used values and services via the "HandlerUtil" class.&lt;/p&gt;
&lt;p&gt;Handler can be defined with conditions (activeWhen) under which define the conditions under which the handlers are valid for a command. You can define several handlers for a command but only handler can be valid for a command at a certain point otherwise the Eclipse runtime cannot decide which one should be used and the command will not be enabled.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" title="2.&amp;amp;nbsp;Pre-requisite" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;2.&amp;nbsp;Pre-requisite&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;This article assumes what you have basic understanding of development for the Eclipse platform. Please see&lt;a href="http://www.vogella.de/articles/EclipseRCP/article.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Eclipse RCP Tutorial&lt;/a&gt;or&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipsePlugIn/article.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Eclipse Plugin Tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="3.&amp;amp;nbsp; Commands and menus" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;3.&amp;nbsp; Commands and menus&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section" title="3.1.&amp;amp;nbsp;Defining commands"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;3.1.&amp;nbsp;Defining commands&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;We will create a command which will exit the application. Create a new&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseRCP/article.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;RCP project&lt;/a&gt;"de.vogella.rcp.commands.first" using the "Hello RCP" template. Click on the plugin.xml and select the Extensions tab. Press the "Add" button.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/command10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Search for the extension "org.eclipse.ui.commands". Select it and press finish.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/command20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Create a new command by right-clicking on your extension point and by selecting New -&amp;gt; command.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="tip" title="Tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
If you only see an "Generic" entry you most likely have not downloaded "Eclipse for RCP/Plug-in Developers". Please see&amp;nbsp;&lt;a href="http://www.vogella.de/articles/RichClientPlatform/article.html#eclipseinstallation" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Eclipse Installation&lt;/a&gt;&amp;nbsp;.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/command30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Set the ID to "de.vogella.rcp.commands.first.commands.Exit" and the name to "Exit". Enter the class "de.vogella.rcp.commands.first.commands.ExitHandler" as defaultHandler.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/command40.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Press the hyperlink "defaultHandler" to create the class which should extend "org.eclipse.core.commands.AbstractHandler".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.commands.first.commands;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.AbstractHandler;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionEvent;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionException;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.handlers.HandlerUtil;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; ExitHandler &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractHandler {

        &lt;em style=""&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Object execute(ExecutionEvent event) &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException {
                HandlerUtil.getActiveWorkbenchWindow(event).close();
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; null;
        }

}
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="3.2.&amp;amp;nbsp;Using commands in menus"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;3.2.&amp;nbsp;Using commands in menus&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;The command which we defined should be used in a menu. Add the extension point "org.eclipse.ui.menus" to your application similar to adding the extension "org.eclipse.ui.commands". Right click on the extension point and select new -&amp;gt; menuContribution.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/command62.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Create a new menu contribution with the location URI "menu:org.eclipse.ui.main.menu". Make sure this URL is correct otherwise your menu will not be shown.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/command80.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Right click your menucontribution and select New -&amp;gt; Menu. Add a menu with the label "File" and the id "fileMenu".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandmenu10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandmenu20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Select your menu, right-click on it, select New-&amp;gt; Command. Maintain your commandID. Set the label to "Exit" and the tooltip to "Exits the application".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandmenu30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Your work should result in a plugin.xml file which looks like the following.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&amp;lt;?xml version=&lt;span class="hl-string" style="color: blue;"&gt;"1.0"&lt;/span&gt; encoding=&lt;span class="hl-string" style="color: blue;"&gt;"UTF-8"&lt;/span&gt;?&amp;gt;
&amp;lt;?eclipse version=&lt;span class="hl-string" style="color: blue;"&gt;"3.4"&lt;/span&gt;?&amp;gt;
&amp;lt;plugin&amp;gt;

   &amp;lt;extension
         id=&lt;span class="hl-string" style="color: blue;"&gt;"application"&lt;/span&gt;
         point=&lt;span class="hl-string" style="color: blue;"&gt;"org.eclipse.core.runtime.applications"&lt;/span&gt;&amp;gt;
      &amp;lt;application&amp;gt;
         &amp;lt;run
               &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.first.Application"&lt;/span&gt;&amp;gt;
         &amp;lt;/run&amp;gt;
      &amp;lt;/application&amp;gt;
   &amp;lt;/extension&amp;gt;
   &amp;lt;extension
         point=&lt;span class="hl-string" style="color: blue;"&gt;"org.eclipse.ui.perspectives"&lt;/span&gt;&amp;gt;
      &amp;lt;perspective
            name=&lt;span class="hl-string" style="color: blue;"&gt;"RCP Perspective"&lt;/span&gt;
            &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.first.Perspective"&lt;/span&gt;
            id=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.first.perspective"&lt;/span&gt;&amp;gt;
      &amp;lt;/perspective&amp;gt;
   &amp;lt;/extension&amp;gt;
   &amp;lt;extension
         point=&lt;span class="hl-string" style="color: blue;"&gt;"org.eclipse.ui.commands"&lt;/span&gt;&amp;gt;
      &amp;lt;command
            defaultHandler=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.first.commands.ExitHandler"&lt;/span&gt;
            id=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.first.commands.Exit"&lt;/span&gt;
            name=&lt;span class="hl-string" style="color: blue;"&gt;"Exit"&lt;/span&gt;&amp;gt;
      &amp;lt;/command&amp;gt;
   &amp;lt;/extension&amp;gt;
   &amp;lt;extension
         point=&lt;span class="hl-string" style="color: blue;"&gt;"org.eclipse.ui.menus"&lt;/span&gt;&amp;gt;
      &amp;lt;menuContribution
            locationURI=&lt;span class="hl-string" style="color: blue;"&gt;"menu:org.eclipse.ui.main.menu"&lt;/span&gt;&amp;gt;
         &amp;lt;menu
               id=&lt;span class="hl-string" style="color: blue;"&gt;"fileMenu"&lt;/span&gt;
               label=&lt;span class="hl-string" style="color: blue;"&gt;"File"&lt;/span&gt;&amp;gt;
            &amp;lt;command
                  commandId=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.first.commands.Exit"&lt;/span&gt;
                  label=&lt;span class="hl-string" style="color: blue;"&gt;"Exit"&lt;/span&gt;
                  style=&lt;span class="hl-string" style="color: blue;"&gt;"push"&lt;/span&gt;
                  tooltip=&lt;span class="hl-string" style="color: blue;"&gt;"Exit the application"&lt;/span&gt;&amp;gt;
            &amp;lt;/command&amp;gt;
         &amp;lt;/menu&amp;gt;
      &amp;lt;/menuContribution&amp;gt;
   &amp;lt;/extension&amp;gt;

&amp;lt;/plugin&amp;gt;
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Run the example. You should see menu with the file and if you select the "Exit" entry you application should exit.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandmenu40.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;iframe name="aswift_0" id="aswift_0" frameborder="0" height="90" scrolling="no" width="728" style=""&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;div class="section" title="4.&amp;amp;nbsp;Commands and toolbars" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;4.&amp;nbsp;Commands and toolbars&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section" title="4.1.&amp;amp;nbsp;Overview"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;4.1.&amp;nbsp;Overview&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;You can add commands to the application toolbar and to a view toolbar.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="4.2.&amp;amp;nbsp; Application toolbar (coolbar)"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;4.2.&amp;nbsp; Application toolbar (coolbar)&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Create a new project "de.vogella.rcp.intro.commands.toolbar". Use the "RCP application with a view" as a template. Create a command "de.vogella.rcp.intro.commands.toolbar.Hello" with the default handler "de.vogella.rcp.intro.commands.toolbar.handler.Hello". This handler will open a&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseDialogs/article.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;JFace Dialog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                              
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.intro.commands.toolbar.handler;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.AbstractHandler;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionEvent;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionException;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.jface.dialogs.MessageDialog;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.handlers.HandlerUtil;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; Hello &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractHandler {

        &lt;em style=""&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Object execute(ExecutionEvent event) &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException {
                MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
                                event).getShell(), &lt;span class="hl-string" style="color: blue;"&gt;"Info"&lt;/span&gt;, &lt;span class="hl-string" style="color: blue;"&gt;"Info for you"&lt;/span&gt;);
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; null;
        }

}
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add a menucontribution to the "org.eclipse.ui.menus extension" point. Set the location URI to "toolbar:org.eclipse.ui.main.toolbar". Add a toolbar to your menu contribution.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandcoolbar10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add the command "de.vogella.rcp.intro.commands.toolbar.Hello" to the toolbar. Assign a label and an icon to it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandcoolbar20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Activate the application toolbar via ApplicationWorkbenchWindowAdvisor.java and set the configurer.setShowCoolBar(true); (&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                              
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.intro.commands.toolbar;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.swt.graphics.Point;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.application.ActionBarAdvisor;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.application.IActionBarConfigurer;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.application.IWorkbenchWindowConfigurer;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.application.WorkbenchWindowAdvisor;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; ApplicationWorkbenchWindowAdvisor &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; WorkbenchWindowAdvisor {

        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; ApplicationWorkbenchWindowAdvisor(
                        IWorkbenchWindowConfigurer configurer) {
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;super&lt;/span&gt;(configurer);
        }

        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; ActionBarAdvisor createActionBarAdvisor(
                        IActionBarConfigurer configurer) {
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ApplicationActionBarAdvisor(configurer);
        }

        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; preWindowOpen() {
                IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
                configurer.setInitialSize(&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; Point(&lt;span class="hl-number"&gt;400&lt;/span&gt;, &lt;span class="hl-number"&gt;300&lt;/span&gt;));
                configurer.setShowStatusLine(false);
                configurer.setShowCoolBar(true);
                configurer.setTitle(&lt;span class="hl-string" style="color: blue;"&gt;"RCP Application"&lt;/span&gt;);
        }
}
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The result should look like the following. If you select the element in the toolbar an information dialog should open.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandcoolbar30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="4.3.&amp;amp;nbsp;Contribution to the View Toolbar"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;4.3.&amp;nbsp;Contribution to the View Toolbar&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;You can also add a command directly to a view toolbar. For this we will extend the previous example. Change the class "Perspective" to the following (a standalone view does not have a own toolbar).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                              
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.intro.commands.toolbar;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.IPageLayout;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.IPerspectiveFactory;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; Perspective &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;implements&lt;/span&gt; IPerspectiveFactory {

        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; createInitialLayout(IPageLayout layout) {
                String editorArea = layout.getEditorArea();
                layout.setEditorAreaVisible(false);
                layout.setFixed(true);

                layout.addView(View.ID, IPageLayout.LEFT, &lt;span class="hl-number"&gt;1.0f&lt;/span&gt;, editorArea);
        }

}
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Create a new menu contribution to the extension point "org.eclipse.ui.menus" with the locationURI: "toolbar:de.vogella.rcp.intro.commands.toolbar.view". ""toolbar:"" tells the system to add it to the toolbar while the second argument is the id of your view.&lt;/p&gt;
&lt;p&gt;Create then a new command for this menucontribution and set the command id to "de.vogella.rcp.intro.commands.toolbar.Hello". Assign the label "Say Hello" to it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandview10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Run the application to see your new view contribution.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandview20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="4.4.&amp;amp;nbsp;Drop down list"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;4.4.&amp;nbsp;Drop down list&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;The following adds a dropdown list to the application coolbar.&lt;/p&gt;
&lt;p&gt;This creation is a bit strange. You create a helper drop-down command to which later the other (real) commands will be assigned to.&lt;/p&gt;
&lt;p&gt;Therefore create a command with the id "referenceToMenuId". Maintain also the default handler. For example you could re-use "de.vogella.rcp.intro.commands.toolbar.handler.Hello".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commanddropdown06.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Add a new menucontribution to the "org.eclipse.ui.menus" extension point. Set the location URI to "toolbar:org.eclipse.ui.main.toolbar". Add a toolbar to this extension and a new command to this new toolbar. As the id use "referenceToMenuId" give it a label and an icon and change the style to "pulldown".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commanddropdown10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Create a new menucontribution and set the locationURI to: "menu:referenceToMenuId"&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="tip" title="Tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
referenceToMenuId is the ID we used earlier in the command.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Add your exiting command "de.vogella.rcp.intro.commands.toolbar.Hello" two times to this menu. Use different labels.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commanddropdown20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Run your application, it should now have a drop-down list in the application toolbar.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commanddropdown30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="tip" title="Tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
Add the command "referenceToMenuId" to your exiting view toolbar contribution to get the drop-down menu also in your view.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" title="5.&amp;amp;nbsp;Commands and context menus" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;5.&amp;nbsp;Commands and context menus&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Now lets add a ContextMenu to a table. Create a new project "de.vogella.rcp.intro.commands.popup" based on the "RCP application with a view" example.&lt;/p&gt;
&lt;p&gt;Create a new command with the ID "de.vogella.rcp.intro.commands.popup.showSelected" and the name "Show".&lt;/p&gt;
&lt;p&gt;In this example we will not use the default handler. Therefore add the extension point "org.eclipse.ui.handlers" to your plugin.xml and add a handler. The first parameter is the commandId and the second the class for the handler. We will use class "de.vogella.rcp.intro.commands.popup.handler.ShowSelected".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommands/images/commandpopup05.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Implement now the coding for your handler. I just print the selected elements to the console.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.intro.commands.popup.handler;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; java.util.Iterator;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.AbstractHandler;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionEvent;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionException;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.jface.viewers.ISelection;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.jface.viewers.IStructuredSelection;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.handlers.HandlerUtil;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; ShowSelected &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractHandler {

        &lt;em style=""&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@SuppressWarnings("unchecked")&lt;/span&gt;&lt;/em&gt;
        &lt;em style=""&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Object execute(ExecutionEvent event) &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException {
                ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event)
                                .getActivePage().getSelection();
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;if&lt;/span&gt; (selection != null &amp;amp; selection &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;instanceof&lt;/span&gt; IStructuredSelection) {
                        IStructuredSelection strucSelection = (IStructuredSelection) selection;
                        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;for&lt;/span&gt; (Iterator&amp;lt;Object&amp;gt; iterator = strucSelection.iterator(); iterator
                                        .hasNext();) {
                                Object element = iterator.next();
                                System.out.println(element.toString());
                        }
                }
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; null;
        }

}
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add a new menuContribution with the locationURI "popup:de.vogella.rcp.intro.commands.popup.view", where "de.vogella.rcp.intro.commands.popup.view" is the ID of your view which has been automatically created for you.&lt;/p&gt;
&lt;p&gt;Right click your new menuContribution and select New -&amp;gt; Command. Assign your command to the field "commandId". Label it "One Item selected".&lt;/p&gt;
&lt;p&gt;Now you have add a MenuManager to your view. Select View.java and in the method createPartControl add the following:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                              
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; createPartControl(Composite parent) {
                viewer = &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; TableViewer(parent, SWT.MULTI | SWT.H_SCROLL
                                | SWT.V_SCROLL);
                viewer.setContentProvider(&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ViewContentProvider());
                viewer.setLabelProvider(&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ViewLabelProvider());
                viewer.setInput(getViewSite());
                &lt;em style="color: rgb(0, 136, 0);"&gt;// This is new code&lt;/em&gt;
                &lt;em style="color: rgb(0, 136, 0);"&gt;// First we create a menu Manager&lt;/em&gt;
                MenuManager menuManager = &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; MenuManager();
                Menu menu = menuManager.createContextMenu(viewer.getTable());
                &lt;em style="color: rgb(0, 136, 0);"&gt;// Set the MenuManager&lt;/em&gt;
                viewer.getTable().setMenu(menu);
                getSite().registerContextMenu(menuManager, viewer);
                &lt;em style="color: rgb(0, 136, 0);"&gt;// Make the selection available&lt;/em&gt;
                getSite().setSelectionProvider(viewer);
        }
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Run your application. On right mouse click the menu should be visible. If you select it menu then the names of the selected items should be written to the console.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="6.&amp;amp;nbsp; Advanced Commands" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;6.&amp;nbsp; Advanced Commands&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;For more advanced usages of Eclipse Commands please see&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Eclipse Commands Advanced&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="7.&amp;amp;nbsp;Thank you" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;7.&amp;nbsp;Thank you&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please help me to support this article:&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;&lt;a href="http://flattr.com/thing/49772/Tutorials-for-Eclipse-Java-Android-and-Webprogramming" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;img title="Flattr this" src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;&amp;nbsp;&lt;img src="https://www.paypal.com/en_US/i/scr/pixel.gif" height="1" alt="" width="1" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" title="8.&amp;amp;nbsp;Questions and Discussion" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="titlepage section section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;8.&amp;nbsp;Questions and Discussion&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Before posting questions, please see the&amp;nbsp;&lt;a href="http://www.vogella.de/faq.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;vogella FAQ&lt;/a&gt;&amp;nbsp;. If you have questions or find an error in this article please use the&amp;nbsp;&lt;a href="http://groups.google.com/group/vogella" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;www.vogella.de Google Group&lt;/a&gt;&amp;nbsp;. I have created a short list&amp;nbsp;&lt;a href="http://www.vogella.de/blog/2010/03/09/asking-community-questions/" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;how to create good questions&lt;/a&gt;which might also help you.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Wed, 16 Nov 2011 10:24:51 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/9457336</link>
      <guid>http://prodev.springnote.com/pages/9457336</guid>
    </item>
    <item>
      <title>[&#54156;] Eclpse Commands Advanced Tutorial</title>
      <description>&lt;p&gt;[&#52636;&#52376;:&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html"&gt;http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="titlepage" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;h2 class="title"&gt;Eclipse Commands Advanced - Tutorial&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section author" style="background-color: #F9F9D8;"&gt;
&lt;h3 class="author"&gt;&lt;span class="firstname"&gt;Lars&lt;/span&gt;&amp;nbsp;&lt;span class="surname"&gt;Vogel&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;p class="releaseinfo" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Version 2.1&lt;/p&gt;
&lt;p class="releaseinfo" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;p class="copyright" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Copyright &#169; 2007- 2011 Lars Vogel&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" style="background-color: #F9F9D8;"&gt;
&lt;p class="pubdate" style="font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;24.09.2011&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section revhistory" style="background-color: #F9F9D8;"&gt;
&lt;table width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; padding-left: 5px; padding-right: 4px; padding-top: 4px; vertical-align: top; background-color: rgb(247, 247, 247); font-size: 13px; font-family: Arial, Helvetica, Geneva, sans-serif;" colspan="3"&gt;&lt;strong&gt;Revision History&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Revision 0.1&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;30.03.2009&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Lars Vogel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;" colspan="3"&gt;Created&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Revision 0.2 - 2.1&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;11.04.2009 - 24.09.2011&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Lars Vogel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: 11px; font-family: Arial, Helvetica, Geneva, sans-serif;" colspan="3"&gt;bugfixes and improvements&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class="section abstract" style="background-color: #F9F9D8;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;
&lt;p class="title"&gt;&lt;strong&gt;Eclipse Advanced Commands&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This article describes use cases for Eclipse commands which go beyond the simple one for adding commands to menus, toolbars, etc.&lt;/p&gt;
&lt;p&gt;This article is based on Eclipse Indigo (3.7).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class="toc" style="line-height: 1.2; font-size: 14px; color: rgb(0, 0, 0); font-family: Georgia, serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#command" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;1. Eclipse Commands&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#commands_restrictions" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;2. Enabled when (visible when)&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#standardcommands" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;3. Eclipse standard commands&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#standardcommands_overview" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;3.1. Overview&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#standardcommands_example" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;3.2. Example&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#commmands_code" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;4. Calling commands directly via code&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#commmands_sourceprovider" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;5. Providing your own expression&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#parameters" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;6. Using parameters in commands&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#runtimecommands" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;7. Defining commands at runtime&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#thankyou" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;8. Thank you&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#questions" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;9. Questions and Discussion&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#resources" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;10. Links and Literature&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#sourcecode" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;10.1. Source Code&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#resources_eclipsecommands" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;10.2. Eclipse Commands Resources&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.vogella.de/articles/EclipseCommandsAdvanced/article.html#resources_general" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif; text-decoration: none; font-weight: normal;"&gt;10.3. vogella Resources&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;div title="1.&amp;amp;nbsp;Eclipse Commands" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;1.&amp;nbsp;Eclipse Commands&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;For an introduction into Eclipse Commands please see&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseCommands/article.html" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Eclipse Commands Tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div title="2.&amp;amp;nbsp; Enabled when (visible when)" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;2.&amp;nbsp; Enabled when (visible when)&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The command framework allows to restrict the availability and visibility of commands, handlers and ui contributions via the&amp;nbsp;&lt;a href="http://wiki.eclipse.org/Command_Core_Expressions" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;core expressions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this example we want the command only be enabled if one item from a list of items is selected.&lt;/p&gt;
&lt;p&gt;Create a new project "de.vogella.rcp.commands.enable" based on the "RCP application with a view" example.&lt;/p&gt;
&lt;p&gt;Add a command with the ID "de.vogella.rcp.commands.enable.command". Add this command to the menu and the toolbar and create the following default handler.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.commands.enable.handler;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.AbstractHandler;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionEvent;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionException;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.jface.dialogs.MessageDialog;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.handlers.HandlerUtil;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; Command &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractHandler {

        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Object execute(ExecutionEvent event) &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException {
                MessageDialog.openInformation(HandlerUtil.getActiveWorkbenchWindow(
                                event).getShell(), &lt;span class="hl-string" style="color: blue;"&gt;"Info"&lt;/span&gt;, &lt;span class="hl-string" style="color: blue;"&gt;"Info for you"&lt;/span&gt;);

                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; null;
        }

}

                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Select plugin.xml and add "org.eclipse.core.expressions" as a dependency. Select then the Extensions tab and add the extensions org.eclipse.core.expressions.definitions.&lt;/p&gt;
&lt;p&gt;Using right mouse click add a definition "oneElementSelected". Add a "with" variable "selection".&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div title="Tip" class="tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
"selection" is a predefined variable which will be calculated automatically by Eclipse. See &lt;a href="http://wiki.eclipse.org/Command_Core_Expressions" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;core expressions&lt;/a&gt;for additional variables you can use. For example for a popup menu "activeMenuSelection" provides the selection.&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;On the "activeMenuSelection" right mouse click and add a count with the value "1". The result should look like&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/enabled10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;On your handler, right mouse click and select enabledWhen. Right mouse click and add a "reference" to it with the value "oneElementSelected". The result should look like.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/enabled20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The expression were are using is based on "selection". Therefore the list must register itself as selection provider to inform the workbench in case something is selected. Therefore add "getSite().setSelectionProvider(viewer);" in createPartControl of View.java.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; createPartControl(Composite parent) {
                viewer = &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; TableViewer(parent, SWT.MULTI | SWT.H_SCROLL
                                | SWT.V_SCROLL);
                viewer.setContentProvider(&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ViewContentProvider());
                viewer.setLabelProvider(&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; ViewLabelProvider());
                viewer.setInput(getViewSite());
                &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// Makes the selection available to the workbench&lt;/em&gt;
                getSite().setSelectionProvider(viewer);
        }
        
                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you now run the application your command should only be enabled if one element in the list is selected.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div title="Tip" class="tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
You can also only display the menu if one item is selected. The approach is the same but you only define the restriction on the menu contribution directly (visible when on the command in the menu). For a command in the toolbar the definition would look like:
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/visible10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;iframe name="aswift_0" id="aswift_0" height="90" frameborder="0" style="" width="728" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;div title="3.&amp;amp;nbsp;Eclipse standard commands" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;3.&amp;nbsp;Eclipse standard commands&lt;/h2&gt;
&lt;/div&gt;
&lt;div title="3.1.&amp;amp;nbsp;Overview" class="section"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;3.1.&amp;nbsp;Overview&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Eclipse provides lots of standard commands which you can re-use. Just press on the "Browse button" while defining your commandId to see the available standard commands. For example the screenshot shows the usage of the standard about dialog command.&lt;/p&gt;
&lt;p&gt;The advantage of using standard commands is that you get the keybinding, icons, etc for free.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/standardcommand10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div title="Tip" class="tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
Standard commands sometimes map to actions which are contributed via ActionFactory in the class ApplicationActionBarAdvisor. If the ActionFactory returns an IAction you need to register this action. If not these commands are inactive in your menu. For example the following made the reset perspective and welcome command active.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                              
&lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// Method belongs to class ApplicationActionBarAdvisor&lt;/em&gt;
        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;protected&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; makeActions(IWorkbenchWindow window)
        {
                IWorkbenchAction quickStartAction = ActionFactory.INTRO.create(window);
                register(quickStartAction);
                IWorkbenchAction resetView = ActionFactory.RESET_PERSPECTIVE
                                .create(window);
                register(resetView);
        }
                        
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;div title="3.2.&amp;amp;nbsp;Example" class="section"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h3 class="title"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;3.2.&amp;nbsp;Example&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;You can also use standard command and define a new handler for this command, e.g. you can use the standard Eclipse delete command (org.eclipse.ui.edit.delete).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div title="Tip" class="tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
To find the id of existing commands you can you the&amp;nbsp;&lt;a href="http://www.vogella.de/articles/EclipseCodeAccess/article.html#pluginspy" class="ulink" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;Eclipse Plugin Spy.&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use the extension point "org.eclipse.ui.handlers" to define new handlers for the standard commands.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div title="Tip" class="tip" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-left: 0.5in; margin-right: 0.5in;"&gt;
&lt;h3 class="title" style="text-indent: -100em; background-image: ; background-color: initial; height: 36px; width: 36px; border-top-width: 0px; border-top-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"&gt;Tip&lt;/h3&gt;
Eclipse requires you to have only one active handler at the time therefore you have to use the "activeWhen" restriction on the handler to make it more special then the standard binding. To use for example delete in several views with different handlers use "activeWhen" with the variable "activePartId" and as the value your view id.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Create a new RCP application "de.vogella.rcp.commands.standardcommands" with the template "Hello RCP".&lt;/p&gt;
&lt;p&gt;Create a handler for the command "org.eclipse.ui.edit.delete" which display a message box. Add the command "org.eclipse.ui.edit.delete" to the menu.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/standardcommand20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/standardcommand30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The result should look like the following.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/standardcommand40.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div title="4.&amp;amp;nbsp;Calling commands directly via code" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;4.&amp;nbsp;Calling commands directly via code&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;You can call a command directly. For example if you have a command "add.command" defined you can call it via the following coding.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      

&lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// From a view you get the site which allow to get the service&lt;/em&gt;
IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;);
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;try&lt;/span&gt; {
        handlerService.executeCommand(&lt;span class="hl-string" style="color: blue;"&gt;"add.command"&lt;/span&gt;, null);
        } &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;catch&lt;/span&gt; (Exception ex) {
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throw&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; RuntimeException(&lt;span class="hl-string" style="color: blue;"&gt;"add.command not found"&lt;/span&gt;);
                &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// Give message&lt;/em&gt;
                }
}

                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This coding above is called within a view which provides access to the site and to services. You can also get the service via the WorkbenchWindow.&lt;/p&gt;
&lt;/div&gt;
&lt;div title="5.&amp;amp;nbsp;Providing your own expression" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;5.&amp;nbsp;Providing your own expression&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;You can write your own Java class which can be used define a variable which can then be used to define if a certain UI element shall be active or not. For example you can read the authorization of the user from your own class and then return the value which is assign to the user. This return value can then be used in a visible / enabled statement. This is similar to the usage of the core expressions we have seen earlier.&lt;/p&gt;
&lt;p&gt;Create a RCP application "de.vogella.rcp.commands.sourceprovider" with the template "Hello RCP".&lt;/p&gt;
&lt;p&gt;We will create a source provider. This source provider can provide variables which can be used in defining the visibility of commands. Add the extension point "org.eclipse.ui.services" to your plugin and create a new service provider.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/sourceprovider10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/sourceprovider20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This defines a service which provides the variable "de.vogella.rcp.commands.sourceprovider.active" to the workbench. This class must implement ISourceProvider. This value can then be used similar to a core expression. Maintain the following code.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.commands.sourceprovider;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; java.util.HashMap;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; java.util.Map;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.AbstractSourceProvider;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.ISources;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; CommandState &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractSourceProvider {
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;static&lt;/span&gt; String MY_STATE = &lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.sourceprovider.active"&lt;/span&gt;;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;static&lt;/span&gt; String ENABLED = &lt;span class="hl-string" style="color: blue;"&gt;"ENABLED"&lt;/span&gt;;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;static&lt;/span&gt; String DISENABLED = &lt;span class="hl-string" style="color: blue;"&gt;"DISENABLED"&lt;/span&gt;;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;private&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;boolean&lt;/span&gt; enabled = true;


        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; dispose() {
        }

        &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// We could return several values but for this example one value is sufficient&lt;/em&gt;
        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; String[] getProvidedSourceNames() {
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; String[] { MY_STATE };
        }
        
        &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// You cannot return NULL&lt;/em&gt;
        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@SuppressWarnings("unchecked")&lt;/span&gt;&lt;/em&gt;
        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Map getCurrentState() {
                Map map = &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; HashMap(&lt;span class="hl-number"&gt;1&lt;/span&gt;);
                String value = enabled ? ENABLED : DISENABLED;
                map.put(MY_STATE, value);
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; map;
        }

        

        &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// This method can be used from other commands to change the state&lt;/em&gt;
        &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// Most likely you would use a setter to define directly the state and not use this toogle method&lt;/em&gt;
        &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// But hey, this works well for my example&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; toogleEnabled() {
                enabled = !enabled ;
                String value = enabled ? ENABLED : DISENABLED;
                fireSourceChanged(ISources.WORKBENCH, MY_STATE, value);
        }

}

                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Create two commands "de.vogella.rcp.commands.sourceprovider.command1" and "de.vogella.rcp.commands.sourceprovider.command2". Create any handler you want for the first command. Command2 will be used to change the state in our ISourceProvider. Maintain the following code for the handler.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.commands.sourceprovider.handler;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.AbstractHandler;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionEvent;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionException;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.handlers.HandlerUtil;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.services.ISourceProviderService;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; de.vogella.rcp.commands.sourceprovider.CommandState;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; Command2 &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractHandler {

        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Object execute(ExecutionEvent event) &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException {
                &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// Get the source provider service&lt;/em&gt;
                ISourceProviderService sourceProviderService = (ISourceProviderService) HandlerUtil
                                .getActiveWorkbenchWindow(event).getService(
                                                ISourceProviderService.&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt;);
                &lt;em class="hl-comment" style="color: rgb(0, 136, 0);"&gt;// Now get my service&lt;/em&gt;
                CommandState commandStateService = (CommandState) sourceProviderService
                                .getSourceProvider(CommandState.MY_STATE);
                commandStateService.toogleEnabled();
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; null;
        }

}

                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add both commands to the menu.&lt;/p&gt;
&lt;p&gt;Now use the state provided by your ISourceProvider in your declaration of your menu.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/sourceprovider30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This looks in plugin.xml like the following.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&amp;lt;extension
         point=&lt;span class="hl-string" style="color: blue;"&gt;"org.eclipse.ui.menus"&lt;/span&gt;&amp;gt;
      &amp;lt;menuContribution
            locationURI=&lt;span class="hl-string" style="color: blue;"&gt;"menu:org.eclipse.ui.main.menu"&lt;/span&gt;&amp;gt;
         &amp;lt;command
               commandId=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.sourceprovider.command1"&lt;/span&gt;
               label=&lt;span class="hl-string" style="color: blue;"&gt;"Command1"&lt;/span&gt;
               style=&lt;span class="hl-string" style="color: blue;"&gt;"push"&lt;/span&gt;&amp;gt;
            &amp;lt;visibleWhen
                  checkEnabled=&lt;span class="hl-string" style="color: blue;"&gt;"false"&lt;/span&gt;&amp;gt;
               &amp;lt;with
                     variable=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.sourceprovider.active"&lt;/span&gt;&amp;gt;
                  &amp;lt;equals
                        value=&lt;span class="hl-string" style="color: blue;"&gt;"ENABLED"&lt;/span&gt;&amp;gt;
                  &amp;lt;/equals&amp;gt;
               &amp;lt;/with&amp;gt;
            &amp;lt;/visibleWhen&amp;gt;
         &amp;lt;/command&amp;gt;
         &amp;lt;command
               commandId=&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.sourceprovider.command2"&lt;/span&gt;
               label=&lt;span class="hl-string" style="color: blue;"&gt;"Command2"&lt;/span&gt;
               style=&lt;span class="hl-string" style="color: blue;"&gt;"push"&lt;/span&gt;&amp;gt;
         &amp;lt;/command&amp;gt;
      &amp;lt;/menuContribution&amp;gt;
&amp;lt;/extension&amp;gt;
                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you now start your application can select the second command the first command will not be available anymore. If you press it again the first command will be displayed again.&lt;/p&gt;
&lt;/div&gt;
&lt;div title="6.&amp;amp;nbsp;Using parameters in commands" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;6.&amp;nbsp;Using parameters in commands&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;You can also define parameters in commands. Create project "de.vogella.rcp.commands.parameterfirst" using the "Hello RCP" template.&lt;/p&gt;
&lt;p&gt;Create a command with the id "de.vogella.rcp.commands.parameterfirst.helloName" and a default handler "de.vogella.rcp.commands.parameterfirst.handler.HelloName".&lt;/p&gt;
&lt;p&gt;Right click on your command, select New -&amp;gt; commandParameter&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/parameter10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Use the following id for the parameter "de.vogella.rcp.commands.parameterfirst.commandParameter1"&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/parameter20.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the handler you have to evaluate the parameter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.commands.parameterfirst.handler;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.AbstractHandler;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionEvent;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.core.commands.ExecutionException;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.jface.dialogs.MessageDialog;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.handlers.HandlerUtil;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; HelloName &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; AbstractHandler {

        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; Object execute(ExecutionEvent event) &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;throws&lt;/span&gt; ExecutionException {
                String name = event
                                .getParameter(&lt;span class="hl-string" style="color: blue;"&gt;"de.vogella.rcp.commands.parameterfirst.commandParameter1"&lt;/span&gt;);
                MessageDialog.openInformation(HandlerUtil.getActiveShell(event),
                                &lt;span class="hl-string" style="color: blue;"&gt;"Hello"&lt;/span&gt;, &lt;span class="hl-string" style="color: blue;"&gt;"Hello "&lt;/span&gt; + name);
                &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;return&lt;/span&gt; null;
        }
}

                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add this command to the menu. On the command, right click and select New -&amp;gt; Parameter&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/parameter30.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;As name maintain the name of the parameter, pass as value the value you want to use in your handler.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/parameter40.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add the same command again to the menu and pass another parameter.&lt;/p&gt;
&lt;p&gt;If you run your application and select the menu entry the value should be used in the message box.&lt;/p&gt;
&lt;/div&gt;
&lt;div title="7.&amp;amp;nbsp;Defining commands at runtime" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;7.&amp;nbsp;Defining commands at runtime&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;You can create commands at runtime. Create project "de.vogella.rcp.commands.runtimecommands" using the "Hello RCP" template.&lt;/p&gt;
&lt;p&gt;Define a menu contribution. Maintain the class "de.vogella.rcp.commands.runtimecommands.DefineCommands" in this menu contribution.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="mediaobject"&gt;&lt;img src="http://www.vogella.de/articles/EclipseCommandsAdvanced/images/runtime10.gif" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Create the following class.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="programlisting" style="font-family: 'Droid Sans Mono', Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', Terminal, monospace; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(187, 187, 187); border-right-color: rgb(187, 187, 187); border-bottom-color: rgb(187, 187, 187); border-left-color: rgb(187, 187, 187); line-height: 16px; margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0.8em; font-size: 13px;"&gt;
                      
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;package&lt;/span&gt; de.vogella.rcp.commands.runtimecommands;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.swt.SWT;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.menus.CommandContributionItem;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.menus.CommandContributionItemParameter;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.menus.ExtensionContributionFactory;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.menus.IContributionRoot;
&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;import&lt;/span&gt; org.eclipse.ui.services.IServiceLocator;

&lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;class&lt;/span&gt; DefineCommands &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;extends&lt;/span&gt; ExtensionContributionFactory {

        &lt;em&gt;&lt;span class="hl-annotation" style="color: gray;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
        &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;void&lt;/span&gt; createContributionItems(IServiceLocator serviceLocator,
                        IContributionRoot additions) {
                CommandContributionItemParameter p = &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; CommandContributionItemParameter(
                                serviceLocator, &lt;span class="hl-string" style="color: blue;"&gt;""&lt;/span&gt;,
                                &lt;span class="hl-string" style="color: blue;"&gt;"org.eclipse.ui.file.exit"&lt;/span&gt;,
                                SWT.PUSH);
                p.label = &lt;span class="hl-string" style="color: blue;"&gt;"Exit the application"&lt;/span&gt;;
                p.icon = Activator.getImageDescriptor(&lt;span class="hl-string" style="color: blue;"&gt;"icons/alt_window_16.gif"&lt;/span&gt;);

                CommandContributionItem item = &lt;span class="hl-keyword" style="color: rgb(127, 0, 85); font-weight: bold;"&gt;new&lt;/span&gt; CommandContributionItem(p);
                item.setVisible(true);
                additions.addContributionItem(item, null);
        }

}

                
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Run the example, your application should have the Exit command in the menu.&lt;/p&gt;
&lt;/div&gt;
&lt;div title="8.&amp;amp;nbsp;Thank you" class="section" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; text-align: -webkit-auto; text-indent: 0px; white-space: normal; background-color: rgb(255, 255, 255);"&gt;
&lt;div style="background-color: #F9F9D8" class="titlepage section section"&gt;
&lt;h2 class="title" style="clear: both;"&gt;&lt;a style="color: rgb(0, 0, 204); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;/a&gt;8.&amp;nbsp;Thank you&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please help me to support this article:&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;&lt;a href="http://flattr.com/thing/49772/Tutorials-for-Eclipse-Java-Android-and-Webprogramming" style="color: rgb(85, 26, 139); font-family: Arial, Helvetica, Geneva, sans-serif;"&gt;&lt;img title="Flattr this" src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; vertical-align: top; font-size: small;"&gt;&amp;nbsp;&lt;img src="https://www.paypal.com/en_US/i/scr/pixel.gif" height="1" alt="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none;" width="1" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Wed, 16 Nov 2011 00:51:54 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/9458964</link>
      <guid>http://prodev.springnote.com/pages/9458964</guid>
    </item>
    <item>
      <title>SWT / JFace</title>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Tue, 26 Jul 2011 13:41:44 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/8085474</link>
      <guid>http://prodev.springnote.com/pages/8085474</guid>
    </item>
    <item>
      <title>CommonNavigator &#50752; ContentProvider&#50640;&#49436; &#49436;&#47196; &#52280;&#51312; &#50619;&#45716; &#48169;&#48277;</title>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CommonNavigator&#50640;&#49436; ContentProvider&#51032; &#52280;&#51312; &#50619;&#45716; &#48277;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;IContentProvider.inputChanged&#47484; &#54876;&#50857;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {&lt;/li&gt;
&lt;li style="margin-left: 2em;"&gt;CommonViewer commonViewer = (CommonViewer) viewer;&lt;/li&gt;
&lt;li style="margin-left: 2em;"&gt;CommonNavigator commonNavigator = commonViewer.getCommonNavigator();&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;ContentProvider&#50640;&#49436; CommonNavigator&#51032; &#52280;&#51312; &#50619;&#45716; &#48277;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Fri, 20 May 2011 14:40:01 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/7775676</link>
      <guid>http://prodev.springnote.com/pages/7775676</guid>
    </item>
    <item>
      <title>eclipse</title>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Fri, 20 May 2011 14:33:29 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/7775674</link>
      <guid>http://prodev.springnote.com/pages/7775674</guid>
    </item>
    <item>
      <title>Toad</title>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Mon, 21 Mar 2011 10:56:16 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/7450865</link>
      <guid>http://prodev.springnote.com/pages/7450865</guid>
    </item>
    <item>
      <title>Linux find &#47749;&#47161;&#50612; &#50756;&#51204; &#51221;&#48373; &#44032;&#51060;&#46300;</title>
      <description>&lt;div class="autosourcing-stub"&gt;
&lt;p style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN: 11px 0px 7px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: Dotum;"&gt;&lt;strong style="PADDING-RIGHT: 7px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;"&gt;[&#52636;&#52376;]&lt;/strong&gt; &lt;a href="http://blog.naver.com/lr1/130087044317" title="http://blog.naver.com/lr1/130087044317" class="external newWindow"&gt;&lt;span style="COLOR: #0000ff;"&gt;Linux find &#47749;&#47161;&#50612; &#50756;&#51204; &#51221;&#48373; &#44032;&#51060;&#46300;&lt;/span&gt;&lt;/a&gt;&lt;span style="PADDING-RIGHT: 7px; PADDING-LEFT: 5px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;"&gt;|&lt;/span&gt;&lt;strong style="PADDING-RIGHT: 7px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;"&gt;&#51089;&#49457;&#51088;&lt;/strong&gt; &lt;a href="http://blog.naver.com/lr1" title="http://blog.naver.com/lr1" class="external newWindow"&gt;&lt;span style="COLOR: #0000ff;"&gt;&#45433;&#52264;&#50864;&#50976;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&#51200;&#51088; - Sheryl Calish&lt;/em&gt;&lt;/p&gt;
&lt;p class="boldbodycopy"&gt;&#44032;&#51109; &#44053;&#47141;&#54616;&#47732;&#49436;&#46020; &#54620;&#54200;&#51004;&#47196;&#45716; &#54844;&#46976;&#49828;&#47084;&#50868; &#50976;&#48708;&#53244;&#53552;&#49828; &#47749;&#47161;&#50612;&#51064; find &#47749;&#47161;&#50612;&#50640; &#45824;&#54620; &#44060;&#50836;.&lt;/p&gt;
&lt;p class="legalese"&gt;&#44172;&#49884;&#51068; : 2008&#45380; 7&#50900;&lt;/p&gt;
&lt;p&gt;Linux find &#47749;&#47161;&#50612;&#45716; &#47784;&#46304; Linux &#47749;&#47161;&#50612; &#44032;&#50868;&#45936; &#44032;&#51109; &#50976;&#50857;&#54616;&#47732;&#49436;&#46020; &#54844;&#46976;&#49828;&#47084;&#50868; &#47749;&#47161;&#50612; &#44032;&#50868;&#45936; &#54616;&#45208;&#51077;&#45768;&#45796;. &#45796;&#47480; Linux &#47749;&#47161;&#50612;&#51032; &#54364;&#51456; &#44396;&#47928;&#44284; &#45796;&#47480; &#44396;&#47928;&#51012; &#44032;&#51648;&#44256; &#51080;&#45796;&#45716; &#51216;&#50640;&#49436; &#50612;&#47157;&#49845;&#45768;&#45796;. &#54616;&#51648;&#47564;, &#54028;&#51068;&#47749;, &#54028;&#51068; &#50976;&#54805;, &#49324;&#50857;&#51088;, &#45908; &#45208;&#50500;&#44032; &#53440;&#51076; &#49828;&#53484;&#54532; &#48324;&#47196; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688; &#51080;&#45796;&#45716; &#51216;&#50640;&#49436; &#44053;&#47141;&#54620; &#47749;&#47161;&#50612;&#51060;&#44592;&#46020; &#54633;&#45768;&#45796;. find &#47749;&#47161;&#50612;&#47484; &#49324;&#50857;&#54616;&#47732; &#51060;&#47084;&#54620; &#49549;&#49457;&#51012; &#51088;&#50976;&#47213;&#44172; &#51312;&#54633;&#54644; &#54028;&#51068;&#51032; &#50948;&#52824;&#47484; &#52286;&#51012; &#49688; &#51080;&#51012; &#49104;&#47564; &#50500;&#45768;&#46972;, &#52286;&#51008; &#54028;&#51068;&#50640; &#45824;&#54644; &#50672;&#49328;&#51012; &#49688;&#54665;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#48376; &#44544;&#51032; &#47785;&#51201;&#51008; find &#47749;&#47161;&#50612;&#50752; &#44536; &#51104;&#51116;&#51201; &#51060;&#51216;&#51012; &#44060;&#47029;&#51201;&#51004;&#47196; &#49444;&#47749;&#54632;&#51004;&#47196;&#50024; find &#47749;&#47161;&#50612;&#47484; &#49552;&#49789;&#44172; &#54617;&#49845; &#48143; &#49324;&#50857;&#54624; &#49688; &#51080;&#46020;&#47197; &#46037;&#45716; &#44163;&#51077;&#45768;&#45796;. &#46041;&#49884;&#50640;, find &#47749;&#47161;&#50612;&#51032; &#53945;&#49457; &#51473; &#44032;&#51109; &#44053;&#47141;&#54616;&#47732;&#49436;&#46020; &#54620;&#54200;&#51004;&#47196;&#45716; &#54844;&#46976;&#49828;&#47084;&#50868; &#52769;&#47732;&#50640; &#45824;&#54620; &#44060;&#50836; &#48143; &#52280;&#51312;&#47484; &#51228;&#44277;&#54624; &#44163;&#51077;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;[&#51452;: &#50668;&#44592;&#50640;&#49436; &#49324;&#50857;&#46108; find &#47749;&#47161;&#50612;&#45716; GNU &#48260;&#51204;&#51060;&#44592; &#46412;&#47928;&#50640; &#51068;&#48512; &#49464;&#48512; &#45236;&#50857;&#51008; &#45796;&#47480; &#48260;&#51204;&#51032; find &#47749;&#47161;&#50612;&#50752; &#45796;&#47484; &#49688; &#51080;&#49845;&#45768;&#45796;.]&lt;/p&gt;
&lt;h2&gt;&#44592;&#48376; &#54805;&#49885;&lt;/h2&gt;
&lt;p&gt;&#47676;&#51200;, find &#47749;&#47161;&#50612;&#51032; &#44592;&#48376; &#44396;&#51312;&#48512;&#53552; &#49332;&#54196;&#48372;&#44192;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find start_directory test options criteria_to_match action_to_perform_on_results
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50500;&#47000; &#47749;&#47161;&#50612;&#50640;&#49436; find&#45716; &#51060;&#47492;&#50640; &#8220;java&#8221; &#54869;&#51109;&#51088;&#47484; &#44032;&#51648;&#44256; &#51080;&#45716; &#47784;&#46304; &#54028;&#51068;&#51012; &#45824;&#49345;&#51004;&#47196; &#8220;.&#8221;&#44032; &#54364;&#49884;&#46108; &#54788;&#51116; &#46356;&#47113;&#53664;&#47532;&#47484; &#52286;&#44592; &#49884;&#51089;&#54624; &#44163;&#51077;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -name "*.java"
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50500;&#47000;&#50640;&#45716; &#44160;&#49353; &#44208;&#44284;&#50640; &#45824;&#54620; &#44036;&#45800;&#54620; &#47785;&#47197;&#51060; &#45208;&#50676;&#46104;&#50612; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -name "*.java" &lt;br /&gt;
./REGEXPvalidate/src/oracle/otnsamples/plsql/ConnectionManager.java &lt;br /&gt;
./REGEXPvalidate/src/oracle/otnsamples/plsql/DBManager.java ..
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[&#51452;: &#48376; &#44544;&#50640;&#49436; &#51096;&#46972; &#48537;&#51060;&#44592;&#47484; &#54644; find &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#45716; &#44221;&#50864;&#50640;&#45716; &#51088;&#52404; &#53412;&#48372;&#46300;&#47484; &#49324;&#50857;&#54644; &#53360;&#46384;&#50740;&#54364;(&#8220;&#8221;)&#47484; &#48148;&#45012;&#50556; &#50732;&#48148;&#47480; &#44208;&#44284;&#47484; &#50619;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;.]&lt;/p&gt;
&lt;p&gt;&#50500;&#47000; &#47749;&#47161;&#50612; &#50669;&#49884; &#46041;&#51068;&#54620; &#50672;&#49328;&#51012; &#49688;&#54665;&#54624; &#44163;&#51077;&#45768;&#45796;. &#50612;&#46500; &#44221;&#50864;&#46304;, find &#47749;&#47161;&#50612;&#50640; &#51204;&#45804;&#46104;&#46020;&#47197; escape &#47928;&#51012; &#53685;&#54644; &#50752;&#51068;&#46300;&#52852;&#46300; &#47928;&#51088;&#47484; &#51068;&#48152; &#47928;&#51088;&#47196; &#52376;&#47532;&#54644;&#50556; &#54616;&#47728; &#49752;&#50640; &#51032;&#54644; &#54644;&#49437;&#46104;&#51648; &#50506;&#50500;&#50556; &#54633;&#45768;&#45796;. &#46384;&#46972;&#49436;, &#44160;&#49353; &#47928;&#51088;&#50676;&#50640; &#53360;&#53440;&#50740;&#54364;&#47484; &#48537;&#51060;&#44144;&#45208; &#44536; &#50526;&#50640; &#50669;&#49836;&#47000;&#49884;(\)&#47484; &#48537;&#51060;&#49901;&#49884;&#50724;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -name \*.java
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;find&#50640; &#45824;&#54620; &#51064;&#49688;&#45716; &#50741;&#49496;&#51060;&#44592;&#45716; &#54616;&#51648;&#47564;, &#44160;&#49353; &#49884;&#51089; &#50948;&#52824;&#47484; &#51648;&#51221;&#54616;&#51648; &#50506;&#51008; &#44221;&#50864;&#50640;&#45716; &#54788;&#51116; &#46356;&#47113;&#53664;&#47532;&#50640;&#49436; &#44592;&#48376;&#51201;&#51004;&#47196; &#44160;&#49353;&#51060; &#49884;&#51089;&#46121;&#45768;&#45796;. &#50741;&#49496; &#49324;&#54637;&#51060;&#44592;&#45716; &#54616;&#51648;&#47564; &#53580;&#49828;&#53944; &#51312;&#44148;&#51012; &#51648;&#51221;&#54616;&#51648; &#50506;&#51008; &#44221;&#50864;&#50640;&#45716; &#48520;&#50756;&#51204;&#54616;&#44144;&#45208; &#49440;&#48324;&#46104;&#51648; &#50506;&#51008; &#44208;&#44284;&#44050;&#51060; &#52636;&#47141;&#46121;&#45768;&#45796;.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&#50500;&#47000; 3&#44060;&#51032; find &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#47732; &#46609;&#44057;&#51060; &#54788;&#51116; &#46356;&#47113;&#53664;&#47532;&#50752; &#49704;&#44200;&#51652; &#54028;&#51068;&#51012; &#54252;&#54632;&#54616;&#45716; &#47784;&#46304; &#49436;&#48652;&#46356;&#47113;&#53664;&#47532;&#51032; &#47784;&#46304; &#54028;&#51068; &#47785;&#47197;&#51060; &#44160;&#49353;&#46121;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find &lt;br /&gt;
find . &lt;br /&gt;
find . -print
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#51060;&#45716; &#8211;la &#50741;&#49496;&#51012; &#44032;&#51652; ls &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#45716; &#44163;&#44284; &#48708;&#49847;&#54633;&#45768;&#45796;. &#48177;&#50629;&#51012; &#50948;&#54644; &#50948; &#47749;&#47161;&#50612;&#51032; &#52636;&#47141;&#47932;&#50640; &#51204;&#52404; &#44221;&#47196; &#51060;&#47492;&#51060; &#54252;&#54632;&#46104;&#44592;&#47484; &#50896;&#54616;&#45716; &#44221;&#50864;&#46972;&#47732; &#49884;&#51089; &#46356;&#47113;&#53664;&#47532;&#50640; &#45824;&#54620; &#51204;&#52404; &#44221;&#47196;&#47484; &#51648;&#51221;&#54644;&#50556; &#54633;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find /home/bluher -name \*.java &lt;br /&gt;
/home/bluher/plsql/REGEXPvalidate/src/oracle/otnsamples/plsql/ConnectionManager.java &lt;br /&gt;
/home/bluher/plsql/REGEXPvalidate/src/oracle/otnsamples/plsql/DBManager.java/ ...
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#54620;, &#44160;&#49353; &#47928;&#51088;&#50676;&#50640; 1&#44060; &#51060;&#49345;&#51032; &#49884;&#51089; &#46356;&#47113;&#53664;&#47532;&#47484; &#51648;&#51221;&#54624; &#49688;&#46020; &#51080;&#49845;&#45768;&#45796;. &#51201;&#51221; &#44428;&#54620;&#51012; &#44032;&#51652; &#49324;&#50857;&#51088;&#47196;&#49436; &#49892;&#54665;&#46104;&#45716; &#44221;&#50864;, &#50500;&#47000; &#47749;&#47161;&#50612;&#45716; &#47784;&#46304; jar &#54028;&#51068;&#51012; &#52286;&#44592; &#50948;&#54644; /usr, /home &#48143; /tmp &#46356;&#47113;&#53664;&#47532; &#49692;&#49436;&#47196; &#45236;&#47140;&#44040; &#44163;&#51077;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find /usr /home /tmp -name "*.jar"
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#51201;&#51221; &#44428;&#54620;&#51060; &#50630;&#45716; &#49324;&#50857;&#51088;&#46972;&#47732; &#47566;&#51008; &#49884;&#49828;&#53596; &#46356;&#47113;&#53664;&#47532;&#47484; &#44160;&#49353;&#54616;&#44592; &#49884;&#51089;&#54624; &#46412; &#45796;&#51020;&#44284; &#44057;&#51008; &#50724;&#47448; &#47700;&#49884;&#51648;&#44032; &#45208;&#50732; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find: /tmp/orbit-root: Permission denied
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#45796;&#51020;&#44284; &#44057;&#51060; &#44160;&#49353; &#47928;&#51088;&#50676;&#51012; &#52628;&#44032;&#54632;&#51004;&#47196;&#50024; &#48520;&#47749;&#54869;&#54620; &#44208;&#44284;&#44032; &#45208;&#50724;&#45716; &#44163;&#51012; &#54588;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find /usr /home /tmp -name "*.jar" 2&amp;gt;/dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#51060;&#47111;&#44172; &#54616;&#47732; &#47784;&#46304; &#50724;&#47448; &#47700;&#49884;&#51648;&#44032; &#45328;(null) &#54028;&#51068;&#47196; &#51204;&#49569;&#46104;&#44592; &#46412;&#47928;&#50640; &#48372;&#45796; &#51221;&#51228;&#46108; &#52636;&#47141;&#47932;&#51060; &#51228;&#44277;&#46121;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#44592;&#48376;&#51201;&#51004;&#47196; find &#47749;&#47161;&#50612;&#45716; &#45824;/&#49548;&#47928;&#51088;&#47484; &#44396;&#48324;&#54633;&#45768;&#45796;. &#45824;/&#49548;&#47928;&#51088;&#44032; &#44396;&#48324;&#46104;&#45716; find&#50640;&#49436;&#45716; -name &#53580;&#49828;&#53944;&#47484; &#45824;&#49888;&#54644; -iname &#53580;&#49828;&#53944;&#47484; &#49324;&#50857;&#54616;&#49901;&#49884;&#50724;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find downloads -iname "*.gif" &lt;br /&gt;
downloads/.xvpics/Calendar05_enlarged.gif &lt;br /&gt;
downloads/lcmgcfexsmall.GIF
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#54620;, &#54028;&#51068;&#47749; &#50808;&#50640;&#46020; &#50976;&#54805;&#50640; &#46384;&#46972; &#54028;&#51068;&#51012; &#44160;&#49353;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. &#50696;&#47484; &#46308;&#50612;, &#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#53685;&#54644; &#46356;&#47113;&#53664;&#47532;&#51032; &#47784;&#46304; &#49436;&#48652;&#46356;&#47113;&#53664;&#47532;&#47484; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -type d
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49324;&#50857;&#54616;&#47732; /usr &#46356;&#47113;&#53664;&#47532;&#51032; &#47784;&#46304; &#49900;&#48380;&#47533; &#47553;&#53356;(symbolic link)&#47484; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find /usr -type l
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50948; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#47732; 3,000&#44060; &#51060;&#49345;&#51032; &#47553;&#53356; &#47785;&#47197;&#51060; &#45208;&#53440;&#45216; &#44163;&#51077;&#45768;&#45796;. &#49800;&#54140;&#50976;&#51200;(root) &#44428;&#54620;&#51012; &#53685;&#54644; &#50500;&#47000; &#47749;&#47161;&#50612; &#44032;&#50868;&#45936; &#54616;&#45208;&#47484; &#49892;&#54665;&#54616;&#47732; /usr &#46356;&#47113;&#53664;&#47532;&#51032; &#47553;&#53356; &#47785;&#47197;&#44284; &#51060;&#44163;&#51060; &#44032;&#47532;&#53412;&#45716; &#54028;&#51068;&#51060; &#45208;&#53440;&#45225;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
# find /usr/bin -type l -name "z*" -exec ls -l {} \; &lt;br /&gt;
lrwxrwxrwx 1 root root 8 Dec 12 23:17 /usr/bin/zsh -&amp;gt; /bin/zsh &lt;br /&gt;
lrwxrwxrwx 1 root root 5 Dec 12 23:17 /usr/bin/zless -&amp;gt; zmore &lt;br /&gt;
lrwxrwxrwx 1 root root 9 Dec 12 23:17 /usr/bin/zcat -&amp;gt; /bin/zcat
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;
find /usr/bin -type l -name "z*" -ls
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#54616;&#51648;&#47564;, &#48372;&#45796; &#51687;&#51008; &#46160; &#48264;&#51704; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#47732; &#46356;&#47113;&#53664;&#47532;&#50752; inode &#51221;&#48372;&#47484; &#44032;&#51652; &#44596; &#54028;&#51068; &#47785;&#47197;&#51060; &#45208;&#50732; &#44163;&#51077;&#45768;&#45796;. -exec &#48143; &#8211;ls &#49892;&#54665;&#50640; &#45824;&#54644;&#49436;&#45716; &#54980;&#48152;&#48512;&#50640;&#49436; &#45796;&#47344; &#44163;&#51077;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;find&#44032; &#52286;&#51012; &#49688; &#51080;&#45716; &#45796;&#47480; &#54028;&#51068; &#50976;&#54805;&#51004;&#47196;&#45716; &#45796;&#51020;&#44284; &#44057;&#51008; &#44163;&#46308;&#51060; &#51080;&#49845;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;&#8226; b - block (buffered) special&lt;br /&gt;
&#8226; c - character (unbuffered) special&lt;br /&gt;
&#8226; p - named pipe (FIFO)&lt;br /&gt;
&#8226; s - socket&lt;/p&gt;
&lt;p&gt;find &#47749;&#47161;&#50612;&#51032; &#49884;&#51089;&#51216;&#51004;&#47196; &#47336;&#53944;&#47484; &#49324;&#50857;&#54616;&#47732; &#49884;&#49828;&#53596; &#49549;&#46020;&#44032; &#53356;&#44172; &#45712;&#47140;&#51656; &#49688; &#51080;&#49845;&#45768;&#45796;. &#48152;&#46300;&#49884; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54644;&#50556; &#54616;&#45716; &#44221;&#50864;&#50640;&#45716; &#49324;&#50857;&#47049;&#51060; &#51201;&#51008; &#49884;&#44036;&#45824;&#45208; &#50556;&#44036;&#50640; &#49892;&#54665;&#54616;&#45716; &#44163;&#51060; &#51339;&#49845;&#45768;&#45796;. &#50500;&#47000; &#44396;&#47928;&#51012; &#49324;&#50857;&#54644; &#52636;&#47141;&#47932;&#51012; &#54028;&#51068;&#47196; &#48372;&#45244; &#49688; &#51080;&#49845;&#45768;&#45796;.:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -print &lt;strong&gt;&amp;gt; masterfilelist.out&lt;/strong&gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50896;&#52824; &#50506;&#45716; &#52636;&#47141;&#47932;&#51012; &#45824;&#47049; &#49373;&#49328;&#54616;&#45716; find &#47749;&#47161;&#50612;&#47484; &#49892;&#49688;&#47196; &#51077;&#47141;&#54620; &#44221;&#50864;&#50640;&#45716; CTRL-C&#47484; &#45572;&#47476;&#44592;&#47564; &#54616;&#47732; &#44032;&#51109; &#52572;&#44540;&#50640; &#49892;&#54665;&#46108; &#47749;&#47161;&#50612;&#44032; &#51473;&#45800;&#46121;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#50668;&#47084; &#54028;&#51068; &#49884;&#49828;&#53596;&#51012; &#44054;&#52632; &#50644;&#53552;&#54532;&#46972;&#51060;&#51592; &#45348;&#53944;&#50892;&#53356;&#50640;&#49436;&#45716; &#53945;&#55176; find &#47749;&#47161;&#50612;&#44032; &#44160;&#49353;&#54620; &#54028;&#51068;&#51012; &#51228;&#54620;&#54616;&#45716; &#44163;&#51060; &#51339;&#49845;&#45768;&#45796;. &#54596;&#50836;&#54620; &#49688; &#47564;&#53372; &#50741;&#49496; &#48143; &#53580;&#49828;&#53944;&#47484; &#49324;&#50857;&#54632;&#51004;&#47196;&#50024; &#49884;&#49828;&#53596; &#49345;&#51032; &#47196;&#46300;&#47484; &#51460;&#51068; &#49688; &#51080;&#49845;&#45768;&#45796;. &#51060;&#47484; &#50948;&#54644; &#44032;&#51109; &#50976;&#50857;&#54616;&#44172; &#49324;&#50857;&#54624; &#49688; &#51080;&#45716; &#50741;&#49496;&#51008; &#8211;xdev&#50752; -mount&#51077;&#45768;&#45796;. &#51060;&#46308; &#50741;&#49496;&#51008; find &#47749;&#47161;&#50612;&#44032; MS-DOS, CD-ROM &#46608;&#45716; AFS&#50752; &#44057;&#51008; &#45796;&#47480; &#54028;&#51068; &#49884;&#49828;&#53596; &#49345;&#51032; &#46356;&#47113;&#53664;&#47532;&#47196; &#45236;&#47140;&#44032;&#51648; &#50506;&#46020;&#47197; &#54632;&#51004;&#47196;&#50024; &#44160;&#49353; &#48276;&#50948;&#47484; &#51329;&#54784;&#51469;&#45768;&#45796;. &#46384;&#46972;&#49436;, &#49884;&#51089; &#46356;&#47113;&#53664;&#47532;&#50752; &#46041;&#51068;&#54620; &#50976;&#54805;&#51032; &#54028;&#51068; &#49884;&#49828;&#53596;&#51004;&#47196; &#44160;&#49353;&#51012; &#51228;&#54620;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#46272;&#50620; &#48512;&#54021; &#49884;&#49828;&#53596; &#49324;&#50857;&#51088;&#45716; mount &#47749;&#47161;&#50612;&#44032; &#49892;&#54665;&#46104;&#45716; &#44221;&#50864;&#50640; &#51060;&#47084;&#54620; &#50741;&#49496;&#51012; &#49324;&#50857;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. Windows &#54028;&#54000;&#49496;&#51060; &#44288;&#47144;&#46104;&#50612; &#51080;&#45796;&#44256; &#44032;&#51221;&#54616;&#47732;, &#50500;&#47000;&#50752; &#44057;&#51008; &#47749;&#47161;&#50612;&#47484; &#53685;&#54644; &#47560;&#50868;&#54021; &#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
mount -t vfat /dev/sda1 /mnt/msdos
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50668;&#47084;&#48516;&#51060; &#49324;&#50857;&#54616;&#45716; &#49892;&#51228; &#47749;&#47161;&#50612;&#45716; &#49884;&#49828;&#53596; &#49444;&#51221; &#48169;&#48277;&#50640; &#46384;&#46972; &#45804;&#46972;&#51665;&#45768;&#45796;. df&#47484; &#49892;&#54665;&#54616;&#44144;&#45208; &#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49688;&#54665;&#54632;&#51004;&#47196;&#50024; &#54028;&#54000;&#49496; &#47560;&#50868;&#54021; &#50668;&#48512;&#47484; &#54869;&#51064;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find /mnt/msdos -name "*.txt" 2&amp;gt; /dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;MS Windows &#54028;&#54000;&#49496;&#50640;&#49436;&#45716; &#54028;&#51068; &#47785;&#47197;&#51060; &#44600; &#49688; &#48150;&#50640; &#50630;&#49845;&#45768;&#45796;. &#51060;&#51228;&#48512;&#53552;&#45716; -mount &#46608;&#45716; -xdev &#50741;&#49496;&#51012; &#53685;&#54644; &#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#49901;&#49884;&#50724;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -name "*.txt" -mount 2&amp;gt; /dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#45716;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -name "*.txt" -xdev 2&amp;gt; /dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50500;&#47000; &#50696;&#50640;&#49436;&#50752; &#44057;&#51060; -fstype &#53580;&#49828;&#53944;&#47484; &#49324;&#50857;&#54644; find &#47749;&#47161;&#50612;&#50640; &#52286;&#44256;&#51088; &#54616;&#45716; &#54028;&#51068; &#49884;&#49828;&#53596;&#51012; &#47749;&#54869;&#54616;&#44172; &#50508;&#47140;&#51460; &#49688;&#46020; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -name "*.txt" -fstype vfat 2&amp;gt; /dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&#49884;&#44036; &#52286;&#44592;&lt;/h2&gt;
&lt;p&gt;find &#47749;&#47161;&#50612;&#45716; &#49884;&#49828;&#53596;&#51032; &#53440;&#51076; &#49828;&#53484;&#54532;&#47484; &#53664;&#45824;&#47196; &#54028;&#51068; &#44160;&#49353;&#50640; &#49324;&#50857;&#54624; &#49688; &#51080;&#45716; &#50668;&#47084; &#44060;&#51032; &#50741;&#49496;&#51012; &#44032;&#51648;&#44256; &#51080;&#49845;&#45768;&#45796;. &#51060;&#47084;&#54620; &#53440;&#51076; &#49828;&#53484;&#54532;&#47196;&#45716; &#45796;&#51020;&#51060; &#54252;&#54632;&#46121;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&#8226;&lt;/em&gt; mtime&lt;em&gt;&#8212;&lt;/em&gt;&#54028;&#51068; &#45236;&#50857;&#51060; &#47560;&#51648;&#47561;&#51004;&#47196; &#49688;&#51221;&#46108; &#49884;&#44036;&lt;br /&gt;
&lt;em&gt;&#8226;&lt;/em&gt; atime&#8212;&#54028;&#51068;&#51012; &#51069;&#44592; &#46608;&#45716; &#50529;&#49464;&#49828;&#54620; &#49884;&#44036;&lt;br /&gt;
&lt;em&gt;&#8226;&lt;/em&gt; ctime&#8212;&#54028;&#51068; &#49345;&#53468;&#44032; &#48320;&#44221;&#46108; &#49884;&#44036;&lt;/p&gt;
&lt;p&gt;mtime &#48143; atime&#51032; &#51032;&#48120;&#45716; &#44536; &#51088;&#52404;&#47196; &#49789;&#44172; &#50508; &#49688; &#51080;&#51648;&#47564;, ctime&#45716; &#51328; &#45908; &#49444;&#47749;&#51060; &#54596;&#50836;&#54633;&#45768;&#45796;. inode&#45716; &#44033; &#54028;&#51068;&#50640; &#47700;&#53440; &#45936;&#51060;&#53552;&#47484; &#44032;&#51648;&#44256; &#51080;&#44592; &#46412;&#47928;&#50640; &#54028;&#51068;&#50640; &#50672;&#44208;&#46108; &#47700;&#53440; &#45936;&#51060;&#53552;&#44032; &#48320;&#44221;&#46104;&#47732; inode &#45936;&#51060;&#53552;&#46020; &#48320;&#44221;&#46121;&#45768;&#45796;. &#54028;&#51068;&#50640; &#45824;&#54620; &#49900;&#48380;&#47533; &#47553;&#53356; &#49373;&#49457;, &#54028;&#51068;&#50640; &#45824;&#54620; &#44428;&#54620; &#48320;&#44221;, &#54028;&#51068; &#51060;&#46041; &#46321;&#44284; &#44057;&#51008; &#45796;&#50577;&#54620; &#51089;&#50629;&#51004;&#47196; &#51064;&#54644; &#51060;&#47084;&#54620; &#47700;&#53440; &#45936;&#51060;&#53552; &#48320;&#44221;&#51060; &#50556;&#44592;&#46112; &#49688; &#51080;&#49845;&#45768;&#45796;. &#51060;&#47084;&#54620; &#44221;&#50864;, &#54028;&#51068; &#45236;&#50857;&#50640; &#45824;&#54620; &#51069;&#44592;&#45208; &#49688;&#51221;&#51008; &#49688;&#54665;&#46104;&#51648; &#50506;&#44592; &#46412;&#47928;&#50640; themtime &#48143; atime&#51008; &#48320;&#54616;&#51648; &#50506;&#51648;&#47564; ctime&#51008; &#48320;&#54633;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#51060;&#47084;&#54620; &#49884;&#44036; &#50741;&#49496;&#51008; &#44033;&#44592; -n, n &#46608;&#45716; +n&#47196; &#51648;&#51221;&#46108; n &#44050;&#51012; &#54632;&#44760; &#49324;&#50857;&#54644;&#50556; &#54633;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&#8226; -n&#51008; n &#51060;&#54616;&#47484; &#48152;&#54872;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&#8226; +n&#51008; n &#51060;&#49345;&#51012; &#48152;&#54872;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&#8226; n&#51008; &#51221;&#54869;&#55176; n&#50640; &#54644;&#45817;&#46104;&#45716; &#44050;&#51012; &#48152;&#54872;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&#48372;&#45796; &#47749;&#54869;&#54620; &#49444;&#47749;&#51012; &#50948;&#54644; &#47751; &#44032;&#51648; &#50696;&#47484; &#49332;&#54196; &#48372;&#44192;&#49845;&#45768;&#45796;. &#50500;&#47000; &#47749;&#47161;&#50612;&#45716; &#52572;&#44540; 1&#49884;&#44036; &#46041;&#50504; &#49688;&#51221;&#46108; &#47784;&#46304; &#54028;&#51068;&#51012; &#52286;&#50500;&#51469;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -mtime -1 &lt;br /&gt;
./plsql/FORALLSample &lt;br /&gt;
./plsql/RegExpDNASample &lt;br /&gt;
/plsql/RegExpSample
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;-1 &#45824;&#49888; 1&#51012; &#44032;&#51652; &#46041;&#51068; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#47732; &#51221;&#54869;&#54616;&#44172; 1&#49884;&#44036; &#51204;&#50640; &#49688;&#51221;&#46108; &#47784;&#46304; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -mtime 1
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50948; &#47749;&#47161;&#50612;&#45716; &#51221;&#54869;&#54616;&#44172; &#51068;&#52824;&#54616;&#45716; &#44050;&#51012; &#50836;&#52397;&#54616;&#44592; &#46412;&#47928;&#50640; &#47784;&#46304; &#44208;&#44284;&#44050;&#51060; &#45208;&#50724;&#51648;&#45716; &#50506;&#49845;&#45768;&#45796;. &#50500;&#47000; &#47749;&#47161;&#50612;&#45716; 1&#49884;&#44036; &#51060;&#51204;&#50640; &#49688;&#51221;&#46108; &#54028;&#51068;&#51012; &#52286;&#50500;&#51469;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -mtime +1
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#44592;&#48376;&#51201;&#51004;&#47196; -mtime, -atime &#48143; &#8211;ctime&#45716; &#52572;&#44540; 24 &#49884;&#44036;&#50640; &#45824;&#54620; &#53440;&#51076; &#49828;&#53484;&#54532;&#51077;&#45768;&#45796;. &#54616;&#51648;&#47564;, &#46244;&#50640; daystart &#50741;&#49496;&#51012; &#48537;&#51060;&#47732; &#50724;&#45720;&#51012; &#49884;&#51089;&#51004;&#47196; 24&#49884;&#44036; &#51452;&#44592;&#44032; &#49884;&#51089;&#46121;&#45768;&#45796;. &#46608;&#54620;, mmin, amin &#48143; cmin&#51012; &#49324;&#50857;&#54616;&#47732; &#48516; &#45800;&#50948;&#47196; &#48320;&#44221;&#46108; &#53440;&#51076; &#49828;&#53484;&#54532;&#47484; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#50668;&#47084;&#48516;&#51032; &#44228;&#51221;&#51004;&#47196; &#47196;&#44536;&#51064;&#54620; &#54980; &#51593;&#49884; &#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#47732; &#52572;&#44540; 1&#48516; &#45236;&#50640; &#51069;&#51008; &#47784;&#46304; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -amin -1 &lt;br /&gt;
./.bashrc &lt;br /&gt;
/.bash_history &lt;br /&gt;
./.xauthj5FCx1
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;find &#47749;&#47161;&#50612;&#47564;&#51004;&#47196; &#54028;&#51068;&#51032; &#50948;&#52824;&#47484; &#52286;&#51004;&#47732; &#47700;&#53440; &#45936;&#51060;&#53552;&#51032; &#51068;&#48512;&#51064; &#54028;&#51068;&#51032; &#50529;&#49464;&#49828; &#49884;&#44036;&#51060; &#48320;&#44221;&#46108;&#45796;&#45716; &#49324;&#49892;&#50640; &#50976;&#51032;&#54616;&#49901;&#49884;&#50724;.&lt;/p&gt;
&lt;p&gt;-newer, -anewer &#48143; &#8211;cnewer &#50741;&#49496;&#51012; &#49324;&#50857;&#54616;&#47732; &#53945;&#51221; &#54028;&#51068;&#44284; &#48708;&#44368;&#54644; &#49688;&#51221; &#46608;&#45716; &#50529;&#49464;&#49828;&#46108; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688;&#46020; &#51080;&#49845;&#45768;&#45796;. &#51060;&#45716; -mtime, -atime &#48143; &#8211;ctime&#44284; &#48708;&#49847;&#54633;&#45768;&#45796;.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&#8226; -newer : &#48372;&#45796; &#52572;&#44540;&#50640; &#45236;&#50857;&#51060; &#49688;&#51221;&#46108; &#54028;&#51068;&lt;br /&gt;
&#8226; -anewer : &#48372;&#45796; &#52572;&#44540;&#50640; &#51069;&#44592;&#44032; &#49688;&#54665;&#46108; &#54028;&#51068;&lt;br /&gt;
&#8226; -cnewer : &#48372;&#45796; &#52572;&#44540;&#50640; &#49345;&#53468;&#44032; &#48320;&#44221;&#46108; &#54028;&#51068;&lt;/p&gt;
&lt;p&gt;&#47560;&#51648;&#47561; tar &#54028;&#51068; &#51060;&#54980;&#47196; &#50612;&#46500; &#48169;&#48277;&#51004;&#47196;&#46304;&#51648; &#49688;&#51221;&#46108; &#54856; &#46356;&#47113;&#53664;&#47532;&#51032; &#54028;&#51068;&#51012; &#47784;&#46160; &#52286;&#51004;&#47140;&#47732; &#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49324;&#50857;&#54616;&#49901;&#49884;&#50724;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -newer backup.tar.gz
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&#53356;&#44592;&#50640; &#46384;&#47480; &#54028;&#51068; &#52286;&#44592;&lt;/h2&gt;
&lt;p&gt;-size &#50741;&#49496;&#51008; &#51648;&#51221;&#46108; &#53356;&#44592; &#44592;&#51456;&#50640; &#48512;&#54633;&#54616;&#45716; &#54028;&#51068;&#51012; &#52286;&#50500;&#51469;&#45768;&#45796;. &#53356;&#44592;&#44032; 5MB &#51060;&#49345;&#51064; &#47784;&#46304; &#54028;&#51068;&#51012; &#52286;&#51004;&#47140;&#47732; &#50500;&#47000;&#50752; &#44057;&#51060; &#54616;&#49901;&#49884;&#50724;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -size +5000000c 2&amp;gt; /dev/null /var/log/lastlog /var/log/cups/access_log.4 /var/spool/mail/bluher
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#47560;&#51648;&#47561;&#50640; &#8220;c&#8221;&#47484; &#48537;&#51060;&#47732; &#44208;&#44284;&#44032; &#48148;&#51060;&#53944; &#45800;&#50948;&#47196; &#48372;&#44256;&#46121;&#45768;&#45796;. &#44592;&#48376;&#51201;&#51004;&#47196; find &#47749;&#47161;&#50612;&#45716; 512 &#48148;&#51060;&#53944; &#48660;&#47197;&#51032; &#49688;&#47196; &#53356;&#44592;&#47484; &#48372;&#44256;&#54633;&#45768;&#45796;. &#46608;&#54620;, &#8220;c&#8221;&#47484; &#8220;k&#8221;&#47196; &#44368;&#52404;&#54616;&#45716; &#44221;&#50864;&#50640;&#45716; &#53420;&#47196;&#48148;&#51060;&#53944; &#49688;&#47196;, &#8220;w&#8221;&#47484; &#49324;&#50857;&#54616;&#45716; &#44221;&#50864;&#50640;&#45716; 2&#48148;&#51060;&#53944; &#50892;&#46300;&#51032; &#49688;&#47196; &#44208;&#44284;&#47484; &#54364;&#49884;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;-size &#50741;&#49496;&#51008; &#47784;&#46304; &#51228;&#47196; &#48148;&#51060;&#53944; &#54028;&#51068;&#51012; &#52286;&#44144;&#45208; &#51060;&#46308; &#54028;&#51068;&#51012; /tmp/zerobyte &#54260;&#45908;&#47196; &#51060;&#46041;&#54616;&#44592; &#50948;&#54644; &#51088;&#51452; &#49324;&#50857;&#46121;&#45768;&#45796;. &#50500;&#47000; &#47749;&#47161;&#50612;&#44032; &#48148;&#47196; &#51060;&#47084;&#54620; &#50672;&#49328;&#51012; &#49688;&#54665;&#54633;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find test -type f -size 0 -exec mv {} /tmp/zerobyte \;
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;-exec &#50741;&#49496;&#51008; find &#47749;&#47161;&#50612;&#44032; &#47564;&#45208;&#44172; &#46104;&#45716; &#54028;&#51068;&#51032; &#47784;&#46304; &#49752; &#47749;&#47161;&#50612;&#47484; &#49688;&#54665;&#54624; &#49688; &#51080;&#46020;&#47197; &#54644;&#51469;&#45768;&#45796;. &#54980;&#48152;&#48512;&#50640;&#49436; &#51060; &#50741;&#49496;&#51032; &#48372;&#45796; &#45796;&#50577;&#54620; &#49324;&#50857; &#50696;&#47484; &#54869;&#51064;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. &#51473;&#44292;&#54840;&#47484; &#49324;&#50857;&#54616;&#47732; &#48712; &#54028;&#51068; &#44033;&#44033;&#51012; &#51060;&#46041;&#49884;&#53420; &#49688; &#51080;&#49845;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;&#46608;&#54620;, -empty &#50741;&#49496;&#51012; &#49324;&#50857;&#54616;&#47732; &#48712; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find test -empty test/foo test/test
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&#44428;&#54620; &#48143; &#49548;&#50976;&#44428;&#50640; &#46384;&#47480; &#54028;&#51068; &#52286;&#44592;&lt;/h2&gt;
&lt;p&gt;find &#47749;&#47161;&#50612;&#45716; &#49884;&#49828;&#53596; &#48372;&#50504; &#47784;&#45768;&#53552;&#47553;&#51012; &#50948;&#54644; &#50630;&#50612;&#49436;&#45716; &#50504;&#46112; &#47749;&#47161;&#50612;&#51077;&#45768;&#45796;. &#50500;&#47000;&#50752; &#44057;&#51060; &#44592;&#54840;&#48277;&#51060;&#45208; 8&#51652;&#48277;&#51012; &#53685;&#54644; &#49324;&#50857; &#44428;&#54620;&#51060; &#45328;&#47532; &#50676;&#47140;&#51080;&#45716; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -type f -perm a=rwx -exec ls -l {} \;
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#45716;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -type f -perm 777 -exec ls -l {} \; &lt;br /&gt;
-rwxrwxrwx 1 bluher users 0 May 24 14:14 ./test.txt
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50948;&#51032; &#47749;&#47161;&#50612;&#45208; &#50500;&#47000; &#47749;&#47161;&#50612;&#51032; &#44221;&#50864; -exec ls &#8211;l&#51012; &#49688;&#54665;&#54616;&#44256; &#51080;&#44592; &#46412;&#47928;&#50640;, &#48152;&#54872;&#46108; &#54028;&#51068;&#51032; &#49892;&#51228; &#49324;&#50857; &#44428;&#54620;&#51012; &#54869;&#51064;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. &#51060; &#47749;&#47161;&#50612;&#45716; &#8220;&#44592;&#53440; &#49324;&#50857;&#51088;&#8221; &#48143; &#44536;&#47353;&#51060; &#47784;&#46160; &#50416;&#44592;&#47484; &#49688;&#54665;&#54624; &#49688; &#51080;&#45716; &#54028;&#51068;&#51012; &#52286;&#50500;&#51469;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find plsql -type f -perm -ug=rw -exec ls -l {} \; 2&amp;gt;/dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#45716;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find plsql -type f -perm -220 -exec ls -l {} \; 2&amp;gt;/dev/null &lt;br /&gt;
-rw-rw-rw- 1 bluher users 4303 Jun 7 2004 plsql/FORALLSample/doc/otn_new.css &lt;br /&gt;
-rw-rw-rw- 1 bluher users 10286 Jan 12 2005 plsql/FORALLSample/doc/readme.html &lt;br /&gt;
-rw-rw-rw- 1 bluher users 22647 Jan 12 2005 plsql/FORALLSample/src/config.sql ..
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50500;&#47000; &#47749;&#47161;&#50612;&#46308;&#51012; &#49892;&#54665;&#54616;&#47732; &#49324;&#50857;&#51088;, &#44536;&#47353; &#46608;&#45716; &#46168; &#47784;&#46160;&#44032; &#50416;&#44592; &#51089;&#50629;&#51012; &#54624; &#49688; &#51080;&#45716; &#54028;&#51068;&#51012; &#52286;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find plsql -type f -perm /ug=rw -exec ls -l {} \; 2&amp;gt;/dev/null, or, find plsql -type f -perm /220 -exec ls -l {} \; 2&amp;gt;/dev/null &lt;br /&gt;
-rw-r--r-- 1 bluher users 21473 May 3 16:02 plsql/regexpvalidate.zip &lt;br /&gt;
-rw-rw-rw- 1 bluher users 4303 Jun 7 2004 plsql/FORALLSample/doc/otn_new.css &lt;br /&gt;
-rw-rw-rw- 1 bluher users 10286 Jan 12 2005 plsql/FORALLSample/doc/readme.html &lt;br /&gt;
-rw-rw-rw- 1 bluher users 22647 Jan 12 2005 plsql/FORALLSample/src/config.sql
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50937;&#51060;&#45208; &#44592;&#51316; &#47588;&#45684;&#50620;&#50640;&#45716; &#50500;&#47000; &#47749;&#47161;&#50612;&#47196; &#45208;&#50752; &#51080;&#51012; &#44163;&#51077;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find . -perm +220 -exec ls -l {} \; 2&amp;gt; /dev/null
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;+ &#44592;&#54840;&#45716; / &#44592;&#54840;&#50752; &#46041;&#51068;&#54620; &#50669;&#54624;&#51012; &#54616;&#51648;&#47564;, &#49352;&#47196;&#50868; &#48260;&#51204;&#51032; GNU findutils&#50640;&#49436;&#45716; &#44428;&#51109;&#46104;&#51648; &#50506;&#44256; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#49884;&#49828;&#53596;&#50640;&#49436; &#50416;&#44592; &#44032;&#45733;&#54620; &#47784;&#46304; &#54028;&#51068;&#51012; &#52286;&#51004;&#47140;&#47732; &#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49324;&#50857;&#54616;&#49901;&#49884;&#50724;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -wholename '/proc' -prune -o -type f -perm -0002 -exec ls -l {} \; &lt;br /&gt;
-rw-rw-rw- 1 bluher users 4303 Jun 7 2004/home/bluher/plsql/FORALLSample/doc/otn_new.css &lt;br /&gt;
-rw-rw-rw- 1 bluher users 10286 Jan 12 2005 /home/bluher/plsql/FORALLSample/doc/readme.html ...
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;4&#48264;&#51704; &#49324;&#50857; &#44428;&#54620;&#50640; &#45824;&#54644; &#50526;&#51004;&#47196; &#51312;&#44552; &#45908; &#45796;&#47336;&#44192;&#51648;&#47564;, &#47560;&#51648;&#47561; &#54596;&#46300;&#51032; &#8220;2&#8221;&#45716; &#50416;&#44592; &#48708;&#53944;&#47196;&#46020; &#50508;&#47140;&#51256; &#51080;&#45716; &#54028;&#51068; &#49324;&#50857; &#44428;&#54620;&#51032; &#8220;&#44592;&#53440; &#49324;&#50857;&#51088;&#8221;&#50640; &#54644;&#45817;&#46121;&#45768;&#45796;. &#50864;&#47532;&#45716; &#49444;&#51221;&#46108; &#45796;&#47480; &#49324;&#50857; &#44428;&#54620;&#51060; &#47924;&#50631;&#51060;&#46304; &#44288;&#44228; &#50630;&#51060; &#44592;&#53440; &#49324;&#50857;&#51088;&#47484; &#50948;&#54644; &#49444;&#51221;&#46108; &#50416;&#44592; &#44428;&#54620;&#51012; &#44032;&#51652; &#54028;&#51068;&#51012; &#48372;&#44256; &#49910;&#45796;&#45716; &#54364;&#49884;&#47196; 0002&#46972;&#45716; &#49324;&#50857; &#44428;&#54620; &#47784;&#46300; &#50526;&#50640; &#45824;&#49884;&#47484; &#49324;&#50857;&#54664;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#50948;&#51032; &#47749;&#47161;&#50612;&#50640;&#49436;&#45716; 3&#44032;&#51648; &#49352;&#47196;&#50868; &#44060;&#45392;&#51060; &#46020;&#51077;&#46104;&#50632;&#49845;&#45768;&#45796;. &#54056;&#53556;&#51060; &#48156;&#44204;&#46108; &#44221;&#50864;, &#8211; prune&#51008; &#54028;&#51068; &#54056;&#53556; &#8220;/proc&#8221;&#50640;&#49436; -wholename &#53580;&#49828;&#53944;&#47484; &#49324;&#50857;&#54632;&#51004;&#47196;&#50024; find &#47749;&#47161;&#50612;&#44032; &#51060; &#46356;&#47113;&#53664;&#47532;&#47196; &#45236;&#47140;&#50724;&#51648; &#50506;&#46020;&#47197; &#47561;&#50500;&#51469;&#45768;&#45796;. &#48520;&#47536; &#50672;&#49328;&#51088; &#8220;-o&#8221;&#47484; &#53685;&#54644; find &#47749;&#47161;&#50612;&#45716; &#45796;&#47480; &#46356;&#47113;&#53664;&#47532;&#50640;&#49436; &#47749;&#47161;&#50612;&#51032; &#45208;&#47672;&#51648; &#48512;&#48516;&#51012; &#52376;&#47532;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. &#44033; &#54364;&#54788;&#49885; &#44036;&#50640; &#44032;&#51221;&#46108; &#50516;&#49884;&#51201; and &#50672;&#49328;&#51088;(-a)&#44032; &#51080;&#44592; &#46412;&#47928;&#50640; &#51340;&#52769; &#54364;&#54788;&#49885;&#51060; &#44144;&#51667;(false)&#51004;&#47196; &#54217;&#44032;&#46108; &#44221;&#50864; and &#46244;&#50640; &#45208;&#50724;&#45716; &#54364;&#54788;&#49885;&#51008; &#54217;&#44032;&#46104;&#51648; &#50506;&#49845;&#45768;&#45796;. &#46384;&#46972;&#49436;, -o &#50672;&#49328;&#51088;&#44032; &#54596;&#50836;&#54633;&#45768;&#45796;. &#44053;&#51228; &#50864;&#49440; &#49692;&#50948; &#51201;&#50857;&#51012; &#50948;&#54644; &#44292;&#54840;&#47484; &#49324;&#50857;&#54616;&#45716; &#44163;&#52376;&#47100; find &#47749;&#47161;&#50612;&#45716; &#48520;&#47536; &#50672;&#49328;&#51088; -not, !,&#46020; &#51648;&#50896;&#54633;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#49884;&#49828;&#53596; &#44288;&#47532;&#51088;&#45716; &#51088;&#51452; find &#47749;&#47161;&#50612;&#47484; &#53685;&#54644; &#54644;&#45817; &#49324;&#50857;&#51088;&#45208; &#44536;&#47353;&#51032; &#51060;&#47492; &#46608;&#45716; ID&#47484; &#49324;&#50857;&#54644; &#53945;&#51221; &#49324;&#50857;&#51088;&#45208; &#44536;&#47353;&#51032; &#51221;&#44508; &#54028;&#51068;&#51012; &#44160;&#49353;&#54616;&#44256; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
[root] $ find / -type f -user bluher -exec ls -ls {} \;
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50668;&#44592;, &#51060;&#47084;&#54620; &#47749;&#47161;&#50612;&#51032; &#52636;&#47141;&#50640; &#45824;&#54620; &#44036;&#45800;&#54620; &#50696;&#51228;&#44032; &#45208;&#50752; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
4 -rw-r--r-- 1 bluher users 48 May 1 03:09 /home/bluher/public_html/.directory &lt;br /&gt;
4 -rw-r--r-- 1 bluher users 925 May 1 03:09 /home/bluher/.profile
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#54620;, find &#47749;&#47161;&#50612;&#47484; &#49324;&#50857;&#54644; &#44536;&#47353; &#48324;&#47196; &#54028;&#51068;&#51012; &#44160;&#49353;&#54624; &#49688;&#46020; &#51080;&#49845;&#45768;&#45796;:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
[root] $ find / -type f -group users
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;
find / -type d -gid 100
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#51060; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54616;&#47732; &#44536;&#47353; ID 100&#51060; &#49548;&#50976;&#54616;&#44256; &#51080;&#45716; &#46356;&#47113;&#53664;&#47532; &#47785;&#47197;&#51060; &#45208;&#50741;&#45768;&#45796;. &#54644;&#45817;&#46104;&#45716; uid &#46608;&#45716; gid&#47484; &#52286;&#44592; &#50948;&#54644; /etc/passwd &#46608;&#45716; /etc/group &#54028;&#51068;&#50640;&#49436; more &#46608;&#45716; cat &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;&#51060; &#47749;&#47161;&#50612;&#45716; &#50508;&#47140;&#51652; &#53945;&#51221; &#49324;&#50857;&#51088; &#48143; &#44536;&#47353;&#50640; &#44288;&#54620; &#54028;&#51068;&#51012; &#52286;&#45716; &#44163; &#50808;&#50640;&#46020; &#49324;&#50857;&#51088;&#45208; &#44536;&#47353;&#51060; &#51648;&#51221;&#46104;&#51648; &#50506;&#51008; &#54028;&#51068;&#51012; &#52286;&#45716; &#45936;&#46020; &#50976;&#50857;&#54633;&#45768;&#45796;. &#50500;&#47000; &#47749;&#47161;&#50612;&#45716; /etc/passwd &#46608;&#45716; /etc/group &#54028;&#51068;&#50640;&#49436; &#47532;&#49828;&#53944;&#47484; &#44032;&#51648;&#44256; &#51080;&#51648; &#50506;&#51008; &#54028;&#51068;&#51012; &#49885;&#48324;&#54633;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -nouser -o -nogroup
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50948; &#47749;&#47161;&#50612;&#45716; &#49892;&#51228;&#47196; &#49884;&#49828;&#53596; &#49345;&#50640; &#44208;&#44284;&#47484; &#51228;&#44277;&#54616;&#45716; &#44163;&#51008; &#50500;&#45768;&#51648;&#47564;, &#54028;&#51068;&#51012; &#51060;&#46041;&#54620; &#54980;&#50640; &#49324;&#50857;&#51088;&#45208; &#44536;&#47353;&#51060; &#51648;&#51221;&#46104;&#51648; &#50506;&#51008; &#54028;&#51068;&#51012; &#49885;&#48324;&#54616;&#45716; &#45936; &#49324;&#50857;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;&#51060;&#51228;, &#48376; &#49465;&#49496; &#52488;&#48152;&#48512;&#50640; &#50616;&#44553;&#54620; &#48324;&#46020;&#51032; &#45458;&#51008; &#49324;&#50857; &#44428;&#54620; &#47928;&#51228;&#47484; &#54644;&#44208;&#54624; &#49688; &#51080;&#44172; &#46104;&#50632;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;SGID &#48143; SUID&#45716; UNIX &#44592;&#48152; &#50868;&#50689; &#52404;&#51228; &#49345;&#51032; &#54028;&#51068; &#48143; &#46356;&#47113;&#53664;&#47532;&#50640; &#54624;&#45817;&#54624; &#49688; &#51080;&#45716; &#53945;&#48324; &#50529;&#49464;&#49828; &#44428;&#54620; &#54540;&#47000;&#44536;&#51077;&#45768;&#45796;. &#52980;&#54504;&#53552; &#49884;&#49828;&#53596; &#50529;&#49464;&#49828;&#50640; &#51080;&#50612; &#51068;&#48152; &#44428;&#54620;&#51012; &#44032;&#51652; &#49324;&#50857;&#51088;&#44032; &#51068;&#49884;&#51201;&#51004;&#47196; &#45458;&#50500;&#51652; &#44428;&#54620;&#51012; &#44032;&#51648;&#44256; &#48148;&#51060;&#45320;&#47532; &#49892;&#54665; &#54028;&#51068;&#51012; &#49688;&#54665;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / \( -perm -2000 -o -perm -4000 \) -ls &lt;br /&gt;
167901 12 -rwsr-xr-x 1 root root 9340 Jun 16 2006 /usr/bin/rsh &lt;br /&gt;
167334 12 -rwxr-sr-x 1 root tty 10532 May 4 2007 /usr/bin/wall
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50948; &#47749;&#47161;&#50612;&#50640;&#49436; &#44292;&#54840;&#44032; escape &#52376;&#47532;&#46108; &#44163;&#51012; &#48380; &#49688; &#51080;&#49845;&#45768;&#45796;. &#46608;&#54620;, &#44428;&#54620; &#44036;&#51032; &#52264;&#51060;&#51216;&#51012; &#54869;&#51064;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. &#52395; &#48264;&#51704; &#54028;&#51068;&#50640;&#45716; SGID &#44428;&#54620;&#51060; &#49444;&#51221;&#46104;&#50612; &#51080;&#51004;&#47728; &#46160; &#48264;&#51704; &#54028;&#51068;&#50640;&#45716; SUID &#44428;&#54620;&#51060; &#49444;&#51221;&#46104;&#50612; &#51080;&#49845;&#45768;&#45796;. &#50948; &#47749;&#47161;&#50612;&#51032; &#47560;&#51648;&#47561; &#50672;&#49328;&#51008; -exec ls -dils &#50672;&#49328;&#51032; find &#47749;&#47161;&#50612;&#50752; &#50976;&#49324;&#54633;&#45768;&#45796;&lt;/p&gt;
&lt;h2&gt;find &#47749;&#47161;&#50612; &#51228;&#50612;&lt;/h2&gt;
&lt;p&gt;Linux&#51032; &#47566;&#51008; &#47749;&#47161;&#50612;&#50752; &#45804;&#47532;, find &#47749;&#47161;&#50612;&#45716; -r &#46608;&#45716; -R &#50741;&#49496;&#51060; &#50630;&#51060;&#46020; &#49436;&#48652;&#46356;&#47113;&#53664;&#47532;&#47196; &#45236;&#47140;&#44032;&#51648; &#50506;&#49845;&#45768;&#45796;. &#51060;&#45716; &#44592;&#48376;&#51201;&#51004;&#47196; &#51648;&#50896;&#46121;&#45768;&#45796;. &#54616;&#51648;&#47564;, &#46412;&#50640; &#46384;&#46972; &#51060;&#47484; &#51228;&#54620;&#54616;&#44256; &#49910;&#51012; &#49688; &#51080;&#49845;&#45768;&#45796;. &#51060;&#47092; &#44221;&#50864;, -depth, -maxdepth &#48143; &#8211;mindepth &#50741;&#49496;&#44284; &#8211;prune &#50672;&#49328;&#51060; &#50976;&#50857;&#54633;&#45768;&#45796;&lt;/p&gt;
&lt;p&gt;-prune&#51060; &#50620;&#47560;&#45208; &#50976;&#50857;&#54620;&#51648;&#45716; &#51060;&#48120; &#54869;&#51064;&#54664;&#44592; &#46412;&#47928;&#50640; &#51060;&#51228;&#45716; -depth, -maxdepth &#48143; -mindepth &#50741;&#49496;&#50640; &#45824;&#54644; &#49332;&#54196;&#48372;&#44192;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;-maxdepth &#48143; -mindepth &#50741;&#49496;&#51012; &#49324;&#50857;&#54616;&#47732; find &#47749;&#47161;&#50612;&#47484; &#53685;&#54644; &#44160;&#49353;&#54616;&#44256;&#51088; &#54616;&#45716; &#46356;&#47113;&#53664;&#47532; &#53944;&#47532;&#51032; &#49688;&#51456;&#51012; &#51648;&#51221;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. find &#47749;&#47161;&#50612;&#44032; &#45800; &#54620; &#49688;&#51456;&#51032; &#46356;&#47113;&#53664;&#47532;&#47484; &#52286;&#46020;&#47197; &#54616;&#44256; &#49910;&#51008; &#44221;&#50864;&#50640;&#45716; maxdepth &#50741;&#49496;&#51012; &#49324;&#50857;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;p&gt;&#50500;&#47000; &#47749;&#47161;&#50612;&#47484; &#49892;&#54665;&#54644; &#46356;&#47113;&#53664;&#47532; &#53944;&#47532;&#51032; &#49345;&#50948; 3&#44060; &#49688;&#51456;&#51032; &#47196;&#44536; &#54028;&#51068;&#51012; &#44160;&#49353;&#54616;&#47732; &#8211;maxdepth&#51032; &#54952;&#44284;&#47484; &#54869;&#51064;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;. &#51060;&#47111;&#44172; &#54616;&#47732; &#8211;maxdepth &#50630;&#51060; &#49892;&#54665;&#54624; &#46412; &#48372;&#45796;&#45716; &#55016;&#50476; &#51201;&#51008; &#52636;&#47141; &#44208;&#44284;&#44032; &#45208;&#50741;&#45768;&#45796;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -maxdepth 3 -name "*log"
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#46608;&#54620;, find &#47749;&#47161;&#50612;&#50640;&#44172; &#46356;&#47113;&#53664;&#47532; &#53944;&#47532;&#50640;&#49436; &#52572;&#49548; 3&#44060; &#49688;&#51456;&#44620;&#51648; &#46356;&#47113;&#53664;&#47532;&#47484; &#44160;&#49353;&#54624; &#44163;&#51012; &#51648;&#49884;&#54624; &#49688; &#51080;&#49845;&#45768;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find / -mindepth 3 -name "*log"
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;-depth &#50741;&#49496;&#51008; &#45236;&#50857; &#54217;&#44032;&#50640; &#50526;&#49436; &#46356;&#47113;&#53664;&#47532;&#47484; &#54217;&#44032;&#54624; &#49688; &#51080;&#46020;&#47197; &#54644;&#51469;&#45768;&#45796;. &#50500;&#47000; &#47749;&#47161;&#50612;&#45716; &#54620; &#50696;&#51077;&#45768;&#45796;.:&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;
&lt;pre&gt;
find -name "*test*" -depth ./test/test ./test ./localbin/test ./localbin/test_shell_var ./localbin/test.txt ./test2/test/test ./test2/test ./test2
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;find &#47749;&#47161;&#50612;&#51032; &#49464;&#44228;&lt;/h2&gt;
&lt;p&gt;&#51648;&#44552;&#44620;&#51648; find &#47749;&#47161;&#50612;&#51032; &#50976;&#50857;&#54616;&#51648;&#47564; &#45796;&#49548; &#54844;&#46976;&#49828;&#47084;&#50868; &#51068;&#48512; &#44592;&#45733;&#50640; &#45824;&#54644; &#50508;&#50500;&#48372;&#50520;&#51648;&#47564;, find &#47749;&#47161;&#50612;&#44032; &#49688;&#54665;&#54624; &#49688; &#51080;&#45716; &#52628;&#44032; &#51089;&#50629;&#51060; &#51080;&#49845;&#45768;&#45796;. &#50696;&#47484; &#46308;&#50612;, find &#47749;&#47161;&#50612;&#44032; &#44592;&#51316; &#48260;&#51204;&#51032; UNIX &#48143; &#44592;&#53440; &#50868;&#50689; &#52404;&#51228;&#50752; &#54840;&#54872; &#44032;&#45733;&#54616;&#46020;&#47197; &#54616;&#44256; &#50668;&#47084; &#54028;&#51068;&#47196; &#52636;&#47141;&#51012; &#51064;&#49604;&#54616;&#46020;&#47197; &#54616;&#45716; &#46321; &#50672;&#49328;&#51012; &#49688;&#54665;&#54624; &#49688; &#51080;&#46020;&#47197; &#54616;&#45716; &#50741;&#49496;&#51060; &#51080;&#49845;&#45768;&#45796;. &#48376; &#51088;&#47308;&#47484; &#51069;&#51008; &#45796;&#51020;&#50640;&#45716; find &#47749;&#47161;&#50612;&#50640; &#45824;&#54620; &#47592;&#54168;&#51060;&#51648;(man page)&#47484; &#51060;&#54644;&#54624; &#49688; &#51080;&#45716; &#48176;&#44221; &#51648;&#49885;&#51012; &#44054;&#52628;&#50632;&#51012; &#44163;&#51004;&#47196; &#49373;&#44033;&#54616;&#44592; &#46412;&#47928;&#50640; &#51060; &#44053;&#47141;&#54616;&#47732;&#49436;&#46020; &#50976;&#50857;&#54620; &#53812;&#51012; &#51649;&#51217; &#44221;&#54744;&#54644; &#48380; &#44163;&#51012; &#44428;&#54633;&#45768;&#45796;&lt;/p&gt;
&lt;h2&gt;&#54596;&#51088;&#44032; &#51088;&#51452; &#49324;&#50857;&#54616;&#45716;&amp;nbsp;find&amp;nbsp;&#47749;&#47161; &#54805;&#49885;&lt;/h2&gt;
&lt;p&gt;1. &#53945;&#51221; &#54028;&#51068;&#51012; &#52286;&#51012; &#46412;&lt;/p&gt;
&lt;p&gt;find . -name '*.cpp'&lt;/p&gt;
&lt;p&gt;find&#47484; &#49892;&#54665;&#54616;&#45716; &#44221;&#47196;&#50640;&#49436; &#49884;&#51089;&#54644;&#49436; &#47784;&#46304; &#54616;&#50948; &#44221;&#47196;&#50640;&#49436; &#54028;&#51068;&#51032; &#54869;&#51109;&#51088;&#44032; cpp &#51064; &#54028;&#51068; &#51060;&#47492;&#51012; &#52636;&#47141;&#54620;&#45796;.&lt;/p&gt;
&lt;p&gt;2. &#53945;&#51221; &#54028;&#51068;&#51012; &#52286;&#46104;, &#51648;&#51221;&#46108; &#44618;&#51060;&#44620;&#51648;&#47564; &#54616;&#50948; &#44221;&#47196;&#47484; &#44160;&#49353;&#54624; &#46412;&lt;/p&gt;
&lt;p&gt;find . -maxdepth 2 -name '*.cpp'&lt;/p&gt;
&lt;p&gt;3. &#54028;&#51068; &#51060;&#47492;&#50640; GSE3838 &#51060; &#46308;&#50612;&#44032;&#45716; &#54028;&#51068; &#51060;&#47492;&#51012; &#44160;&#49353;&#54624; &#46412;&lt;/p&gt;
&lt;p&gt;find . -name '*GSE3838*'&lt;/p&gt;
&lt;p&gt;4. &#54028;&#51068; &#45236;&#48512;&#50640; get_rank &#46972;&#45716; &#47928;&#51088;&#50676;&#51060; &#46308;&#50612; &#51080;&#45716; &#54028;&#51068;&#51012; &#52286;&#50500;&#49436; &#54028;&#51068; &#51060;&#47492;&#51012; &#52636;&#47141;&#54624; &#46412;&lt;/p&gt;
&lt;p&gt;find . -name '*.cpp' -exec egrep -H get_rank {} \;&lt;/p&gt;
&lt;p&gt;&#51060; &#47749;&#47161;&#44396;&#47928;&#51008; &#46160; &#44032;&#51648; &#51068;&#51012; &#54616;&#44256; &#51080;&#45716;&#45936;, &#50864;&#49440; find option &#50640; &#51201;&#51208;&#54620; &#54028;&#51068; &#51060;&#47492;&#51012; &#44160;&#49353;&#54620;&#45796;. &#44536; &#54980; &#52286;&#50500;&#51652; &#54028;&#51068; &#51060;&#47492;&#51012; &#51077;&#47141;&#51004;&#47196; &#54616;&#50668; -exec &#46244;&#51032; &#44396;&#47928;&#51012; &#49892;&#54665;&#54620;&#45796;. &#50948;&#51032; &#44221;&#50864;, *.cpp &#54028;&#51068;&#51012; &#52286;&#51008; &#54980;, &#44033; &#54028;&#51068; &#51060;&#47492;&#50640; &#45824;&#54616;&#50668; egrep -H get_rank %&#52286;&#50500;&#51652; &#54028;&#51068; &#51060;&#47492;% &#54805;&#53468;&#51032; &#47749;&#47161;&#51012; &#54616;&#44172; &#46108;&#45796;. &#50668;&#44592;&#49436; grep &#51012; &#49444;&#47749;&#54616;&#51652; &#50506;&#45716;&#45936;, &#50948;&#51032; &#47749;&#47161; &#44396;&#47928;&#51008;, &#46384;&#46972;&#49436;, get_rank &#44032; &#54252;&#54632;&#46108; cpp &#54028;&#51068;&#51012; &#52286;&#50500;&#49436; &#44536; &#54028;&#51068; &#51060;&#47492;&#51012; &#52636;&#47141;&#54616;&#44256; &#51080;&#45796;. &#51060; &#44592;&#45733;&#51060; &#51008;&#44540;&#55176; &#50976;&#50857;&#54620;&#45936;, &#47564;&#50557; &#54028;&#51068; &#51060;&#47492;&#51012; &#51077;&#47141;&#51004;&#47196; &#48155;&#45716; &#54532;&#47196;&#44536;&#47016;&#51012; &#51089;&#49457;&#54664;&#44256;, &#53945;&#51221; &#44221;&#47196; (&#50752; &#54616;&#50948; &#44221;&#47196;)&#50640; &#54252;&#54632;&#46108; &#54028;&#51068;&#46308; &#44033;&#44033;&#50640; &#45824;&#54616;&#50668; &#44536; &#54532;&#47196;&#44536;&#47016;&#51012; &#49892;&#54665;&#49884;&#53020;&#50556; &#54624; &#46412; &#51060;&#50752; &#44057;&#51060; &#54624; &#49688; &#51080;&#45716; &#44163;&#51060;&#45796;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Sun, 05 Sep 2010 05:19:28 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/5886015</link>
      <guid>http://prodev.springnote.com/pages/5886015</guid>
    </item>
    <item>
      <title>IMEI, IMSI</title>
      <description>&lt;p&gt;IMEI(International Mobile Equipment Identity, &#44397;&#51228; &#47784;&#48148;&#51068; &#45800;&#47568;&#44592; &#51064;&#51613;&#48264;&#54840;)&#45716; 3G &#48169;&#49885;&#50640;&#49436; &#45800;&#47568;&#44592;&#44032; &#50612;&#45712; &#51228;&#51312;&#49324;&#51032; &#50612;&#45712; &#47784;&#45944;&#51064;&#51648;&#47484; &#50508;&#50500;&#48380; &#49688; &#51080;&#45716; &#44256;&#50976; &#48264;&#54840;&#51060;&#47728;, IMSI(International Mobile Subscriber Identity : &#44397;&#51228; &#47784;&#48148;&#51068; &#44032;&#51077;&#51088; &#51064;&#51613;&#48264;&#54840;)&#45716; USIM&#50640; &#45236;&#51109;&#46076; &#53685;&#49888;&#49324;&#44032; &#44032;&#51077;&#51088; &#44060;&#51064;&#51012; &#49885;&#48324;&#54616;&#45716;&#45936; &#49324;&#50857;&#54616;&#45716; &#48264;&#54840;&#47196; &#44397;&#51228; &#54364;&#51456;&#51004;&#47196; &#49324;&#50857;&#46104;&#44256; &#51080;&#45796;.&lt;/p&gt;
&lt;p&gt;2G &#49884;&#51208;&#50640;&#45716; ESN(Electronic Serial Number : &#51204;&#51088;&#49885; &#44256;&#50976; &#48264;&#54840;)&#51060; &#51060;&#50752; &#50976;&#49324;&#54620; &#50669;&#54624;&#51012; &#54664;&#45796;. &#44536;&#47088;&#45936; ESN&#51060; &#50976;&#52636;&#46076; &#49688;&#47566;&#51008; &#48652;&#47551;&#51648;&#54256;(&#46020;&#183;&#44048;&#52397;&#51032; &#47785;&#51201;&#51004;&#47196; &#51228;&#51089;&#46104;&#45716; &#48373;&#51228; &#51204;&#54868;&#44592;)&#51060; &#46321;&#51109;&#54616;&#47732;&#49436; 3G&#48512;&#53552;&#45716; IMEI&#50752; IMSI&#47484; &#53685;&#54644; &#45800;&#47568;&#44592; &#51221;&#48372;&#50752; &#49324;&#50857;&#51088; &#51221;&#48372;&#47484; &#48516;&#47532;&#54644;&#49436; &#49324;&#50857;&#54616;&#44256; &#51080;&#45716; &#44163;&#51060;&#45796;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Mon, 30 Aug 2010 13:02:40 +0900</pubDate>
      <link>http://prodev.springnote.com/pages/6322639</link>
      <guid>http://prodev.springnote.com/pages/6322639</guid>
    </item>
  </channel>
</rss>

