| problems adding an external plugin to an app [message #451245] |
Mon, 19 June 2006 12:03 |
Eclipse User |
|
|
|
summary: I have 2 working applications: one a headless RCP app, the
other Eclipse-based. Both work fine alone. I'm trying to add one
plugin from the non-RCP app to the RCP app. With my current packaging,
the RCP app
* builds in the workspace correctly
* does not export correctly
* launches correctly (after fixing the export problem)
* dies when the RCP app attempts to call code in the added-in plugin
details:
I'm running eclipse=3.2-RC7 on OS=RHL ES3 with java=Sun SDK 1.5.0_05.
I have
* a headless RCP app that builds code (call that "builder"). This app
contains features, one top-level, 6 nested.
* a non-RCP but Eclipse-based app that scans code (call it
"APIscanner"). This app has no features, and is typically run either
headlessly from the commandline or via UI that it contributes to an
eclipse workbench.
Both builder and APIscanner work fine by themselves. I want to
* add one plugin (call it "APIscan.plugin") from the non-RCP app to
the RCP app. Note that APIscan.plugin is headlessly runnable, and
has minimal dependencies: only
> Require-Bundle: org.eclipse.jdt.core,
> org.eclipse.core.runtime,
> org.eclipse.core.resources,
> org.eclipse.jface.text
* call code from a class in APIscan.plugin (call that "APIscanClass")
from a class (call that "BuilderScanClass") in the RCP app's main
plugin (call that "builder.plugin").
builder.plugin belongs to the RCP app's main feature (call that
"builder.feature"), so I decided to include APIscan.plugin in
builder.feature. APIscan.plugin already exposed all its packages, so I
just made builder.plugin require it. I then made BuilderScanClass
import APIscanClass, and built my eclipse workspace (with C-b): all
was well, so I wrote code that looked right, and (successfully) built
again. I noted that
* I was able to export and run builder before adding APIscan.plugin.
* builder's product (call that "builder.product") includes
builder.feature
* builder.feature included APIscan.plugin
* my workbench already contained all of APIscan.plugin's dependencies
so I then exported the new-and-improved builder. I then attempted to
run the resulting product, but it immediately died with a redX dialog
(actually red- in RHL) referencing ...runspace/.metadata/.log, which
contained lines like
!MESSAGE The following is a complete list of bundles which are not
resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2006-06-18 23:46:49.547
!MESSAGE Bundle update@plugins/APIscan.plugin_1.0.0.jar [18] was not
resolved.
!SUBENTRY 2 APIscan.plugin 2 0 2006-06-18 23:46:49.547
!MESSAGE Missing required bundle org.eclipse.jdt.core_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2006-06-18 23:46:49.547
!MESSAGE Bundle update@plugins/builder.plugin_3.0.0.200606122321/ [22]
was not resolved.
!SUBENTRY 2 builder.plugin 2 0 2006-06-18 23:46:49.548
!MESSAGE Missing required bundle APIscan.plugin_0.0.0.
I checked, and strangely enough org.eclipse.jdt.core*.jar was indeed
NOT in ...export/dir/plugins! I figured, "what the hell," and just did
cp
/path/to/my/eclipse-3.2-RC7-linux-gtk/eclipse/plugins/org.ec lipse.jdt.core_3.2.0.v_670.jar
/path/to/export/dir/plugins/
I then re-ran the exported product: it started, and showed activity in
the console (to which it writes for debugging)! But then, as soon as
it got to the place where BuilderScanClass calls APIscanClass, it died
with the same redX and the same contents in ...runspace/.metadata/.log!
Which makes no sense: I checked, and /path/to/export/dir/plugins/ does
in fact contain org.eclipse.jdt.core_3.2.0.v_670.jar.
So I'm wondering: what's the fix? Is something wrong with my
packaging? or with the exporter? or something completely different?
Your assistance is appreciated. Please reply directly to me (as well
as the newsgroup) if possible, feel free to forward, and TIA,
Tom Roche <tlroche@us.ibm.com>
|
|
|
Powered by
FUDForum. Page generated in 0.03232 seconds