Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Context Menu entry does not work when plug-in downloaded and installed
Context Menu entry does not work when plug-in downloaded and installed [message #233088] Tue, 09 June 2009 12:58 Go to next message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hi,

I have a problem with my editor: When I provide it on an update site and
then download and install it into a new eclipse installation, the
context menu I made does not work. I added a new entry to the menu, but
it does not show up, although the plug-in that provides the menu appears
in the plug-in list. However, when I start my plug-in project from
inside of eclipse, it does work.

Does somebody know how to solve this?

Thanks in advance,
Matthias
Re: Context Menu entry does not work when plug-in downloaded and installed [message #233097 is a reply to message #233088] Tue, 09 June 2009 15:03 Go to previous messageGo to next message
Tobias Neef is currently offline Tobias NeefFriend
Messages: 17
Registered: July 2009
Junior Member
How did you provide the context entry? Did you do it in code or
declarative and did you use the command framework or the old action based
approach or something low level which could explain your error?
Re: Context Menu entry does not work when plug-in downloaded and installed [message #233120 is a reply to message #233097] Tue, 09 June 2009 15:23 Go to previous message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Tobias Neef wrote:
> How did you provide the context entry? Did you do it in code or
> declarative and did you use the command framework or the old action
> based approach or something low level which could explain your error?

I defined it in the plugin.xml. The code is below:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>

<extension
point="org.eclipse.help.toc">
<toc
file="toc.xml">
</toc>
<toc
file="testToc.xml"
primary="true">
</toc>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new OnEntryAction"
id=" de.cau.cs.kieler.synccharts.custom.contextMenu.addEntryActio n "
name="Add OnEntryAction">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new OnInsideAction"
id=" de.cau.cs.kieler.synccharts.custom.contextMenu.addInnerActio n "
name="Add OnInsideAction">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new OnExitAction"
id=" de.cau.cs.kieler.synccharts.custom.contextMenu.addExitAction "
name="Add OnExitAction">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new Signal"
id="de.cau.cs.kieler.synccharts.custom.contextMenu.addSignal " name="Add
Signal">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new Variable"
id="de.cau.cs.kieler.synccharts.custom.contextMenu.addVariable "
name="Add Variable">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new SuspensionTrigger"
id=" de.cau.cs.kieler.synccharts.custom.contextMenu.addSuspension Trigger "
name="Add SuspensionTrigger">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new Region"
id="de.cau.cs.kieler.synccharts.custom.contextMenu.addRegion " name="Add
Region">
</command>
</extension>

<extension point="org.eclipse.ui.commands">
<category name="Synccharts" description="Commands related to state
charts." id="org.eclipse.gmf.category.synccharts"/>
<command categoryId="org.eclipse.gmf.category.synccharts"
description="Adds a new State"
id="de.cau.cs.kieler.synccharts.custom.contextMenu.addState " name="Add
State">
</command>
</extension>

<extension point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="false"

id=" de.cau.cs.kieler.synccharts.diagram.ui.objectContribution.St ateEditPart "

objectClass=" de.cau.cs.kieler.synccharts.diagram.edit.parts.StateEditPart ">
<menu
id="ElementInsert"
label="Insert Element"
path="additions">
<separator name="group1"/>
<separator name="group2"/>
<separator name="group3"/>
<separator name="group4"/>
</menu>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSuspension TriggerAction "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSuspension Trigger "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSuspension TriggerActionID "
label="Add SuspensionTrigger"
menubarPath="ElementInsert/group4">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddExitAction Action "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddExitAction "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddExitAction ActionID "
label="Add OnExitAction"
menubarPath="ElementInsert/group3">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddInnerActio nAction "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddInnerActio n "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddInnerActio nActionID "
label="Add OnInsideAction"
menubarPath="ElementInsert/group3">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio nAction "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio n "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio nActionID "
label="Add OnEntryAction"
menubarPath="ElementInsert/group3">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddVariableAc tion "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddVariable "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddVariableAc tionID "
label="Add Variable"
menubarPath="ElementInsert/group2">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSignalActi on "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddSignal "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSignalActi onID "
label="Add Signal"
menubarPath="ElementInsert/group2">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddRegionActi on "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddRegion "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddRegionActi onID "
label="Add Region"
menubarPath="ElementInsert/group1">
</action>
</objectContribution>

<objectContribution
adaptable="false"

id=" de.cau.cs.kieler.synccharts.diagram.ui.objectContribution.St ate2EditPart "

objectClass=" de.cau.cs.kieler.synccharts.diagram.edit.parts.State2EditPar t ">
<menu
id="ElementInsert"
label="Insert Element"
path="additions">
<separator name="group1"/>
<separator name="group2"/>
<separator name="group3"/>
<separator name="group4"/>
</menu>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSuspension Trigger2Action "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSuspension Trigger2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSuspension Trigger2ActionID "
label="Add SuspensionTrigger"
menubarPath="ElementInsert/group4">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddExitAction 2Action "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddExitAction 2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddExitAction 2ActionID "
label="Add OnExitAction"
menubarPath="ElementInsert/group3">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddInnerActio n2Action "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddInnerActio n2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddInnerActio n2ActionID "
label="Add OnInsideAction"
menubarPath="ElementInsert/group3">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio n2Action "

definitionId=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio n2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio n2ActionID "
label="Add OnEntryAction"
menubarPath="ElementInsert/group3">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddVariable2A ction "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddVariable2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddVariabl2eA ctionID "
label="Add Variable"
menubarPath="ElementInsert/group2">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSignal2Act ion "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddSignal2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddSignal2Act ionID "
label="Add Signal"
menubarPath="ElementInsert/group2">
</action>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddRegion2Act ion "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddRegion2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddRegion2Act ionID "
label="Add Region"
menubarPath="ElementInsert/group1">
</action>
</objectContribution>

<objectContribution
adaptable="false"

id=" de.cau.cs.kieler.synccharts.diagram.ui.objectContribution.Re gionEditPart "

objectClass=" de.cau.cs.kieler.synccharts.diagram.edit.parts.RegionEditPar t ">
<menu
id="ElementInsert"
label="Insert Element"
path="additions">
<separator name="group1"/>
</menu>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddStateActio n "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddState "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddStateActio nID "
label="Add State"
menubarPath="ElementInsert/group1">
</action>
</objectContribution>

<objectContribution
adaptable="false"

id=" de.cau.cs.kieler.synccharts.diagram.ui.objectContribution.Re gion2EditPart "

objectClass=" de.cau.cs.kieler.synccharts.diagram.edit.parts.Region2EditPa rt ">
<menu
id="ElementInsert"
label="Insert Element"
path="additions">
<separator name="group1"/>
</menu>
<action

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddState2Acti on "

definitionId="de.cau.cs.kieler.synccharts.custom.contextMenu.AddState2 "
enablesFor="1"

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddState2Acti onID "
label="Add State"
menubarPath="ElementInsert/group1">
</action>
</objectContribution>
</extension>

<!-- <extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu?after=additions" >
<menu
id=" de.cau.cs.kieler.synccharts.custom.contextMenu.ui.menu.syncc harts "
label="Syncchart"
mnemonic="S">
</menu>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=additions ">
<menu
label="Syncchart">
<command

commandId=" de.cau.cs.kieler.synccharts.custom.contextMenu.addEntryActio n "
label="Add OnEntryAction"
style="push">
</command>
</menu>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions ">
<toolbar

id=" de.cau.cs.kieler.synccharts.custom.contextMenu.ui.toolbar.ma in ">
<command

commandId=" de.cau.cs.kieler.synccharts.custom.contextMenu.addEntryActio n "
label="Add OnEntryAction"
style="push">
</command>
</toolbar>
</menuContribution>
</extension>

<extension
point="org.eclipse.ui.commands">
<command
description="Add new OnEntryAction to selected state"
id=" de.cau.cs.kieler.synccharts.custom.contextMenu.addEntryActio n "
name="Add OnEntryAction">
</command>
</extension>

<extension
point="org.eclipse.ui.handlers">
<handler

class=" de.cau.cs.kieler.synccharts.custom.contextMenu.AddEntryActio nHandler "

commandId=" de.cau.cs.kieler.synccharts.custom.contextMenu.addEntryActio n ">
</handler>
</extension> -->

</plugin>
Previous Topic:CompartmentChildCreateCommand & RepositionEObjectCommand
Next Topic:How to make a Compartment become invisible when it is empty?
Goto Forum:
  


Current Time: Tue Apr 07 19:07:01 GMT 2020

Powered by FUDForum. Page generated in 0.02830 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top