Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to restrict the plugins visible to an application?
How to restrict the plugins visible to an application? [message #73701] Tue, 26 September 2006 04:18 Go to next message
Michael Scharf is currently offline Michael ScharfFriend
Messages: 301
Registered: July 2009
Senior Member
Hi,

we have several applications (some of them headless) that run
from within the same eclipse installation. One problem is,
that all plugins are visible from the applications. This
cause problems, if extensions are used that load plugins
that cannot run in the context of the headless application.

To illustrate the problem I use a simple example. A headless
application that uses the org.eclipse.core.variables plugin to
expand a variable. The org.eclipse.core.variables is UI free
and therefore no problem. But some plugins that contribute to
the variables plugin are not headless. To illustrate this, I
use the ${selected_text} variable that is defined in the
org.eclipse.debug.ui plugin. This causes the application
to fail.


public class MyApplicationWithVariables implements IPlatformRunnable {
public Object run(Object arg) throws Exception {
IStringVariableManager vm=VariablesPlugin.getDefault().getStringVariableManager();
String message=vm.performStringSubstitution("Hello ${selected_text}!");
System.out.println(message);
return EXIT_OK;
}
}

<extension
id="HelloWorldWithVariables"
name="Minimal Headless with variables"
point="org.eclipse.core.runtime.applications">
<application>
<run class="gr.scharf.minimal.headless.MyApplicationWithVariables "/>
</application>
</extension>


Is there a way to restrict the plugins visible or loadable
to an application?
Or is the only way to have a copy of the installation
containing only the "good" plugins?

Michael

--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: How to restrict the plugins visible to an application? [message #74451 is a reply to message #73701] Tue, 10 October 2006 12:33 Go to previous message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

I think I just answered that in
http://www.eclipse.org/newsportal/article.php?id=2190&gr oup=eclipse.technology.equinox#2190

before seeing your message.

Jeff
Michael Scharf wrote:
> Hi,
>
> we have several applications (some of them headless) that run
> from within the same eclipse installation. One problem is,
> that all plugins are visible from the applications. This
> cause problems, if extensions are used that load plugins
> that cannot run in the context of the headless application.
>
> To illustrate the problem I use a simple example. A headless
> application that uses the org.eclipse.core.variables plugin to
> expand a variable. The org.eclipse.core.variables is UI free
> and therefore no problem. But some plugins that contribute to
> the variables plugin are not headless. To illustrate this, I
> use the ${selected_text} variable that is defined in the
> org.eclipse.debug.ui plugin. This causes the application
> to fail.
>
>
> public class MyApplicationWithVariables implements IPlatformRunnable {
> public Object run(Object arg) throws Exception {
> IStringVariableManager
> vm=VariablesPlugin.getDefault().getStringVariableManager();
> String message=vm.performStringSubstitution("Hello
> ${selected_text}!");
> System.out.println(message);
> return EXIT_OK;
> }
> }
>
> <extension
> id="HelloWorldWithVariables"
> name="Minimal Headless with variables"
> point="org.eclipse.core.runtime.applications">
> <application>
> <run
> class="gr.scharf.minimal.headless.MyApplicationWithVariables "/>
> </application>
> </extension>
>
>
> Is there a way to restrict the plugins visible or loadable
> to an application?
> Or is the only way to have a copy of the installation
> containing only the "good" plugins?
>
> Michael
>
Previous Topic:IPreferencesService for database
Next Topic:Filtering contributions from dependencies
Goto Forum:
  


Current Time: Sat Apr 20 01:39:13 GMT 2024

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

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

Back to the top