|
Re: How to restrict the plugins visible to an application? [message #74451 is a reply to message #73701] |
Tue, 10 October 2006 12:33 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03037 seconds