Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Define for extensions if they should be used depending on their environment (stand-alone / Eclipse)
Define for extensions if they should be used depending on their environment (stand-alone / Eclipse) [message #629969] Thu, 30 September 2010 03:26 Go to next message
Eclipse UserFriend
Hello everybody,

I have the following problem: Currently I develop a standalone RCP applikation which I also want to include into the Eclipse IDE. This is not the problem, if I copy my plug-ins to the Eclipse Plug-in folder everything works fine. The problem is, that I don't want to have every extension I made in the stand-alone application also in the Eclipse IDE (e.g. menu).

I don't want to have an additional project only for the Eclipse plug-in because then I have two places to maintain. So what I need is the following: I want to declare for extensions if they should be used only for the stand-alone application, only for the Eclipse plug-in or for both. Is there any possibility to declare for extensions that they e.g. only should be used when they are used within the Eclipse IDE?

I hope someone can help me. If you don't understand the problem correct, feel free to ask.

Greetings

[Updated on: Thu, 30 September 2010 03:27] by Moderator

Re: Extensions [message #630025 is a reply to message #629969] Thu, 30 September 2010 08:30 Go to previous messageGo to next message
Eclipse UserFriend
The most common way to do that *is* to create multiple plugins.

Some view, editor, wizard, plugins.

One RCP application plugin that contains the stuff specific to your
application/product.

Then you can install all of the plugins except for the RCP app plugin
into the IDE and it works. This is the correct way of doing it.

Is your concern you only have one small plugin and so you don't want the
overhead of creating 2 plugins for this case?

For some things, like org.eclipse.ui.menus/menuContributions, you can
use a product property tester [1] in the visibleWhen clause. That will
tell the difference between running your RCP product and running in the IDE.


[1] http://wiki.eclipse.org/Command_Core_Expressions

--
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/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Define for extensions if they should be used depending on their environment (stand-alone / Eclip [message #630311 is a reply to message #629969] Fri, 01 October 2010 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply.

You are correct. I don't want to have the overhead of splitting my current bundle into two.

I tried the thing with the menu contribution. This is exactly what I want. I want to define if menu entries are available depending on Eclipse IDE or my stand-alone app.

It makes me sad that it is not possible for other things like views or toolbars. But I understand your point that this is not intended. So as I understand you correct I have no other choice than split my current plug-in into two.

Thanks again for your answer. It helped a lot.

Greetings

[Updated on: Fri, 01 October 2010 10:33] by Moderator

Re: Define for extensions if they should be used depending on their environment (stand-alone / Eclip [message #630938 is a reply to message #630311] Tue, 05 October 2010 10:45 Go to previous message
Eclipse UserFriend
Matthew.Huber@web.de wrote:
> It makes me sad that there it is not possible for other things like
> views or toolbars. But I understand your point that this is not
> intended. So as I understand you correct I have no other choice than
> split my current plug-in into two.

toolbars? menuContributions actually do manage both menus and toolbars
and can be effected the same way.

as for views or wizards, perhaps an alternative is to use activities
with an enabledWhen clause (which uses core expressions). If you can
get your activityPatternBinding to make your view disappear, you can tie
it to an activity with the same kind of product property tester.

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/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Previous Topic:Plug-in Development :- How to call Palette on the finish button of Wizard ?
Next Topic:How to load icons?
Goto Forum:
  


Current Time: Fri Jul 11 22:59:30 EDT 2025

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

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

Back to the top