Debug configurations and passing System properties to JET2 [message #54127] |
Tue, 16 December 2008 05:04  |
Eclipse User |
|
|
|
Hi,
I notice that although one can create a JET2 transformation in 'Run
configurations', there is no such item in 'Debug configurations. Any plans
for one or reasons there isn't one?
Secondly, is there anyway that one can set Java System properties for any
JET2 transformation?
I guess one can manually set them in ones TagFactory (although this can be
too late in some cases) but it would be nice to be able to define them in
say a Run configuration or set them as part of the JET2 preferences.
Paul
|
|
|
Re: Debug configurations and passing System properties to JET2 [message #54256 is a reply to message #54127] |
Tue, 16 December 2008 09:19   |
Eclipse User |
|
|
|
Paul:
There isn't a JET debugger, and there is no plan for this release (Galileo,
June 2009).
As for setting system properties, again, there is nothing in plan. Perhaps a
tag executed early in the main template would do the trick? Personally, I'm
reluctant to play with system properties (that is, widely known ones) in
Eclipse - I'm never sure of what the impact of such a change would have on
plug-ins I don't know about or understand.
I have considered letting users predefine JET variables in the launch
configuration. Would this meet your needs?
Paul
"Paul Hammond" <paul_hammond@hotmail.com> wrote in message
news:561b8fc3999ec94b78b30187956e0ae6$1@www.eclipse.org...
> Hi,
>
> I notice that although one can create a JET2 transformation in 'Run
> configurations', there is no such item in 'Debug configurations. Any plans
> for one or reasons there isn't one?
>
> Secondly, is there anyway that one can set Java System properties for any
> JET2 transformation?
>
> I guess one can manually set them in ones TagFactory (although this can be
> too late in some cases) but it would be nice to be able to define them in
> say a Run configuration or set them as part of the JET2 preferences.
>
> Paul
>
>
>
>
|
|
|
Re: Debug configurations and passing System properties to JET2 [message #54361 is a reply to message #54256] |
Tue, 16 December 2008 14:05   |
Eclipse User |
|
|
|
Hi Paul,
Re System properties, where I'm coming from is say an example like Java
logging. Supposing you want to control the configuration of the LogManager
via the system property java.util.logging.config.file, a reasonable thing
to want to do, right now you can't do this in JET.
Even if I explicitly set this configuration myself, how do I know that
either JET2 or some other third party lib has not already called
Logger.getLogger() and set up their Loggers with a configuration I don't
want to use.
At best I can call reset() on the LogManager somewhere, set the System
property and then use the readConfiguration to read in my own config , but
then I'm doing extra work and going around the standard way of doing
things, that sort of thing. Also any Loggers that have been statically
created before I do this won't change as their Handlers will be inside
them already created. It will only affect future Loggers I create etc.
One may have many third party libraries in ones tags etc that have to run
in the JET plugin, and may absolutely require System properties to be set.
Applications like Tomcat for instance allow this when deploying ones
webapps. JET2 in a way, is kind of like a container, but for custom tags
rather than webapps.
In terms of your reluctance, I understand where you're coming from, but
there's a side where you can take the assumption that people know what
they're doing if they set these properties. If they don't, then they will
pay the ultimate penalty when their program doesn't work.
Setting System properties is a key standard part of Java and not I think a
bad thing in and of itself, so I think there's a reasonable case to
support it in something like JET where you have users interfacing in their
own code and needing to configure standard libraries in a standard way.
Have I persuaded you at all?
Paul
|
|
|
|
Re: Debug configurations and passing System properties to JET2 [message #54574 is a reply to message #54548] |
Wed, 17 December 2008 12:57  |
Eclipse User |
|
|
|
Hi Paul,
For most things I guess, users will run up a Java application via a run
configuration, where they can pass in -D no problem.
It's only in the case of something like JET, where one can't run things
via a normal Java command line that this is an issue.
So I guess in general the question boils down to, where should System
properties be set when you run something in Eclipse where you can't use a
normal Java command line, and you need to add custom code to an existing
plugin?
Enjoy your holiday!
Paul
|
|
|
Powered by
FUDForum. Page generated in 0.05725 seconds