[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: ContributionItemService problem

Hi Cherie,
My current situation is, I can contribute items from generated xxx.diagram plugin, as logic and taipan examples did, but I can't contribute any item in an outer plugin project, say xxx.diagram.custom which I created by myself and depends xxx.diagram project. And I found no example for this situation, yet I do need this because my actions has been defined in the xxx.diagram.custom project and I don't want to modify much codes in xxx.diagram project.


The other fact is if I implement IContributionItemProvider directly rather than inherit AbstractContributionItemProvider, the contributeToActionBars() method can get called when editor opens, so I guess likely there is some logic in AbstractContributionItemProvider not suitable for contributionItemProvider defined in outer plugin.. I'm trying to locate..

Cherie Revells wrote:

Hao,

Did you get this working yet?

Regards,
Cherie

Hao Zhang wrote:
Hi,
I want to add an editor action to my gmf editor and I found contributionItemProviders extension point can be used for this purpose. However I tried to mimic logic example without success, the "CustomContributionItemProvider" class's createTool() method was never get called and of course no editor action showed up.
I listed the plugin.xml fragment below, anyone can give some suggestion?


<extension
id="contribution1"
name="contribution1"


point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders">

<contributionItemProvider class="com.my.CustomContributionItemProvider"> <Priority name="Low"> </Priority> <partContribution class="com.ibm.crl.bo.rule.diagram.part.RuleDiagramEditor"> <partAction id="exampleAction" menubarPath="/file/print" toolbarPath="/"> </partAction> </partContribution> </contributionItemProvider> </extension>


Regards, Hao