Home » Eclipse Projects » Eclipse Platform » Plugin depends on other project
Plugin depends on other project [message #151695] |
Thu, 30 October 2003 21:02  |
Eclipse User |
|
|
|
Originally posted by: asdf.nospam.com
Hi,
I am having some trouble with a plugin-integration feature. We have an
application and are building an Eclipse plugin to integrate this. Initially
I tried making the application project a PDE but decided that keeping the
plugin separate would be cleaner.
Anyway, after some attempts I've specified in the plugin manifest Runtime
section a Library of ../OurAppProject/classes as code & resources for
export. No package names are specified as packages from the library are not
appearing...
The plugin is visible but fails to run with 'unhandled exception' messages
and reasons referring to our basic utility classes. com/sce/Utils,
com/sce/PseudoItem etc. These are basic classes and have little opportunity
to fail; I think they may not be accessible to the plugin/ classloader at
runtime.
The plugin system allows plugins to depend (and import) other plugins.
However we wish to depend on the OurAppProject, and preferably as directly
compiled so we can develop both simultaneously. Java projects can have
dependency on other projects but the plugin manifest editor overwrites and
clear this.
So, question: What is the correct way to structure our integration plugin
and make the 'main body' of application code available at runtime?
And if I have to JAR up the application to provide it for the plugin, what
is the best way to automate that from within Eclipse?
--
Earlier plugin experience also found some problems with the launched Eclipse
test environments from my primary Eclipse install (2.1.1). My plugins did
not appear in
the UI, nor did template plugins generated by the wizard, and the Eclipse
About box omitted graphics and Eclipse itself (!) from the About Features
list. However the plugins were listed in the About Plugins list.
After some hours I installed a new copy of Eclipse 2.1.1 in another
directory. With this new install the wizard-generated template plugins were
visible. However after some progress runtime problems began to appear again;
these are intermittent and seem to have left now :-)( Currently I am working
with Eclipse 3.0M4 and making some progress.
I have also seen Eclipse become unhappy with Perspectives/ Views
configuration after what should have been a small plugin error, and fail to
reload these or other OK plugins or occasionally much 'core' Eclipse stuff
when restarted.
Any suggestions as to what might be disturbing the 'Run-time Workbench'
launch and environments, or how I can improve the general reliablity of my
development environment?
Assistance much appreciated,
Regards,
Thomas
|
|
|
Re: Plugin depends on other project [message #151980 is a reply to message #151695] |
Fri, 31 October 2003 16:46   |
Eclipse User |
|
|
|
Originally posted by: meshcheryakovsemen.hotmail.com
Thomas,
What is the Plugin?
I would give such a partial definition of plugin (it's freaky, but I've seen
only definitions-by-example:)
- plugin includes by VALUE: classes, libraries, files FROM THE PLUGIN
PROJECT
- plugin includes by VALUE: fragments FROM FRAGMENT PROJECTS
- plugin uses by REFERENCE: exported parts of other plugins - resources,
libraries, entry points, etc.
To understand better plugin's lifrcycle, make a difference between:
- build environment
- classes' are resolved from .classpath
- it's possible to use classes from another regular project
PROVIDING THAT THEY WILL BE ACCESSIBLE DURING RUNTIME
- runtime environment (development)
- classes are in plugins' jars
- plugins from workspace are located in their projects, classes - in the
projects' outpot dirs
- WHERE IS THE PROPER PLACE FOR THE CLASSES FROM ANOTHER PROJECTS?
- runtime environment (release)
- classes are in plugins' jars
Best regards,
-- Sam
It's better to view source code than comments to it.
"random_uv" <asdf@nospam.com> wrote in message
news:bnsfpt$qhe$1@eclipse.org...
> Hi,
>
> I am having some trouble with a plugin-integration feature. We have an
> application and are building an Eclipse plugin to integrate this.
Initially
> I tried making the application project a PDE but decided that keeping the
> plugin separate would be cleaner.
>
> Anyway, after some attempts I've specified in the plugin manifest Runtime
> section a Library of ../OurAppProject/classes as code & resources for
> export. No package names are specified as packages from the library are
not
> appearing...
>
> The plugin is visible but fails to run with 'unhandled exception' messages
> and reasons referring to our basic utility classes. com/sce/Utils,
> com/sce/PseudoItem etc. These are basic classes and have little
opportunity
> to fail; I think they may not be accessible to the plugin/ classloader at
> runtime.
>
> The plugin system allows plugins to depend (and import) other plugins.
> However we wish to depend on the OurAppProject, and preferably as directly
> compiled so we can develop both simultaneously. Java projects can have
> dependency on other projects but the plugin manifest editor overwrites and
> clear this.
>
> So, question: What is the correct way to structure our integration plugin
> and make the 'main body' of application code available at runtime?
>
> And if I have to JAR up the application to provide it for the plugin, what
> is the best way to automate that from within Eclipse?
>
> --
>
> Earlier plugin experience also found some problems with the launched
Eclipse
> test environments from my primary Eclipse install (2.1.1). My plugins did
> not appear in
> the UI, nor did template plugins generated by the wizard, and the Eclipse
> About box omitted graphics and Eclipse itself (!) from the About Features
> list. However the plugins were listed in the About Plugins list.
>
> After some hours I installed a new copy of Eclipse 2.1.1 in another
> directory. With this new install the wizard-generated template plugins
were
> visible. However after some progress runtime problems began to appear
again;
> these are intermittent and seem to have left now :-)( Currently I am
working
> with Eclipse 3.0M4 and making some progress.
>
> I have also seen Eclipse become unhappy with Perspectives/ Views
> configuration after what should have been a small plugin error, and fail
to
> reload these or other OK plugins or occasionally much 'core' Eclipse stuff
> when restarted.
>
> Any suggestions as to what might be disturbing the 'Run-time Workbench'
> launch and environments, or how I can improve the general reliablity of my
> development environment?
>
> Assistance much appreciated,
>
>
> Regards,
> Thomas
>
>
|
|
|
Re: Plugin depends on other project; Rich Kulp? [message #152079 is a reply to message #151980] |
Sat, 01 November 2003 23:11   |
Eclipse User |
|
|
|
Originally posted by: asdf.nospam.com
Hi Smesh,
Thanks for your help. The application is a database & database access tool
for which we are working on Eclipse integration.
> - WHERE IS THE PROPER PLACE FOR THE CLASSES FROM ANOTHER PROJECTS?
> - runtime environment (release)
> - classes are in plugins' jars
OK, I get you're saying that the application classes from the 'main body' of
our app should be JAR'ed up and referenced as a library for the plugin.
So when I try that I can manually make a JAR file containing all application
classes; but neither referencing this in plugin.xml Runtime (libraries) nor
in Build Properties (classpath) seems to work.
I've got the hang of my news reader now and searched thru this forum. I can
see a more than a few posts asking about plugins referencing library/ icon
JARs, etc. But nothing that says how such a reference to a JAR (or class
folder location, or external project) should be specified to work at
runtime.
Could Mr Kulp provide any illumination on this subject?
In the plugin.xml Runtime editor I'm creating libraries and using 'rename'
to set the filename as 'library name' - there doesn't seem to be anywhere
else to specify this. I'm trying class folders, JARs, relative paths,
absolute paths, forward slashes, back slashes, none of it seems to work in
the Runtime Workbench and the 'package selection' list isn't picking up
anything from my main app either.
Simple Question.
From my plugin, how do I reference a library JAR so that the library classes
are available in the Runtime Workbench?
For further detail, the error message I see is:
Unhandled exception caught in event loop.
Reason:
com/sce/PseudoItem
which I'm pretty is a classloading failure. I'd be interested to inspect the
classpath within the runtime workbench, if there was a way to do that.
I'd also be interested in confirmation or discussion of 'build properties'
for the app main project as a means of auto-building a JAR for the main app;
and whether this applies to Java or just PDE projects.
Answers to my main question, and also other assistance, much appreciated.
Regards,
Thomas
|
|
|
Re: Plugin depends on other project; Rich Kulp? [message #152146 is a reply to message #152079] |
Sun, 02 November 2003 13:20   |
Eclipse User |
|
|
|
Originally posted by: evan_yap.mindspring.com
have you tried creating a library plugin for your code
(substitute #.#.# below with appropriate values like 1.0.0)?
<plugin
name="Your App Name"
id="com.yourcompany.yourapp"
version="#.#.#"
provider-name="com.yourcompany">
<runtime>
<library name="yourapp.jar">
<export name="*" />
</library>
</runtime>
</plugin>
then in the referring plugin.xml (the manifest for the plugin
that would be using your app), add it as a required plugin
<requires>
....
<import plugin="com.yourcompany.yourapp" />
</requires>
"random_uv" <asdf@nospam.com> wrote in message
news:bo2036$1i3$1@eclipse.org...
> Hi Smesh,
>
> Thanks for your help. The application is a database & database access tool
> for which we are working on Eclipse integration.
>
> > - WHERE IS THE PROPER PLACE FOR THE CLASSES FROM ANOTHER PROJECTS?
> > - runtime environment (release)
> > - classes are in plugins' jars
>
> OK, I get you're saying that the application classes from the 'main body'
of
> our app should be JAR'ed up and referenced as a library for the plugin.
>
> So when I try that I can manually make a JAR file containing all
application
> classes; but neither referencing this in plugin.xml Runtime (libraries)
nor
> in Build Properties (classpath) seems to work.
>
> I've got the hang of my news reader now and searched thru this forum. I
can
> see a more than a few posts asking about plugins referencing library/ icon
> JARs, etc. But nothing that says how such a reference to a JAR (or class
> folder location, or external project) should be specified to work at
> runtime.
>
> Could Mr Kulp provide any illumination on this subject?
>
> In the plugin.xml Runtime editor I'm creating libraries and using 'rename'
> to set the filename as 'library name' - there doesn't seem to be anywhere
> else to specify this. I'm trying class folders, JARs, relative paths,
> absolute paths, forward slashes, back slashes, none of it seems to work in
> the Runtime Workbench and the 'package selection' list isn't picking up
> anything from my main app either.
>
> Simple Question.
>
> From my plugin, how do I reference a library JAR so that the library
classes
> are available in the Runtime Workbench?
>
>
> For further detail, the error message I see is:
> Unhandled exception caught in event loop.
> Reason:
> com/sce/PseudoItem
>
> which I'm pretty is a classloading failure. I'd be interested to inspect
the
> classpath within the runtime workbench, if there was a way to do that.
>
> I'd also be interested in confirmation or discussion of 'build properties'
> for the app main project as a means of auto-building a JAR for the main
app;
> and whether this applies to Java or just PDE projects.
>
> Answers to my main question, and also other assistance, much appreciated.
>
>
> Regards,
> Thomas
>
>
|
|
| |
Re: Plugin depends on other project; Rich Kulp? [message #152190 is a reply to message #152146] |
Sun, 02 November 2003 17:56  |
Eclipse User |
|
|
|
Originally posted by: asdf.nospam.com
OK Evan,
We seem to be getting some progress with this. Got the basic link working
with the app classes loading and the app opening.
Even the libraries on which the app depends seem to be available to it so
this is good progress.
Thanks a lot for both of you guys who helped me.
Regards,
Thomas
|
|
|
Goto Forum:
Current Time: Wed Jun 18 02:30:55 EDT 2025
Powered by FUDForum. Page generated in 0.04104 seconds
|