Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Possible to load a class from a plugin into another?
Possible to load a class from a plugin into another? [message #450928] Mon, 12 June 2006 11:05 Go to next message
Eclipse UserFriend
Originally posted by: diebosto.fi.vupv.es

I was wondering if there is any way to load classes to a plugin from
another plugin.
any great idea?
I know they have different classloaders, but i don't know the real
implication of this.
Thanks!
Re: Possible to load a class from a plugin into another? [message #450934 is a reply to message #450928] Mon, 12 June 2006 12:14 Go to previous messageGo to next message
Eclipse UserFriend
Alex has written an article that talks about eclipse classloaders.

http://www.eclipsezone.com/articles/eclipse-vms/

Later,
PW
Re: Possible to load a class from a plugin into another? [message #450937 is a reply to message #450934] Mon, 12 June 2006 13:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: diebosto.fi.vupv.es

Paul Webster <pwebster@ca.ibm.com> wrote in news:e6k3u2$mjg$2
@utils.eclipse.org:

> Alex has written an article that talks about eclipse classloaders.
>
> http://www.eclipsezone.com/articles/eclipse-vms/
>
> Later,
> PW

I had read it before. I understand what it says but i still don't know how
to load a class of my plugin from my RCP app
calling a x.class.getClassLoader() only can get its own classpath classes
Re: Possible to load a class from a plugin into another? [message #450940 is a reply to message #450928] Mon, 12 June 2006 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lamont_gilbert.rigidsoftware.com

Diego Bosca wrote:

> I was wondering if there is any way to load classes to a plugin from
> another plugin.
> any great idea?
> I know they have different classloaders, but i don't know the real
> implication of this.
> Thanks!

Your English is slightly off so as to make it difficult to understand
precisely what you mean. One plug-in normally has no problem loading and
using class that are defined by another plugin so long as the other plugin
gives permission for those classes to be loaded.

What is your concern with classloaders? Are you trying to serialize
something?

--
Respectfully,

CL Gilbert
"Verily, verily, I say unto you, He that entereth not by the door() into the
sheepfold{}, but climbeth up some other *way, the same is a thief and a
robber."
Re: Possible to load a class from a plugin into another? [message #450953 is a reply to message #450940] Tue, 13 June 2006 03:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: diebosto.fi.vupv.es

"CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
news:e6kitc$4rn$1@utils.eclipse.org:

> Diego Bosca wrote:
>
>> I was wondering if there is any way to load classes to a plugin from
>> another plugin.
>> any great idea?
>> I know they have different classloaders, but i don't know the real
>> implication of this.
>> Thanks!
>
> Your English is slightly off so as to make it difficult to understand
> precisely what you mean. One plug-in normally has no problem loading
> and using class that are defined by another plugin so long as the
> other plugin gives permission for those classes to be loaded.
>
> What is your concern with classloaders? Are you trying to serialize
> something?
>

Excuse me for my english level :P
All that I want is to access an object created in a plugin and use it on
the RCP app.
The problem is when i add the plugin to the RCP build path as eclipse
suggests me. Then i have to remove all the dupplicate plugin dependencies
because it says that the references are duplicated.
Which inclusion method should i use if i want to get access to to the
plugin runtime objects? adding the plugin to the java build path or adding
it to the dependencies instead?
Thanks again
Re: Possible to load a class from a plugin into another? [message #450955 is a reply to message #450953] Tue, 13 June 2006 04:06 Go to previous messageGo to next message
Eclipse UserFriend
With plugins always use the dependencies.

Diego Bosca wrote:
> "CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
> news:e6kitc$4rn$1@utils.eclipse.org:
>
>> Diego Bosca wrote:
>>
>>> I was wondering if there is any way to load classes to a plugin from
>>> another plugin.
>>> any great idea?
>>> I know they have different classloaders, but i don't know the real
>>> implication of this.
>>> Thanks!
>> Your English is slightly off so as to make it difficult to understand
>> precisely what you mean. One plug-in normally has no problem loading
>> and using class that are defined by another plugin so long as the
>> other plugin gives permission for those classes to be loaded.
>>
>> What is your concern with classloaders? Are you trying to serialize
>> something?
>>
>
> Excuse me for my english level :P
> All that I want is to access an object created in a plugin and use it on
> the RCP app.
> The problem is when i add the plugin to the RCP build path as eclipse
> suggests me. Then i have to remove all the dupplicate plugin dependencies
> because it says that the references are duplicated.
> Which inclusion method should i use if i want to get access to to the
> plugin runtime objects? adding the plugin to the java build path or adding
> it to the dependencies instead?
> Thanks again
>
>
Re: Possible to load a class from a plugin into another? [message #450956 is a reply to message #450955] Tue, 13 June 2006 04:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: diebosto.fi.vupv.es

Stefan Langer <eclipse@bettsockentraeger.de> wrote in
news:e6lrhu$3lv$2@utils.eclipse.org:

> With plugins always use the dependencies.
>
> Diego Bosca wrote:
>> "CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
>> news:e6kitc$4rn$1@utils.eclipse.org:
>>
>>> Diego Bosca wrote:
>>>
>>>> I was wondering if there is any way to load classes to a plugin
>>>> from another plugin.
>>>> any great idea?
>>>> I know they have different classloaders, but i don't know the real
>>>> implication of this.
>>>> Thanks!
>>> Your English is slightly off so as to make it difficult to
>>> understand precisely what you mean. One plug-in normally has no
>>> problem loading and using class that are defined by another plugin
>>> so long as the other plugin gives permission for those classes to be
>>> loaded.
>>>
>>> What is your concern with classloaders? Are you trying to serialize
>>> something?
>>>
>>
>> Excuse me for my english level :P
>> All that I want is to access an object created in a plugin and use it
>> on the RCP app.
>> The problem is when i add the plugin to the RCP build path as eclipse
>> suggests me. Then i have to remove all the dupplicate plugin
>> dependencies because it says that the references are duplicated.
>> Which inclusion method should i use if i want to get access to to the
>> plugin runtime objects? adding the plugin to the java build path or
>> adding it to the dependencies instead?
>> Thanks again
>>
>>
>

But it still says that i'm forbidden to access to the plugin's classes.
When i add the dependency Eclipse adds to the java build path a rule in
for the plugin that is "forbidden **/*"
How can i get rid of it?
Re: Possible to load a class from a plugin into another? [message #450957 is a reply to message #450956] Tue, 13 June 2006 04:42 Go to previous messageGo to next message
Eclipse UserFriend
Then the class you are trying to access is not exposed by the plugin.
The plugin must specify the package as exported in its manifest.
Look at the manifest of the plugin you are trying to access and look at the
Export-Package:
If the package you are trying to access is not declared here than you
are not allowed to access it.

Regards
Stefan

Diego Bosca wrote:
> Stefan Langer <eclipse@bettsockentraeger.de> wrote in
> news:e6lrhu$3lv$2@utils.eclipse.org:
>
>> With plugins always use the dependencies.
>>
>> Diego Bosca wrote:
>>> "CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
>>> news:e6kitc$4rn$1@utils.eclipse.org:
>>>
>>>> Diego Bosca wrote:
>>>>
>>>>> I was wondering if there is any way to load classes to a plugin
>>>>> from another plugin.
>>>>> any great idea?
>>>>> I know they have different classloaders, but i don't know the real
>>>>> implication of this.
>>>>> Thanks!
>>>> Your English is slightly off so as to make it difficult to
>>>> understand precisely what you mean. One plug-in normally has no
>>>> problem loading and using class that are defined by another plugin
>>>> so long as the other plugin gives permission for those classes to be
>>>> loaded.
>>>>
>>>> What is your concern with classloaders? Are you trying to serialize
>>>> something?
>>>>
>>> Excuse me for my english level :P
>>> All that I want is to access an object created in a plugin and use it
>>> on the RCP app.
>>> The problem is when i add the plugin to the RCP build path as eclipse
>>> suggests me. Then i have to remove all the dupplicate plugin
>>> dependencies because it says that the references are duplicated.
>>> Which inclusion method should i use if i want to get access to to the
>>> plugin runtime objects? adding the plugin to the java build path or
>>> adding it to the dependencies instead?
>>> Thanks again
>>>
>>>
>
> But it still says that i'm forbidden to access to the plugin's classes.
> When i add the dependency Eclipse adds to the java build path a rule in
> for the plugin that is "forbidden **/*"
> How can i get rid of it?
Re: Possible to load a class from a plugin into another? [message #450959 is a reply to message #450957] Tue, 13 June 2006 04:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: diebosto.fi.vupv.es

Stefan Langer <eclipse@bettsockentraeger.de> wrote in
news:e6ltm6$qbv$1@utils.eclipse.org:

> Then the class you are trying to access is not exposed by the plugin.
> The plugin must specify the package as exported in its manifest.
> Look at the manifest of the plugin you are trying to access and look
> at the Export-Package:
> If the package you are trying to access is not declared here than you
> are not allowed to access it.
>
> Regards
> Stefan
>
> Diego Bosca wrote:
>> Stefan Langer <eclipse@bettsockentraeger.de> wrote in
>> news:e6lrhu$3lv$2@utils.eclipse.org:
>>
>>> With plugins always use the dependencies.
>>>
>>> Diego Bosca wrote:
>>>> "CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
>>>> news:e6kitc$4rn$1@utils.eclipse.org:
>>>>
>>>>> Diego Bosca wrote:
>>>>>
>>>>>> I was wondering if there is any way to load classes to a plugin
>>>>>> from another plugin.
>>>>>> any great idea?
>>>>>> I know they have different classloaders, but i don't know the
>>>>>> real implication of this.
>>>>>> Thanks!
>>>>> Your English is slightly off so as to make it difficult to
>>>>> understand precisely what you mean. One plug-in normally has no
>>>>> problem loading and using class that are defined by another plugin
>>>>> so long as the other plugin gives permission for those classes to
>>>>> be loaded.
>>>>>
>>>>> What is your concern with classloaders? Are you trying to
>>>>> serialize something?
>>>>>
>>>> Excuse me for my english level :P
>>>> All that I want is to access an object created in a plugin and use
>>>> it on the RCP app.
>>>> The problem is when i add the plugin to the RCP build path as
>>>> eclipse suggests me. Then i have to remove all the dupplicate
>>>> plugin dependencies because it says that the references are
>>>> duplicated. Which inclusion method should i use if i want to get
>>>> access to to the plugin runtime objects? adding the plugin to the
>>>> java build path or adding it to the dependencies instead?
>>>> Thanks again
>>>>
>>>>
>>
>> But it still says that i'm forbidden to access to the plugin's
>> classes. When i add the dependency Eclipse adds to the java build
>> path a rule in for the plugin that is "forbidden **/*"
>> How can i get rid of it?
>

It's not defined, but as the plugin was made by me so i think i should
change that...
What should i include into Export-Package?
thanks a lot for your help
Re: Possible to load a class from a plugin into another? [message #450961 is a reply to message #450959] Tue, 13 June 2006 05:24 Go to previous messageGo to next message
Eclipse UserFriend
Export-Package is what you specify on the runtime tab in the manifest
editor. (It's basically what your plugin provides to other plugins.)
Simply use the add button there and the manifest editor will show you
all the packages from your plugin that you might want to export.
You should include everything here that must be accessible from other
plugins.

Regards
STefan

Diego Bosca wrote:
> Stefan Langer <eclipse@bettsockentraeger.de> wrote in
> news:e6ltm6$qbv$1@utils.eclipse.org:
>
>> Then the class you are trying to access is not exposed by the plugin.
>> The plugin must specify the package as exported in its manifest.
>> Look at the manifest of the plugin you are trying to access and look
>> at the Export-Package:
>> If the package you are trying to access is not declared here than you
>> are not allowed to access it.
>>
>> Regards
>> Stefan
>>
>> Diego Bosca wrote:
>>> Stefan Langer <eclipse@bettsockentraeger.de> wrote in
>>> news:e6lrhu$3lv$2@utils.eclipse.org:
>>>
>>>> With plugins always use the dependencies.
>>>>
>>>> Diego Bosca wrote:
>>>>> "CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
>>>>> news:e6kitc$4rn$1@utils.eclipse.org:
>>>>>
>>>>>> Diego Bosca wrote:
>>>>>>
>>>>>>> I was wondering if there is any way to load classes to a plugin
>>>>>>> from another plugin.
>>>>>>> any great idea?
>>>>>>> I know they have different classloaders, but i don't know the
>>>>>>> real implication of this.
>>>>>>> Thanks!
>>>>>> Your English is slightly off so as to make it difficult to
>>>>>> understand precisely what you mean. One plug-in normally has no
>>>>>> problem loading and using class that are defined by another plugin
>>>>>> so long as the other plugin gives permission for those classes to
>>>>>> be loaded.
>>>>>>
>>>>>> What is your concern with classloaders? Are you trying to
>>>>>> serialize something?
>>>>>>
>>>>> Excuse me for my english level :P
>>>>> All that I want is to access an object created in a plugin and use
>>>>> it on the RCP app.
>>>>> The problem is when i add the plugin to the RCP build path as
>>>>> eclipse suggests me. Then i have to remove all the dupplicate
>>>>> plugin dependencies because it says that the references are
>>>>> duplicated. Which inclusion method should i use if i want to get
>>>>> access to to the plugin runtime objects? adding the plugin to the
>>>>> java build path or adding it to the dependencies instead?
>>>>> Thanks again
>>>>>
>>>>>
>>> But it still says that i'm forbidden to access to the plugin's
>>> classes. When i add the dependency Eclipse adds to the java build
>>> path a rule in for the plugin that is "forbidden **/*"
>>> How can i get rid of it?
>
> It's not defined, but as the plugin was made by me so i think i should
> change that...
> What should i include into Export-Package?
> thanks a lot for your help
Re: Possible to load a class from a plugin into another? [message #450962 is a reply to message #450961] Tue, 13 June 2006 05:44 Go to previous message
Eclipse UserFriend
Originally posted by: diebosto.fi.vupv.es

Thanks a lot, i managed already to include the packages hardcoded, but
this method is better :D

It works fine now, thanks for your help!

Stefan Langer <eclipse@bettsockentraeger.de> wrote in news:e6m04h$bqn$1
@utils.eclipse.org:

> Export-Package is what you specify on the runtime tab in the manifest
> editor. (It's basically what your plugin provides to other plugins.)
> Simply use the add button there and the manifest editor will show you
> all the packages from your plugin that you might want to export.
> You should include everything here that must be accessible from other
> plugins.
>
> Regards
> STefan
>
> Diego Bosca wrote:
>> Stefan Langer <eclipse@bettsockentraeger.de> wrote in
>> news:e6ltm6$qbv$1@utils.eclipse.org:
>>
>>> Then the class you are trying to access is not exposed by the plugin.
>>> The plugin must specify the package as exported in its manifest.
>>> Look at the manifest of the plugin you are trying to access and look
>>> at the Export-Package:
>>> If the package you are trying to access is not declared here than you
>>> are not allowed to access it.
>>>
>>> Regards
>>> Stefan
>>>
>>> Diego Bosca wrote:
>>>> Stefan Langer <eclipse@bettsockentraeger.de> wrote in
>>>> news:e6lrhu$3lv$2@utils.eclipse.org:
>>>>
>>>>> With plugins always use the dependencies.
>>>>>
>>>>> Diego Bosca wrote:
>>>>>> "CL [dnoyeb] Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in
>>>>>> news:e6kitc$4rn$1@utils.eclipse.org:
>>>>>>
>>>>>>> Diego Bosca wrote:
>>>>>>>
>>>>>>>> I was wondering if there is any way to load classes to a plugin
>>>>>>>> from another plugin.
>>>>>>>> any great idea?
>>>>>>>> I know they have different classloaders, but i don't know the
>>>>>>>> real implication of this.
>>>>>>>> Thanks!
>>>>>>> Your English is slightly off so as to make it difficult to
>>>>>>> understand precisely what you mean. One plug-in normally has no
>>>>>>> problem loading and using class that are defined by another
plugin
>>>>>>> so long as the other plugin gives permission for those classes to
>>>>>>> be loaded.
>>>>>>>
>>>>>>> What is your concern with classloaders? Are you trying to
>>>>>>> serialize something?
>>>>>>>
>>>>>> Excuse me for my english level :P
>>>>>> All that I want is to access an object created in a plugin and use
>>>>>> it on the RCP app.
>>>>>> The problem is when i add the plugin to the RCP build path as
>>>>>> eclipse suggests me. Then i have to remove all the dupplicate
>>>>>> plugin dependencies because it says that the references are
>>>>>> duplicated. Which inclusion method should i use if i want to get
>>>>>> access to to the plugin runtime objects? adding the plugin to the
>>>>>> java build path or adding it to the dependencies instead?
>>>>>> Thanks again
>>>>>>
>>>>>>
>>>> But it still says that i'm forbidden to access to the plugin's
>>>> classes. When i add the dependency Eclipse adds to the java build
>>>> path a rule in for the plugin that is "forbidden **/*"
>>>> How can i get rid of it?
>>
>> It's not defined, but as the plugin was made by me so i think i should
>> change that...
>> What should i include into Export-Package?
>> thanks a lot for your help
>
Previous Topic:jibx bytecode manipulation and RCP export
Next Topic:Display tab width in preferences
Goto Forum:
  


Current Time: Sun Nov 09 03:54:17 EST 2025

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

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

Back to the top