Check Eclipse RepositoryProvider on a menu selection for plugin
I am writing a plugin and want to enable/disable popup menu items depending on whether the project has been configured with 'Share Project' for team support.
I am using the following to examine a selection for RepositoryProvider and it works fine in Navigator view. However, it does not work on the java files in Package Explorer. How do I check RepositoryProvider on java elements? Thanks.
<ada开发者_如何学Gopt type="org.eclipse.core.resources.mapping.ResourceMapping">
<test
property="org.eclipse.core.resources.projectPersistentProperty"
args="org.eclipse.team.core.repository,com.abc.team.teamProvider">
</test>
</adapt>
I found out that the use of org.eclipse.core.resources.IResource instead of org.eclipse.core.resources.mapping.ResourceMapping solved my problem.
精彩评论