Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » project setup and layout questions
project setup and layout questions [message #515833] Sun, 21 February 2010 15:32 Go to next message
Eclipse UserFriend
Originally posted by: jann.schneider.googlemail.com

Hello,

I'm new to RCP and therefore have some 'beginner' questions. I've read
some tutorials showing how to use RCP and stuff .. But some questions
are not quite clear to me now since they are just showing how to create
a product with just one plugin.
For better understanding my problems here some detaills of what i want
to do: I've an application which i want to turn into a multi plugin rCP
app now. It consists of some model packages, some GUI packages, some for
datamanagement and a view more. Now i am wondering how to setup my
project so, that i can build up several plugins for the told things.

In my understanding i need to setup a product project which puts things
together later on. But i am just confused how to setup the single plugin
projects now.

First of all, I guess the plugins just have to be kinda OSGi bundles and
i don't have to check 'build a rcp application' when creating them. Only
the main Plugin holding the application will have to be an RCP
application, right?

Lets say i create a plugin org.example.model and anotherone
org.example.datamanagement which should use some stuff from the model one.

In the product it's clear to me how to pput them together later on. But
i am wondering how to avoid retundand references between the single
plugins and the product then. Should org.example.datamanagement then
import-package org.example.model and the product needs to import both of
them?

Another question is about testing the application then: I'd guess i have
to create a folder in my product project and export all plugins to this
folder and let the product refer to the plugins in this folder then. Is
it that way or do i just miss something here?
I mean if i wanna create run configurations to check the application is
it necessary to export all plugins before to the folder then?

Sorry for such beginner stuff, but i am hopeful this is the right place
to ask :-)

Could you please give me some hints or links for further reading of how
to acheave such things?

Any help is greatly appriciated!

