Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » How do I materialize outside the workspace?
How do I materialize outside the workspace? [message #688280] Fri, 24 June 2011 10:31 Go to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
When materializing a CQuery, by default Buckminster imports source components as projects within the workspace directory, and puts binary components into the target platform (we start off with an empty target platform).

I want a slight variation on this - I want the source components to be checked out to a different location (not the workspace directory, but a different one). After numerous experiments, I have found only one way to do it, and would appreciate any improvements. Let me document what I've found:

(1) Materializing within the workspace is easy. The developer defines an empty target platform and opens a CQuery at at standard URL. The CQuery is set up with the correct advisor nodes and properties. The developer enters a component name, and clicks "resolve and materialize"; all done. The key point hete, though, is that the CQuery can't be run without changing it (this is because we have around 20 similar but not indentical products we build, each of which has its own parent component (everyone uses the same RMap though)).

(2) To materialize outside the workspace, try opening the CQuery, but click "resolve to wizard". Then click "next" and you can enter "global settings" where you can specify a location that is different from the workspace (if you specify a destination type of workspace). This almost works, but the problem is because the settings are indeed global, the binary components that should end up in the target platform directory, end up in the location instead (at least, the first time I tried it; after that I just got a bunch of exceptions thrown by Buckminster).

(3) The only way I was able to redirect just the source components to another directory was to define an mspec like this:
<mspec:mspec xmlns:bc="blah" xmlns:mspec="blah" installLocation="" workspace
Location="" name="item-mspec" shortDesc="MSpec pointing to item.cquery" url="http://server/item.cquery">
<mspec:propertyElement key="component">
<bc:constant value="example-config"/>
</mspec:propertyElement>
<mspec:propertyElement key="location.root">
<bc:constant value="/scratch/test-loc"/>
</mspec:propertyElement>
<mspec:mspecNode installLocation="${location.root}" materializer="workspace" workspaceLocation="${workspace.root}" bindingNamePattern=".*" filter="(buckminster.source=true)"/>
</mspec:mspec>

The property called component is there so that in the CQuery I can have a component name of ${component} which will then get substituted.

This works, but lacks the elegance of using a CQuery. With a CQuery, you can specify a URL and a local copy is opened in the workspace, and you can edit it. That doesn't work for an MSpec. All you can do with a http:// MSpec is materialize it. If you have to change it (eg to change the component key in our case), you must make a local copy manually and then edit it. Which means that the url in the MSpec must be absolute; you can't have a relative location (unless you also manually download the CQuery).

OK, all doable, but I've lost my simple "open a URL, enter componet name, click" to materialize a workspace.

I hope this doesn't sound like too much of a winge, I'm just looking for a cleaner solution. Any ideas?

Thanks
Matthew



Re: How do I materialize outside the workspace? [message #688832 is a reply to message #688280] Sat, 25 June 2011 22:47 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1340
Registered: July 2009
Senior Member
This probably isn't very helpful, but have you considered trying to materialize them to your target platform with a seperate cquery and then simply moving them? Another sort of wacky idea is to use a git provider and a dummy project to trigger the provider. Since git provider clones the whole repos, you'll have that accesible, though of course you're not actually materializing or controlling at all what gets into the git repos directories, you'll just get everything. Probably not what you're looking for.

[Updated on: Sat, 25 June 2011 22:48]

Report message to a moderator

(no subject) [message #688862 is a reply to message #688280] Sun, 26 June 2011 01:39 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2500
Registered: July 2009
Senior Member
On 6/24/11 12:31 PM, Matthew Webber wrote:

> This works, but lacks the elegance of using a CQuery. With a CQuery, you
> can specify a URL and a local copy is opened in the workspace, and you
> can edit it. That doesn't work for an MSpec.

For a very long time there was no editor for an MSpec. Since there now
is an EMF based editor it should not be too difficult to also support
opening it in an editor.

It would also not be very difficult to develop a wizard (or other
simpler dialog) that prompts the user for a component, loads the mspec
and modifies the resulting model with the users input.

But the following may be easier to implement:

Why not have a servlet that produces the wanted Mspec, just vary the
URL, and let the servlet generate the mspec. Direct users to your
server. http://www.ourdomain.com/mspecs?component=foo or something.

- henrik
Re: (no subject) [message #689694 is a reply to message #688862] Tue, 28 June 2011 07:49 Go to previous message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
Thanks for those ideas Henrik.

Althogh developing a wizard is possible, it would then need to be installed into the developers' Eclipse, which adds an additional step - which is what I'm trying to avoid.

The idea of handling it at the server end (by adding a servlet) is a rather a nice and natural solution, so I'll look at that.

Matthew
Previous Topic:Generate similar product
Next Topic:Buckminster code generation in IDE/Headless
Goto Forum:
  


Current Time: Tue Nov 25 22:38:26 GMT 2014

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

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