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

What this is

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

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
   id="org.eclipse.ui.examples.contributions"
   name="%Plugin.name"
   version="3.1.0"
   provider-name="%Plugin.providerName"
   class="org.eclipse.ui.examples.contributions.ContributionsPlugin">

   <runtime>
      <library name="contributions.jar">
         <export name="*"/>
      </library>
   </runtime>

   <requires>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.core.runtime"/>
   </requires>
   
   <extension
   		point="org.eclipse.ui.commands">
		<category
			id="org.eclipse.ui.examples.category1"
			name="%Category1.name"
			description="%Category2.description" />
         	
		<command
			id="org.eclipse.ui.examples.command1"
			name="%Command1.name"
			description="%Command1.description"
			category="org.eclipse.ui.examples.category1"
			helpContextId="my_help_context"
			defaultHandler="org.eclipse.ui.internal.examples.handlers.Handler1Global" />
	</extension>

	<!-- This property tester definition would likely be in the workbench -->
	<extension point="org.eclipse.core.expressions.propertyTesters">
		<propertyTester
			id="org.eclipse.ui.propertyTesters.resource"
			type="org.eclipse.core.resources.IResource"
			properties="projectPersistentProperty"
			class="org.eclipse.ui.internal.ide.model.ResourcePropertyTester">
		</propertyTester>
	</extension>
   
   <extension
   		point="org.eclipse.ui.handlers">
   		 <handler
			commandId="org.eclipse.ui.examples.command1"
			class="org.eclipse.ui.internal.examples.handlers.Handler1Local" />
			<activeWhen>
				<with variable="selection">
	   				<and>
   						<or>
			   				<instanceof value="org.eclipse.core.resources.IResource" />
		   					<adapt type="org.eclipse.core.resources.IResource" />
		   				</or>
	   					<test property="projectPersistentProperty" value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature" />
		   			</and>
		   		</with>
			</activeWhen>
   </extension>
   
   <extension
   		point="org.eclipse.ui.menus">
   		<menu
   			id="org.eclipse.ui.examples.submenu1"
   			label="%Submenu1.label">
   			<location mnemonic="%Submenu1.mnemonic">
   				<popup />
   			</location>
   		</menu>
   		
   		<group
   			id="org.eclipse.ui.examples.group1">
   			<location>
   				<popup>
   					<menuLoc id="org.eclipse.ui.examples.submenu1">
   				</popup>
   			</location>
   		</group>
   		
   		<item
   			id="org.eclipse.ui.examples.item1"
   			commandId="org.eclipse.ui.examples.command1">
   			<location mnemonic="%Command1.mnemonic">
   				<popup>
   					<menuLoc id="org.eclipse.ui.examples.submenu1">
   						<groupLoc id="org.eclipse.ui.examples.group1">
   					</menuLoc>
   				</popup>
   			</location>
   			<visibleWhen>
				<with variable="selection">
	   				<and>
   						<or>
			   				<instanceof value="org.eclipse.core.resources.IResource" />
		   					<adapt type="org.eclipse.core.resources.IResource" />
		   				</or>
	   					<test property="projectPersistentProperty" value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature" />
		   			</and>
		   		</with>
   			</visibleWhen>
   		</item>
</plugin>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

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

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