[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: ContributionItemService problem
|
- From: Axel Guckelsberger <info@xxxxxxxx>
- Date: Wed, 12 Sep 2007 10:10:29 +0200
- Newsgroups: eclipse.modeling.gmf
- Organization: EclipseCorner
- User-agent: Thunderbird 1.5.0.13 (X11/20070824)
Hi Hao,
I am facing exactly the same situation: I want to add a new action to
menubar and toolbar, but defined within an external plugin.
I also wonder at which point the visual aspects are defined (i.e. the
toolbar icon).
Please let us know if you cope with this problem.
Hao Zhang schrieb:
> 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
>>>
>
>