Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Java System Properties as variables in org.eclipse.core.variables
Java System Properties as variables in org.eclipse.core.variables [message #502623] Wed, 09 December 2009 08:22 Go to next message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
Just to let you know!

As with Riena 1.2 we will populate on start-up all Java system
properties (System.getProperties()) as variables into core.variables.
Additionally there will be two ´synthetic´ properties added that contain
the hosts name and the hosts ip address.
All the variable names are prefixed with "riena.", e.g. the Java system
property "user.name" can be referenced with "${riena.user.name}" inside
strings for variable substitution.
The two additional properties are "riena.host.name" and
"riena.host.address".

With this we can simplify and enrich configuration data e.g. executable
extensions.

Tschüß,
Stefan
Re: Java System Properties as variables in org.eclipse.core.variables [message #506414 is a reply to message #502623] Thu, 07 January 2010 13:16 Go to previous messageGo to next message
Holger Hoch is currently offline Holger HochFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Stefan,

I think it would be better to use an o.e.c.i.v.DynamicVariable with an o.e.c.v.IDynamicVariableResolver providing the system variable name as variable argument (eg "java.lang.System:user.dir"). This makes pretty clear what happes and does not require explicit intialization o.ie.r.i.c.Activator.
The 'static' solution provides only a snapsot of the system property values at bundle startup time, but some of the values may change during runtime (eg the value of 'http.proxy').
I also think iterating all system variables and creating a new key and a copy of their value while they are always accessible is somewhat of wasting resources without any need.
I'm completely aware this does not contribute hours to system startup time, but may littles add up to a lot... I personnaly think this should be avoided in the framework.

cheers,
--holger
Re: Java System Properties as variables in org.eclipse.core.variables [message #506456 is a reply to message #506414] Thu, 07 January 2010 15:05 Go to previous messageGo to next message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Holger,

You are right. This is definitely a better solution.
I will fix that as soon as possible.

Tschüß,
Stefan

On 07.01.2010 14:16, Holger Hoch wrote:
> Hi Stefan,
>
> I think it would be better to use an o.e.c.i.v.DynamicVariable with an
> o.e.c.v.IDynamicVariableResolver providing the system variable name as
> variable argument (eg "java.lang.System:user.dir"). This makes pretty
> clear what happes and does not require explicit intialization
> o.ie.r.i.c.Activator.
> The 'static' solution provides only a snapsot of the system property
> values at bundle startup time, but some of the values may change during
> runtime (eg the value of 'http.proxy').
> I also think iterating all system variables and creating a new key and a
> copy of their value while they are always accessible is somewhat of
> wasting resources without any need. I'm completely aware this does not
> contribute hours to system startup time, but may littles add up to a
> lot... I personnaly think this should be avoided in the framework.
>
> cheers,
> --holger
Re: Java System Properties as variables in org.eclipse.core.variables [message #508570 is a reply to message #506456] Tue, 19 January 2010 12:56 Go to previous message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Holger,

Fixed in HEAD!
With e.g. "java.system.property:user.dir" you will get the Java System
Property "user.dir".
As with the previous solution two additional (´synthetical´) properties
"riena.host.name" and "riena.host.address" are available.

Tschüß,
Stefan

On 07.01.2010 16:05, Stefan Liebig wrote:
> Hi Holger,
>
> You are right. This is definitely a better solution.
> I will fix that as soon as possible.
>
> Tschüß,
> Stefan
>
> On 07.01.2010 14:16, Holger Hoch wrote:
>> Hi Stefan,
>>
>> I think it would be better to use an o.e.c.i.v.DynamicVariable with an
>> o.e.c.v.IDynamicVariableResolver providing the system variable name as
>> variable argument (eg "java.lang.System:user.dir"). This makes pretty
>> clear what happes and does not require explicit intialization
>> o.ie.r.i.c.Activator.
>> The 'static' solution provides only a snapsot of the system property
>> values at bundle startup time, but some of the values may change during
>> runtime (eg the value of 'http.proxy').
>> I also think iterating all system variables and creating a new key and a
>> copy of their value while they are always accessible is somewhat of
>> wasting resources without any need. I'm completely aware this does not
>> contribute hours to system startup time, but may littles add up to a
>> lot... I personnaly think this should be avoided in the framework.
>>
>> cheers,
>> --holger
>
Re: Java System Properties as variables in org.eclipse.core.variables [message #584467 is a reply to message #502623] Thu, 07 January 2010 13:16 Go to previous message
Holger Hoch is currently offline Holger HochFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Stefan,

I think it would be better to use an o.e.c.i.v.DynamicVariable with an o.e.c.v.IDynamicVariableResolver providing the system variable name as variable argument (eg "java.lang.System:user.dir"). This makes pretty clear what happes and does not require explicit intialization o.ie.r.i.c.Activator.
The 'static' solution provides only a snapsot of the system property values at bundle startup time, but some of the values may change during runtime (eg the value of 'http.proxy').
I also think iterating all system variables and creating a new key and a copy of their value while they are always accessible is somewhat of wasting resources without any need.
I'm completely aware this does not contribute hours to system startup time, but may littles add up to a lot... I personnaly think this should be avoided in the framework.

cheers,
--holger
Re: Java System Properties as variables in org.eclipse.core.variables [message #584501 is a reply to message #506414] Thu, 07 January 2010 15:05 Go to previous message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Holger,

You are right. This is definitely a better solution.
I will fix that as soon as possible.

Tschüß,
Stefan

On 07.01.2010 14:16, Holger Hoch wrote:
> Hi Stefan,
>
> I think it would be better to use an o.e.c.i.v.DynamicVariable with an
> o.e.c.v.IDynamicVariableResolver providing the system variable name as
> variable argument (eg "java.lang.System:user.dir"). This makes pretty
> clear what happes and does not require explicit intialization
> o.ie.r.i.c.Activator.
> The 'static' solution provides only a snapsot of the system property
> values at bundle startup time, but some of the values may change during
> runtime (eg the value of 'http.proxy').
> I also think iterating all system variables and creating a new key and a
> copy of their value while they are always accessible is somewhat of
> wasting resources without any need. I'm completely aware this does not
> contribute hours to system startup time, but may littles add up to a
> lot... I personnaly think this should be avoided in the framework.
>
> cheers,
> --holger
Re: Java System Properties as variables in org.eclipse.core.variables [message #584628 is a reply to message #506456] Tue, 19 January 2010 12:56 Go to previous message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Holger,

Fixed in HEAD!
With e.g. "java.system.property:user.dir" you will get the Java System
Property "user.dir".
As with the previous solution two additional (´synthetical´) properties
"riena.host.name" and "riena.host.address" are available.

Tschüß,
Stefan

On 07.01.2010 16:05, Stefan Liebig wrote:
> Hi Holger,
>
> You are right. This is definitely a better solution.
> I will fix that as soon as possible.
>
> Tschüß,
> Stefan
>
> On 07.01.2010 14:16, Holger Hoch wrote:
>> Hi Stefan,
>>
>> I think it would be better to use an o.e.c.i.v.DynamicVariable with an
>> o.e.c.v.IDynamicVariableResolver providing the system variable name as
>> variable argument (eg "java.lang.System:user.dir"). This makes pretty
>> clear what happes and does not require explicit intialization
>> o.ie.r.i.c.Activator.
>> The 'static' solution provides only a snapsot of the system property
>> values at bundle startup time, but some of the values may change during
>> runtime (eg the value of 'http.proxy').
>> I also think iterating all system variables and creating a new key and a
>> copy of their value while they are always accessible is somewhat of
>> wasting resources without any need. I'm completely aware this does not
>> contribute hours to system startup time, but may littles add up to a
>> lot... I personnaly think this should be avoided in the framework.
>>
>> cheers,
>> --holger
>
Previous Topic:Improved wiki pages
Next Topic:How to update the module label?
Goto Forum:
  


Current Time: Thu Mar 28 10:16:31 GMT 2024

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

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

Back to the top