[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.dtp] Re: ODA Plugin Project Structure / References / Deployment
|
Chris,
These seem to be general PDE questions. The IDE help doc "Plug-in
Development Environment Guide" (see Help->Help Contents) has pretty good
info to start with.
By "standard Java project", do you mean your datacalc project is packaged in
a library jar file? It is a good practice to create a plug-in project to
*wrap* a library jar file, for use by other plugin projects. This way, you
don't need to make a copy of the library jar file to each of the plugin
projects that use it. And of course no need to change your existing project
packaging either.
Then specify in the manifest.mf of your datacalc.oda plugin (using the
plugin manifest editor's Dependencies tab to edit), its dependency on your
library jar wrapper plugin. This setup will let osgi take care of
resolving the classes and loading them as needed.
You can also create a plugin project to wrap your test library. Then
specify in its manifest.mf, the plugin dependencies on your datacalc.oda
plugin and all other dependencies For any packages in your datacalc.oda
plugin or other plugins that are accessed by your test code, you would want
to specifiy them in "Export-Package:" in the corresponding plugin
manifest.mf. (See the plugin manifest editor's Runtime tab.)
If your datacalc.oda plugin has specified dependencies on your
"DataCalculator" class library (or its wrapper plugin), there shouldn't be a
need to pass an instance of it thru the oda setAppContext method. Your test
case should be able to call the IQuery interface methods, whose
implementation in your datacalc.oda should then know to use your
"DataCalculator" classes.
You might want to take a look at the JUnit test cases for the DTP ODA
enablement data sources. They are in DTP CVS repository
(dev.eclipse.org:/cvsroot/datatools) under the
HEAD/org.eclipse.datatools.enablement/tests/ folder.
Linda