code to test "objectClass" of object contribution of "popupMenus" extension-poin [message #330556] |
Fri, 01 August 2008 10:59  |
Eclipse User |
|
|
|
R3.3, WinXP
I am designing my own extension-point (done that lots), in which I wish
to imitate the effect of the "objectClass" in the "objectContribution"
element of the "org.eclipse.ui.popupMenus" extension-point (haven't done
that often, maybe only once).
I've debugged a lot through these three classes (watching as existing
object contributions are loaded), and I have not seen where the actual
test is performed:
PluginActionContributionItem
ObjectContributorManager
ObjectActionContributorManager
Here's a guess:
Class desired = Class.forName(contribution.objectClass);
Class actual = selectedObject.getClass();
boolean ok = desired.isAssignableFrom(actual);
TIA,
-Paul
|
|
|
|
Powered by
FUDForum. Page generated in 0.03411 seconds