Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:26 Go to next message
No real name is currently offline No real name
Messages: 5
Registered: June 2010
Junior Member
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 07:27]

Report message to a moderator

Re: Extensions [message #630025 is a reply to message #629969] Thu, 30 September 2010 12:30 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 14:31 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 5
Registered: June 2010
Junior Member
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 14:33]

Report message to a 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 14:45 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 Sep 19 00:00:36 GMT 2014

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

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