Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] component binding

Knut Wannheden wrote:
I found that the DefaultBinderService will bind my components as an
ExternalBinding as the "unknown" component type returns false on
hasProjectDescription(). Yet Buckminster creates a .project file for
my component. Setting a breakpoint just before the bind phase
(MaterializeAndBindJob line 96) I found that the .project file had
already been created.
Ahh, now I know what's going on. I bet you're using the CVS reader :-). It has a minor quirk in that the destination that it materializes into must be a project. We are reusing large parts of the Eclipse CVS code. It will be fixed eventually but right now you'll have to live with it.
 Just as if I'd done a "Checkout as Project"
using the "CVS Repository Exploring" perspective. Is this unexpected
behavior?


If the above was an excerpt from another mail, then I'm missing it. Can you please resend?
I should also mention that Buckminster logs the following event to the
workspace's .metadata/.log file:

!ENTRY org.eclipse.buckminster.core 4 0 2006-01-19 13:15:10.707
!MESSAGE External binding collides with existing project

I found this matching piece of code in
DefaultBinderService#createExternalBinding(...):

if(numSegments == 1 || !project.equals(buckminsterProject))
	throw new BuckminsterException("External binding collides with
existing project");

This is to be expected. All ExternalBinding must either reside physically outside the workspace or inside of the special '.buckminster' project. They are not allowed to have your workspace as a root. Your objective is to create a ProjectBinding, not an ExternalBinding and hence, you must make Buckminster believe that it indeed is (or in your case, will be) a project. You cannot use the "unknown" component type. You must invent one of your own and let it return true on the hasProjectDescriptor() call. You can start of with something very simple that just returns the default CSpecPacking (see UnknownComponentType) but eventually you might want to provide more info extracted from your own special descriptors.

Regards,
Thomas Hallgren



Back to the top