Thanks in advance,
Jann
Re: project setup and layout questions [message #515857 is a reply to message #515833] Sun, 21 February 2010 20:18 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Jann,

Assuming that you are using the new plugin wizard to create your
plugins, each plugin will contain a META-INF folder with a MANIFEST.MF file.

The eclipse IDE contains a manifest editor. It helps to manage
dependencies among plugins (all plugins are OSGI bundles).

On the "Dependencies" tab of the manifest editor you can list the
dependencies among your plugins.

From you description, your rcp plugin will depend upon both your
data-management plugin and your model plugin. If the datamanagement
depends upon the model, you can specify this in the manifest of the
datamanagement plugin.

You are correct that only your rcp plugin should be built with the
"build an rcp application" option.

Hope this helps.

Charlie

Jann S. wrote:
> Hello,
>
> I'm new to RCP and therefore have some 'beginner' questions. I've read
> some tutorials showing how to use RCP and stuff .. But some questions
> are not quite clear to me now since they are just showing how to create
> a product with just one plugin.
> For better understanding my problems here some detaills of what i want
> to do: I've an application which i want to turn into a multi plugin rCP
> app now. It consists of some model packages, some GUI packages, some for
> datamanagement and a view more. Now i am wondering how to setup my
> project so, that i can build up several plugins for the told things.
>
> In my understanding i need to setup a product project which puts things
> together later on. But i am just confused how to setup the single plugin
> projects now.
>
> First of all, I guess the plugins just have to be kinda OSGi bundles and
> i don't have to check 'build a rcp application' when creating them. Only
> the main Plugin holding the application will have to be an RCP
> application, right?
>
> Lets say i create a plugin org.example.model and anotherone
> org.example.datamanagement which should use some stuff from the model one.
>
> In the product it's clear to me how to pput them together later on. But
> i am wondering how to avoid retundand references between the single
> plugins and the product then. Should org.example.datamanagement then
> import-package org.example.model and the product needs to import both of
> them?
>
> Another question is about testing the application then: I'd guess i have
> to create a folder in my product project and export all plugins to this
> folder and let the product refer to the plugins in this folder then. Is
> it that way or do i just miss something here?
> I mean if i wanna create run configurations to check the application is
> it necessary to export all plugins before to the folder then?
>
> Sorry for such beginner stuff, but i am hopeful this is the right place
> to ask :-)
>
> Could you please give me some hints or links for further reading of how
> to acheave such things?
>
> Any help is greatly appriciated!
>
> Thanks in advance,
> Jann
Re: project setup and layout questions [message #515867 is a reply to message #515857] Sun, 21 February 2010 22:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jann.schneider.googlemail.com

Hi charlie,

thanks! This helped me to get my application working basically. The
classes from the several plugins are found and loaded fine now!
Only thing that doesn't work currently is loading of resources like xml
files or other files included in the plugins.
I have achieved to export my plugins and can see, the datamanagement
plugin included the data folder with the according xml files. How can i
load such files from the plugin containing them at runtime?
I guess i need to get it via the bundle activator or some such?
Currently it just throws up an IOException .. So in the project folder
of the plugin i have a data/ folder containing xml files which have to
be loaded at runtime. When i export my plugins on the build tab i added
this folder and if i open the resulting jar it looks like the files are
included.

Thanks in advance!
regards Jann


Am 21.02.2010 21:18, schrieb exquisitus:
> Hi Jann,
>
> Assuming that you are using the new plugin wizard to create your
> plugins, each plugin will contain a META-INF folder with a MANIFEST.MF
> file.
>
> The eclipse IDE contains a manifest editor. It helps to manage
> dependencies among plugins (all plugins are OSGI bundles).
>
> On the "Dependencies" tab of the manifest editor you can list the
> dependencies among your plugins.
>
> From you description, your rcp plugin will depend upon both your
> data-management plugin and your model plugin. If the datamanagement
> depends upon the model, you can specify this in the manifest of the
> datamanagement plugin.
>
> You are correct that only your rcp plugin should be built with the
> "build an rcp application" option.
>
> Hope this helps.
>
> Charlie
>
> Jann S. wrote:
>> Hello,
>>
>> I'm new to RCP and therefore have some 'beginner' questions. I've read
>> some tutorials showing how to use RCP and stuff .. But some questions
>> are not quite clear to me now since they are just showing how to
>> create a product with just one plugin.
>> For better understanding my problems here some detaills of what i want
>> to do: I've an application which i want to turn into a multi plugin
>> rCP app now. It consists of some model packages, some GUI packages,
>> some for datamanagement and a view more. Now i am wondering how to
>> setup my project so, that i can build up several plugins for the told
>> things.
>>
>> In my understanding i need to setup a product project which puts
>> things together later on. But i am just confused how to setup the
>> single plugin projects now.
>>
>> First of all, I guess the plugins just have to be kinda OSGi bundles
>> and i don't have to check 'build a rcp application' when creating
>> them. Only the main Plugin holding the application will have to be an
>> RCP application, right?
>>
>> Lets say i create a plugin org.example.model and anotherone
>> org.example.datamanagement which should use some stuff from the model
>> one.
>>
>> In the product it's clear to me how to pput them together later on.
>> But i am wondering how to avoid retundand references between the
>> single plugins and the product then. Should org.example.datamanagement
>> then import-package org.example.model and the product needs to import
>> both of them?
>>
>> Another question is about testing the application then: I'd guess i
>> have to create a folder in my product project and export all plugins
>> to this folder and let the product refer to the plugins in this folder
>> then. Is it that way or do i just miss something here?
>> I mean if i wanna create run configurations to check the application
>> is it necessary to export all plugins before to the folder then?
>>
>> Sorry for such beginner stuff, but i am hopeful this is the right
>> place to ask :-)
>>
>> Could you please give me some hints or links for further reading of
>> how to acheave such things?
>>
>> Any help is greatly appriciated!
>>
>> Thanks in advance,
>> Jann
Re: project setup and layout questions [message #515874 is a reply to message #515867] Sun, 21 February 2010 23:59 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Jenn,

If you double-click on the build.properties file in you plugin,
a "Build Properties Editor" will open the file.

Under "Binary Build" check the folder that includes your XML files.
Then see FileLocator() to acquire the files at run time.

Charlie

Jann S. wrote:
> Hi charlie,
>
> thanks! This helped me to get my application working basically. The
> classes from the several plugins are found and loaded fine now!
> Only thing that doesn't work currently is loading of resources like xml
> files or other files included in the plugins.
> I have achieved to export my plugins and can see, the datamanagement
> plugin included the data folder with the according xml files. How can i
> load such files from the plugin containing them at runtime?
> I guess i need to get it via the bundle activator or some such?
> Currently it just throws up an IOException .. So in the project folder
> of the plugin i have a data/ folder containing xml files which have to
> be loaded at runtime. When i export my plugins on the build tab i added
> this folder and if i open the resulting jar it looks like the files are
> included.
>
> Thanks in advance!
> regards Jann
>
>
> Am 21.02.2010 21:18, schrieb exquisitus:
>> Hi Jann,
>>
>> Assuming that you are using the new plugin wizard to create your
>> plugins, each plugin will contain a META-INF folder with a MANIFEST.MF
>> file.
>>
>> The eclipse IDE contains a manifest editor. It helps to manage
>> dependencies among plugins (all plugins are OSGI bundles).
>>
>> On the "Dependencies" tab of the manifest editor you can list the
>> dependencies among your plugins.
>>
>> From you description, your rcp plugin will depend upon both your
>> data-management plugin and your model plugin. If the datamanagement
>> depends upon the model, you can specify this in the manifest of the
>> datamanagement plugin.
>>
>> You are correct that only your rcp plugin should be built with the
>> "build an rcp application" option.
>>
>> Hope this helps.
>>
>> Charlie
>>
>> Jann S. wrote:
>>> Hello,
>>>
>>> I'm new to RCP and therefore have some 'beginner' questions. I've read
>>> some tutorials showing how to use RCP and stuff .. But some questions
>>> are not quite clear to me now since they are just showing how to
>>> create a product with just one plugin.
>>> For better understanding my problems here some detaills of what i want
>>> to do: I've an application which i want to turn into a multi plugin
>>> rCP app now. It consists of some model packages, some GUI packages,
>>> some for datamanagement and a view more. Now i am wondering how to
>>> setup my project so, that i can build up several plugins for the told
>>> things.
>>>
>>> In my understanding i need to setup a product project which puts
>>> things together later on. But i am just confused how to setup the
>>> single plugin projects now.
>>>
>>> First of all, I guess the plugins just have to be kinda OSGi bundles
>>> and i don't have to check 'build a rcp application' when creating
>>> them. Only the main Plugin holding the application will have to be an
>>> RCP application, right?
>>>
>>> Lets say i create a plugin org.example.model and anotherone
>>> org.example.datamanagement which should use some stuff from the model
>>> one.
>>>
>>> In the product it's clear to me how to pput them together later on.
>>> But i am wondering how to avoid retundand references between the
>>> single plugins and the product then. Should org.example.datamanagement
>>> then import-package org.example.model and the product needs to import
>>> both of them?
>>>
>>> Another question is about testing the application then: I'd guess i
>>> have to create a folder in my product project and export all plugins
>>> to this folder and let the product refer to the plugins in this folder
>>> then. Is it that way or do i just miss something here?
>>> I mean if i wanna create run configurations to check the application
>>> is it necessary to export all plugins before to the folder then?
>>>
>>> Sorry for such beginner stuff, but i am hopeful this is the right
>>> place to ask :-)
>>>
>>> Could you please give me some hints or links for further reading of
>>> how to acheave such things?
>>>
>>> Any help is greatly appriciated!
>>>
>>> Thanks in advance,
>>> Jann
Re: project setup and layout questions [message #516073 is a reply to message #515867] Mon, 22 February 2010 16:51 Go to previous message
Eclipse UserFriend
Originally posted by: jann.schneider.googlemail.com

Hello,

THX Charlie! This works fine for me. I am no able to find my xml files
via the FileLocator class:

InputStream is = FileLocator.openStream(bundle, file, false);
....

And got the data correctly!

Regards Jann!
Previous Topic:Adding a search box to main toolbar ?
Next Topic:Remotely killing RCP Application
Goto Forum:
  


Current Time: Tue Apr 23 16:40:29 GMT 2024

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

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

Back to the top