Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse Plugin Development
Eclipse Plugin Development [message #101304] Mon, 12 September 2005 14:33 Go to next message
Eclipse UserFriend
Originally posted by: daniel.e.quintero.gmail.com

Hi

im working in producing a plug-in based
eclipse application, i was wondering if someone
can give me some insights in the following problems
i been having :

* Multiple Plugin Development
i have several plugins i created in my workspace
some control the upper level of functionality of
my application some provide the lower objects models.
Each set of plugins have configurations files and logging
files , some of these files are dependant of runtime so
are only dependant of relative URL to work .
when i try to use a plugin from another i get two possible
scenarios
In the first one the classpath dependant files are found
but the URL dependant files are not found.
In the second one the classpath dependant files are not found
but the URL dependans files are found.

So im wondering whats it the correct way to handle plug-in dependency
inside a workbench ???????

att
Diana villamil
Re: Eclipse Plugin Development [message #101341 is a reply to message #101304] Mon, 12 September 2005 16:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.nosse.gmx.net

Hi,

hopefully, my comments below are of some help to you.

-- markus

Daniel wrote:



> * Multiple Plugin Development
> i have several plugins i created in my workspace
> some control the upper level of functionality of
> my application some provide the lower objects models.

Plugin dependencies can be stated in the plugin manifest (plugin.xml)
using the
<requires> tag, under which you can nest <import tags like <import
plugin="...plugin id..." />

So all your upper level plugins which depend on your lower level plugin(s)
will have to import the lower level plugin.

> Each set of plugins have configurations files and logging
> files , some of these files are dependant of runtime so
> are only dependant of relative URL to work .
> when i try to use a plugin from another i get two possible
> scenarios

To find configuration files (which are part of the plugin installation
bundle), the getInstallURL() method of the PluginDescriptor object of your
plugin may be useful. Similarly, from the plugin object using method
getStateLocation(), you can get the plugin's state location, i.e. a folder
in the workspace.

Note that the class and method names are of Eclipse v2.1, and there have
some changes. But I am confident the concept remained the same
Re: Eclipse Plugin Development [message #101351 is a reply to message #101341] Mon, 12 September 2005 17:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.e.quintero.gmail.com

Hi ;)

Markus thanks for your help it helped me
sort out some of the problems however some of this
already persist, this is what happening

when i run a test case in the plugin it can find local files
for example plugin A depends from file A.txt and when i run a
local test case it works wonderfull.

However plugin B depends of plugin A when i run a testcase from
B it find A alright and can work with every packages A exports
but when it gets to the point where A has to look for file A.txt
A doesnt find it anymore... why does this happend ?

thanks again for your help on the first one markus

att,

Diana Villamil

Markus wrote:
> Hi,
> hopefully, my comments below are of some help to you.
>
> -- markus
>
> Daniel wrote:
>
>
>
>> * Multiple Plugin Development
>> i have several plugins i created in my workspace
>> some control the upper level of functionality of
>> my application some provide the lower objects models.
>
>
> Plugin dependencies can be stated in the plugin manifest (plugin.xml)
> using the <requires> tag, under which you can nest <import tags like
> <import plugin="...plugin id..." />
>
> So all your upper level plugins which depend on your lower level
> plugin(s) will have to import the lower level plugin.
>
>> Each set of plugins have configurations files and logging
>> files , some of these files are dependant of runtime so
>> are only dependant of relative URL to work .
>> when i try to use a plugin from another i get two possible
>> scenarios
>
>
> To find configuration files (which are part of the plugin installation
> bundle), the getInstallURL() method of the PluginDescriptor object of
> your plugin may be useful. Similarly, from the plugin object using
> method getStateLocation(), you can get the plugin's state location, i.e.
> a folder in the workspace.
> Note that the class and method names are of Eclipse v2.1, and there have
> some changes. But I am confident the concept remained the same
>
>
>
Re: Eclipse Plugin Development [message #101485 is a reply to message #101351] Tue, 13 September 2005 07:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.nosse.gmx.net

Hi,

what do you mean by "run a testcase"? Do you run a JUnit test case, do you
start a run-time workbench and test your plugins in this environment? I'd
also like to know how you access your A.txt file, do you open it as a
java.io.File, an eclipse IFile or do you use a classloader to get the file
as a resource (like ClassLoader.getResourceAsStream()).

In the latter case, be sure to use the correct classloader. As you may
know, each plugin has its dedicated classloader which you can obtain from
the plugin descriptor.

Another thing to consider is what you include in the binary distribution
of your plugin, but I think that is not your current concern. Still, you
may take a look at the build.properties file of your plugins to learn mor
about plugin packaging.

-- Markus

Daniel wrote:

> Hi ;)

> Markus thanks for your help it helped me
> sort out some of the problems however some of this
> already persist, this is what happening

> when i run a test case in the plugin it can find local files
> for example plugin A depends from file A.txt and when i run a
> local test case it works wonderfull.

> However plugin B depends of plugin A when i run a testcase from
> B it find A alright and can work with every packages A exports
> but when it gets to the point where A has to look for file A.txt
> A doesnt find it anymore... why does this happend ?

> thanks again for your help on the first one markus

> att,

> Diana Villamil
Re: Eclipse Plugin Development [message #102489 is a reply to message #101485] Fri, 16 September 2005 15:25 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.e.quintero.gmail.com

Thanks for you all your concern for circunstances out of my control
i have to leave the integration of my plugins aside for a while
meanwhile i fix some functionality concerns first.

However i am deeply thankfull for you all help
att,
Diana Villamil

Markus wrote:
> Hi,
>
> what do you mean by "run a testcase"? Do you run a JUnit test case, do
> you start a run-time workbench and test your plugins in this
> environment? I'd also like to know how you access your A.txt file, do
> you open it as a java.io.File, an eclipse IFile or do you use a
> classloader to get the file as a resource (like
> ClassLoader.getResourceAsStream()).
>
> In the latter case, be sure to use the correct classloader. As you may
> know, each plugin has its dedicated classloader which you can obtain
> from the plugin descriptor.
> Another thing to consider is what you include in the binary distribution
> of your plugin, but I think that is not your current concern. Still, you
> may take a look at the build.properties file of your plugins to learn
> mor about plugin packaging.
> -- Markus
>
> Daniel wrote:
>
>> Hi ;)
>
>
>> Markus thanks for your help it helped me
>> sort out some of the problems however some of this
>> already persist, this is what happening
>
>
>> when i run a test case in the plugin it can find local files
>> for example plugin A depends from file A.txt and when i run a
>> local test case it works wonderfull.
>
>
>> However plugin B depends of plugin A when i run a testcase from
>> B it find A alright and can work with every packages A exports
>> but when it gets to the point where A has to look for file A.txt
>> A doesnt find it anymore... why does this happend ?
>
>
>> thanks again for your help on the first one markus
>
>
>> att,
>
>
>> Diana Villamil
>
>
>
>
Previous Topic:global search
Next Topic:Problem starting 3.1 on Win2000 and VM1.5
Goto Forum:
  


Current Time: Thu Mar 28 09:26:18 GMT 2024

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

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

Back to the top