Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Single Sourcing - Fragment Project question
Single Sourcing - Fragment Project question [message #138045] Fri, 26 June 2009 03:23 Go to next message
Eclipse UserFriend
Originally posted by: michael.suwiryo.siemens.com

Hi,

I'm trying to make single sourcing on our RCP and RAP application. Basically
I'm using fragment plugin project to separate any API differences between
RCP and RAP.

I encounter some issue when trying to access concrete class defined in the
fragment plugin from within my host plugin. I get 'class can't be resolved'
error.

However, I don't have any problem accessing concrete class from host plugin
in the fragment plugin.

Is there anything I miss here when creating fragment project? Thanks.

Regards,
Michael Suwiryo
Re: Single Sourcing - Fragment Project question [message #138056 is a reply to message #138045] Fri, 26 June 2009 04:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-dev.volanakis.de

Hi Michael,

the only way to have plug-in code call fragment-code is to use reflection.

The reason is that the fragment classes are only available on the
plug-in classpath at runtime.

By design, there is no way for the plug-in to know which fragments to it
exist at compile time. In other words: if you look at the MANIFEST.MFs,
you can see that the fragment knows it's host plugin, but the host
plugin does not know it's fragments.

Hope this helps,
Elias.

Michael Suwiryo wrote:
> Hi,
>
> I'm trying to make single sourcing on our RCP and RAP application. Basically
> I'm using fragment plugin project to separate any API differences between
> RCP and RAP.
>
> I encounter some issue when trying to access concrete class defined in the
> fragment plugin from within my host plugin. I get 'class can't be resolved'
> error.
>
> However, I don't have any problem accessing concrete class from host plugin
> in the fragment plugin.
>
> Is there anything I miss here when creating fragment project? Thanks.
>
> Regards,
> Michael Suwiryo
>
>
>
>
Re: Single Sourcing - Fragment Project question [message #138450 is a reply to message #138056] Sat, 27 June 2009 19:10 Go to previous message
Eclipse UserFriend
Originally posted by: michael.suwiryo.siemens.com

That makes sense. Thanks, Elias.

Regards,
Michael

"Elias Volanakis" <eclipse-dev@volanakis.de> wrote in message
news:h21hg4$qre$1@build.eclipse.org...
> Hi Michael,
>
> the only way to have plug-in code call fragment-code is to use reflection.
>
> The reason is that the fragment classes are only available on the plug-in
> classpath at runtime.
>
> By design, there is no way for the plug-in to know which fragments to it
> exist at compile time. In other words: if you look at the MANIFEST.MFs,
> you can see that the fragment knows it's host plugin, but the host plugin
> does not know it's fragments.
>
> Hope this helps,
> Elias.
>
> Michael Suwiryo wrote:
>> Hi,
>>
>> I'm trying to make single sourcing on our RCP and RAP application.
>> Basically I'm using fragment plugin project to separate any API
>> differences between RCP and RAP.
>>
>> I encounter some issue when trying to access concrete class defined in
>> the fragment plugin from within my host plugin. I get 'class can't be
>> resolved' error.
>>
>> However, I don't have any problem accessing concrete class from host
>> plugin in the fragment plugin.
>>
>> Is there anything I miss here when creating fragment project? Thanks.
>>
>> Regards,
>> Michael Suwiryo
>>
>>
>>
Previous Topic:RowLayout wrapping issue after structural changes
Next Topic:Question about the RAP deployment, help!
Goto Forum:
  


Current Time: Fri Apr 19 11:25:02 GMT 2024

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

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

Back to the top