Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » B3 » select-switch in repo config
select-switch in repo config [message #520342] Thu, 11 March 2010 20:40
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Thomas and I had a discussion today about the repository configuration,
and the lack to limit the resolution of a particular request to take
place only from particular repositories.

This resulted in the following new syntax.

"select-switch" Expression
("case" Expression : RepositoryConfiguration ) +

When a resolution is performed, the constant value "request" is bound to
an instance of RequiredCapability. Thus enabling a repository
configuration like this:

repositories {

case ~/^org\.myorg\..*/
: "svn:svn+ssh://";

case "org.yourorg.yourthing"
: "svn:";

case _
: "p2:";


This is different than the earlier select-first, which will try all
listed repositories in order until one returns a build unit.

The select-switch will evaluated cases in order until a match is found,
and that repo (and that repo alone) is given a chance to resolve the

Note, that this is a special case of switch-case, as the case
expressions are not any general expression - only repository
declarations are permitted.

An alterantive was considered where this filtering was instead done as
part of the initialization of a repository handler. This would have ment
declaring a lambda to do the filtering. As this is probably a common
construct, we felt that it was better represented as a switch case.

The new proposed syntax has been implemented. Test has not yet been
written though. New version shortly available in SVN.

- henrik
Previous Topic:b3 website and documentation available
Next Topic:select-switch in repo config
Goto Forum:

Current Time: Sat Jul 20 16:01:52 GMT 2024

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

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

Back to the top