tags:

views:

24

answers:

2

A spawn off of an existing eclipse product is required for customization for a client. (hence parallel product development)

The intention was to use Eclipse Fragment, but "Fragments are additive, they cannot override content found in the host."

how can we maintain one set of codes in the svn, yet allow customization by overriding some classes?


the current solution is to have a global flag to indicated which product it is and "if" "else" littered everywhere in the codes ...

A: 

ehhh... by branching the code in SVN?

nanda
by branching, how is the 2 different team going to push changes to each other?
zeroin23
A: 

AFAIK there is no easy way of overriding a class in another plug-in.

Instead of overwriting you could define extension points or OSGi services, and the implementation of those can be replaced for the new client. For one client you could supply one extension/service implementation, and for the other the new one.

Zoltán Ujhelyi
might be a little tough coz the 2nd product involves minor ui tweaks and changes...
zeroin23
@zeroin23 The problem is, that Eclipse does not support changes without some kind of "invitation". The developer of the original plug-in has to explicitely allow these changes.For minor UI changes the only idea I have to use the Strategy pattern (http://en.wikipedia.org/wiki/Strategy_pattern): define a class, where these tweaks are stored, create an Extension for the class, and then the base plug-in should load this strategy object.This way it seems possibly, but not easy to solve the problem.
Zoltán Ujhelyi