Plugin Menu

Hi all,

I have been using VP for a while now and have started developing plugins for the rest of the design team.

I need the Create Project Structure… item to be a sub-item of the ICTTools new menu option.
I cannot find how it is done.


<plugin
	id="CreateProjectStructure"
	name="Create Project Structure"
	description="Create Project Structure."
	provider="Visual Paradigm"
	class="CreateProjectStructure.CreateProjectStructure">
        
	<actionSets>
	
	<actionSet id="sample.plugin.actions.ActionSet1"> 
	
	
		<toolbar id="sample.plugin.actions.Toolbar1" orientation="north" index="last"/>
		
 		<menu id="sample.plugin.actions.Menu1" label="ICTTools" mnemonic="I" menuPath="Tools/Report"/>
	</actionSet>
 
 	<actionSet id="sample.plugin.actions.ActionSet2"> 
		<action 
			id="CreateProjectStructure.actions.CreateProjectStructureActionController"
			actionType="generalAction"
			label="Create Project Structure..."
			tooltip="Create Project Structure"
			style="normal"
	
			menuPath="Tools/Report">
				<actionController class="CreateProjectStructure.actions.CreateProjectStructureActionController"/>
			</action>
		</actionSet>
	</actionSets>
	
</plugin>

Please assist…

Thanks

George

Hey,

in line 26 instead of:

menuPath="Tools/Report"

use:

menuPath="Tools/sample.plugin.actions.Menu1"

Hope it works for u.

Tapta

Theres a slash missing I guess. The menuPath=" " refers to the existing element after which we want to place our new element.

 menuPath="Tools/sample.plugin.actions.Menu1" 

This will put our element after the sample.plugin.actions.Menu1 element.
What we really want to do, is, to put in inside the menu. As you don’t have any elements there, just refer to the root:


menuPath="Tools/sample.plugin.actions.Menu1/" 

Here is my plugin.xml which works (at least with Agilian 3.3 SP2)


<plugin
		id="plugin.documentation"
		name="Project Opened"
		description="Project Opened"
		provider="Visual Paradigm"
		class="plugin.documentation.DocumentationPlugin">
    
    <actionSets>
	    <actionSet id="sample.plugin.actions.actions1">       	  
			<menu id="sample.plugin.actions.Menu" label="Documentation Export Tools" mnemonic="I" menuPath="Tools/Report"/>  
		</actionSet>  
		
        <actionSet id="plugin.documentation.actions2">       
			<action
				id="plugin.documentation.actions.ExportDocumentationSettings"
				actionType="generalAction"
				label="Export Documentation Settings"
				tooltip="Documentation Export"
				style="normal"
				menuPath="Tools/sample.plugin.actions.Menu/">
             <actionController class="plugin.documentation.actions.ExportDocumentationSettings"/>
            </action>
        	
        </actionSet>
    </actionSets>
	<runtime>
		<library path="lib/swing-layout-1.0.4.jar" relativePath="true"/>
	</runtime>
</plugin>

Personally, I would put the menu and the action in the same actionSet. I suspected the reason for your error at first to be caused by that, but as it turns out you can place your action inside a menu defined in another actionSet.

For further reference:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_basicext_actionSets.htm
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_menupaths.htm

Kind regards
Milan

Hi All,

Thanks … issue resolved. Just needed to understand.
Can get started now on the plugins needed.

Thanks again