|
|
|
Re: Maintaining the oomph setup [message #1706598 is a reply to message #1706542] |
Fri, 28 August 2015 04:36 |
Ed Merks Messages: 33258 Registered: July 2009 |
Senior Member |
|
|
Mattias,
Comments below.
On 27/08/2015 5:16 PM, Mattias Andersson wrote:
> Hi Ed,
>
> Thanks for your quick feedback.
>
>> CM?
> Configuration Manager
>
>>> to be able to create and remove active streams/branches, while the
>>> developers should be able to edit preferences such as build order or
>>> error/warning settings depending on the stream they are working in.
>> Those could be maintained on the stream instead of on the overall
>> project...
> Do you mean in a single setup model? I would like some important
> preferences to be closely associated the source code, i.e. maintain
> then together in a repository.
If the setup itself is maintained there, then that should do the trick.
Of course many preferences ought to be project-specific preferences, in
which can they are indeed directly associated with the project. E.g.,
JDT's preferences ought to be managed this way... Oomph does have a
tool for managing project-specific preference (Project Config) but it's
not really ready for prime time usage, unfortunately...
>>> These settings should follow the source code on the stream.
>>> I tried to achieve this by creating a setup model on a shared disk
>>> which defines p2 stuff and the set of active streams. In the setup
>>> model I have a redirection
>> With an EclipseIni tasks?
> Yes
I see. Such redirections are ignored if the target of the redirection
does not yet exist.
for (Map.Entry<Object, Object> entry : safeProperties.entrySet())
{
Object key = entry.getKey();
if (key instanceof String)
{
if
(((String)key).startsWith(SetupProperties.PROP_REDIRECTION_BASE))
{
String[] mapping = ((String)entry.getValue()).split("->");
if (mapping.length == 2)
{
URI sourceURI = URI.createURI(mapping[0]);
URI targetURI = URI.createURI(mapping[1].replace("\\", "/"));
// Only include the mapping if the target exists.
// For example, we often include a redirection of the
remote setup to the local git clone in an installed IDE,
// but if that clone hasn't been cloned yet, we want to
continue to use the remote version.
//
if (targetURI.isFile())
{
// If the file is a relative path, interpret it as
relative to the root folder of the installation.
if (targetURI.isRelative())
{
targetURI =
targetURI.resolve(SetupContext.PRODUCT_LOCATION.trimSegments(OS.INSTANCE.isMac()
? 2 : 0).appendSegment(""));
}
File file = new File(targetURI.toFileString());
if (!file.exists())
{
continue;
}
}
uriMap.put(sourceURI, targetURI);
}
}
}
}
>
>>> to a setup model in the developer repository. Initially the two
>>> models are the same.
>> I see.
>>> The problem is when CM creates a new stream on the shared disk this
>>> stream does not exist in the redirected repository and when Eclipse
>>> starts no preferences or projects will imported.
>> I'm not sure I completely follow...
> In the Eclipse installer the user has selected a stream "bugfix1",
> when the installer start Eclipse it actually reads a different setup
> model because of the redirection, where "bugfix1" does not exist.
It reads the remote one that the installer sees...
> I guess that because the oomph does not find the stream it was looking
> for it does nothing. I would like Oomph to import "common preferences"
> if the specific stream is not found in the second phase.
Is the setup itself not maintained in the source code repository? If it
were, the branch could have it's own "fork" of the setup model for
configuring it...
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03098 seconds