Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Combining plugin projects and regular Java projects -- need best practices
Combining plugin projects and regular Java projects -- need best practices [message #335448] Wed, 08 April 2009 19:39 Go to next message
Dave is currently offline DaveFriend
Messages: 11
Registered: July 2009
Junior Member
Howdy,

In the past when I've needed to convert a "regular java project" into an
Eclipse plugin-project, I've used one of the Wizards or PDE Convert tools
in Eclipse to accomplish this.

I'm now in a situation where other developers in my team have developed
several "regular Eclipse java projects" that they need for use in a
conventional java environment. I also need to use these projects, but in
an Eclipse RCP environment (ie...plugin-based).

Since their code continues to change, it is not practical to simply import
their projects or JARs into a plugin project. I need to be able to use a
plugin version of their project and keep up with new changes. (I do not
think I can make the other members of my team use plugin-based projects
instead of regular projects).

Is there any feature of Eclipse 3.4+ RCP/PDE that would help me do this? I
do not see a way to create a plugin project which can compile source from
an external (regular) project, etc. I also need to be able to perform a
headless build with PDE at the end of the day.

I'm looking for some "best practices" or some standard pattern, as this
must be a typical problem that certain developers face.

I realize one alternative is to create a special build procedure which
could build all the "regular" projects together into one plugin project.
However, I was looking for alternatives to this approach, perhaps through
some new feature in 3.4 that I am not aware of.

Any suggestions or ideas would be appreciated.

thanks,

-dave
Re: Combining plugin projects and regular Java projects -- need best practices [message #335449 is a reply to message #335448] Wed, 08 April 2009 20:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Dave,

Comments below.

Dave wrote:
> Howdy,
>
> In the past when I've needed to convert a "regular java project" into
> an Eclipse plugin-project, I've used one of the Wizards or PDE Convert
> tools in Eclipse to accomplish this.
>
> I'm now in a situation where other developers in my team have
> developed several "regular Eclipse java projects" that they need for
> use in a conventional java environment. I also need to use these
> projects, but in an Eclipse RCP environment (ie...plugin-based).
> Since their code continues to change, it is not practical to simply
> import their projects or JARs into a plugin project. I need to be able
> to use a plugin version of their project and keep up with new changes.
> (I do not think I can make the other members of my team use
> plugin-based projects instead of regular projects).
Why not? It's so much easier to manage build paths using the PDE...
>
> Is there any feature of Eclipse 3.4+ RCP/PDE that would help me do
> this? I do not see a way to create a plugin project which can compile
> source from an external (regular) project, etc.
I'm not sure what you see a fundamental difference between the two. EMF
makes heavy use of the fact that the same exported jarred bundle can be
used both as a plugin and as just a plain old jar on the classpath...
> I also need to be able to perform a headless build with PDE at the end
> of the day.
> I'm looking for some "best practices" or some standard pattern, as
> this must be a typical problem that certain developers face.
>
> I realize one alternative is to create a special build procedure which
> could build all the "regular" projects together into one plugin
> project. However, I was looking for alternatives to this approach,
> perhaps through some new feature in 3.4 that I am not aware of.
Probably it will help to understand why you or the other members of the
team think plugin projects aren't just as capable as regular
projects... After all an exported bundle is just a jar with a
MANIFEST.MF which is a just standard Java thing...
>
> Any suggestions or ideas would be appreciated.
>
> thanks,
>
> -dave
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Combining plugin projects and regular Java projects -- need best practices [message #335461 is a reply to message #335448] Thu, 09 April 2009 13:03 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Dave wrote:
> (I do not think I can make the other members of my team use plugin-based
> projects instead of regular projects).

As Ed mentioned, a plugin project *is* a java project. From there point
of view, they can still export a jar and it will just be a java jar.

From your point of view, it will work in eclipse.

The other option is to create a plugin project and add a new ant builder
(from the project properties>Builders tab) to the java project. Have it
jar up the java projects into your plugin project, and "refresh" the
workspace so that they're visible. You would have to write the builder
so it did nothing if the plugin project wasn't available. But this is a
lot more work to get correct (you basically have to write the correct
ant script yourself).

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:continous full build, resource tree is lost
Next Topic:[Compare Editor] DiffViewer doesn't refresh with custom CompareEditorInput
Goto Forum:
  


Current Time: Thu Dec 26 12:51:10 GMT 2024

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

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

Back to the top