Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Reuse property tester from dependent plugin
Reuse property tester from dependent plugin [message #1064555] Wed, 19 June 2013 21:04 Go to next message
Rashmy A is currently offline Rashmy A
Messages: 149
Registered: July 2009
Senior Member
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 13:57 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 21:18 Go to previous message
Rashmy A is currently offline Rashmy A
Messages: 149
Registered: July 2009
Senior Member
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
Previous Topic:Breakpoints not working when using gdb
Next Topic:Java Editor on Dialog
Goto Forum:
  


Current Time: Sat Oct 25 23:38:55 GMT 2014

Powered by FUDForum. Page generated in 0.02079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software