Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Maintaining the oomph setup
Maintaining the oomph setup [message #1706529] Thu, 27 August 2015 13:46 Go to next message
Mattias Mising name is currently offline Mattias Mising nameFriend
Messages: 19
Registered: June 2010
Junior Member
Hi all,

In a rather big project I would like CM 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. 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 to a setup model in the developer repository. Initially the two models are the same.

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 would like the models separated and the one in the repository to have no concept of streams.

Any idea how to achieve this?
Re: Maintaining the oomph setup [message #1706535 is a reply to message #1706529] Thu, 27 August 2015 14:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Mattias,

Comments below.

On 27/08/2015 3:46 PM, Mattias Andersson wrote:
> Hi all,
>
> In a rather big project I would like CM
CM?
> 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...
> 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?
> 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...
> I would like the models separated and the one in the repository to
> have no concept of streams.
>
> Any idea how to achieve this?
I'm a little confused about the overall structure...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Maintaining the oomph setup [message #1706542 is a reply to message #1706535] Thu, 27 August 2015 15:16 Go to previous messageGo to next message
Mattias Mising name is currently offline Mattias Mising nameFriend
Messages: 19
Registered: June 2010
Junior Member
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.

>> 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

>> 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. 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.


Re: Maintaining the oomph setup [message #1706598 is a reply to message #1706542] Fri, 28 August 2015 04:36 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:Oomph Error when importing projects into workspace
Next Topic:Feedback on using Oomph
Goto Forum:
  


Current Time: Fri Dec 06 05:01:26 GMT 2024

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

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

Back to the top