Reuse property tester from dependent plugin [message #1064555] |
Wed, 19 June 2013 17:04  |
Eclipse User |
|
|
|
Hello,
I'm running into a issue with reusing property tester from another plug-in.
Here is the setup:
pluginA
-contains class PropTesterA
-plugin.xml
-contributes the PropTesterA
pluginB
-adds dependency on pluginA
-contains class PropTesterB
-plugin.xml
-contributes the PropTesterB
-contributes RMB menuB1: The command is visbile if PropTesterA returns true for selection
-contributes RMB menuB2: The command is visbile if PropTesterB returns true for selection
Issue:
Launch the UI
Select the required object and RMB
The RMB shows only 'menuB2'. The 'menuB1' is not visibile.
If I execute 'menuB2', it ends up calling some Java classes from pluginA.
After this, the RMB on a slection UI shows both menuB1 and menuB2
This means the pluginA was not activated initally.
Coudl you suggest a way to reuse property tester from pluginA?
Thanks,
Rashmy
|
|
|
Re: Reuse property tester from dependent plugin [message #1064880 is a reply to message #1064555] |
Fri, 21 June 2013 09:57   |
Eclipse User |
|
|
|
On 06/19/2013 05:04 PM, Rashmy A wrote:
> Issue:
> Launch the UI
> Select the required object and RMB
> The RMB shows only 'menuB2'. The 'menuB1' is not visibile.
> If I execute 'menuB2', it ends up calling some Java classes from pluginA.
> After this, the RMB on a slection UI shows both menuB1 and menuB2
> This means the pluginA was not activated initally.
This is known behaviour, a property tester won't be loaded until its
plugin is activated. It can actually return 3 states, TRUE, FALSE, and
NOT_LOADED.
But NOT_LOADED is supposed to be the equivalent to TRUE for visibility
of menus. If the menu doesn't show up, it doesn't sound like NOT_LOADED
is being treated as TRUE.
Could you please open a bug at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI
If you could include an example zip that demonstrates the problem, that
would help debug it.
Later,
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm
|
|
|
Re: Reuse property tester from dependent plugin [message #1064956 is a reply to message #1064880] |
Fri, 21 June 2013 17:18  |
Eclipse User |
|
|
|
Thanks Paul. It is not an Eclipse bug.
This seems to be an issue with our code. We have defined some custom Extension Points and while evaluating the contributions made to our custom extension point, we are skipping the EvaluationResult.NOT_LOADED result.
Regards,
Rashmy
|
|
|
Powered by
FUDForum. Page generated in 0.07758 seconds