[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-team-dev] Using commads instead of action in team popup menu
|
Hi,
Hi,
I want to use commands instead of actions for my contributions to the team popup menu, but I wasn’t able to get this done. I tried this:
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:team.main?after=group3">
<command
commandId="com.foo.bar.team.commands.addpackages"
icon="icons/package_native.gif"
id="com.foo.bar.team.menu.addpackages"
label="1"
style="push"
<visibleWhen
checkEnabled="false">
<and>
<test
args="org.eclipse.team.core.repository"
property="org.eclipse.core.resources.projectPersistentProperty"
value="com.foo.bar.team.TeamProvider">
</test>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
your visibleWhen should probably have an
iterate element.
<visibleWhen checkEnabled="false">
<iterate ifEmpty="false">
<test args="org.eclipse.team.core.repository"
property="org.eclipse.core.resources.projectPersistentProperty"
value="com.foo.bar.team.TeamProvider">
<iterate>
</visibleWhen>
You can also test to see if your location is correct by removing the visibleWhen to see if the menu items show up.
--
Paul Webster
Hi floor. Make me a sammich! - GIR