Source Code for Examples
Select a project to browse the source code. I current do not include graphics or other binary artifacts. I include the source code and xml files as well as the ".projects" and the ".classpath" files.
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="de.vogella.rcp.commands.enable.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="Perspective"
class="de.vogella.rcp.commands.enable.Perspective"
id="de.vogella.rcp.commands.enable.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="View"
class="de.vogella.rcp.commands.enable.View"
id="de.vogella.rcp.commands.enable.view">
</view>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="de.vogella.rcp.commands.enable.command"
name="Command">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
label="Test">
<command
commandId="de.vogella.rcp.commands.enable.command"
label="Command"
style="push">
</command>
</menu>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="de.vogella.rcp.commands.enable.toolbar1">
<command
commandId="de.vogella.rcp.commands.enable.command"
label="Command"
style="push">
<visibleWhen
checkEnabled="false">
<reference
definitionId="oneElementSelected">
</reference>
</visibleWhen>
</command>
</toolbar>
</menuContribution>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="oneElementSelected">
<with
variable="selection">
<count
value="1">
</count>
</with>
</definition>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="de.vogella.rcp.commands.enable.handler.Command"
commandId="de.vogella.rcp.commands.enable.command">
<enabledWhen>
<reference
definitionId="oneElementSelected">
</reference>
</enabledWhen>
</handler>
</extension>
</plugin>