Re: Continue Eclipse Freemarker DLTK?

Daniel Dekany <[email protected]> Tue, 30 Jul 2013 20:10:59 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Tuesday, July 30, 2013, 4:47:01 PM, Angelo zerr wrote:

>> Then maybe you mean you only have that in ParseException? If so, I
>> believe I can fix that real quick.
>
> Yes I believe it's that. 

I actually wanted to write "you only NEED that (the end-locations) in
ParseException?".

[snip]
> After reading your comments, I think we can avoird to use SPI.

OK, then I will not pull in the 2nd patch.

[snip]
> I have setted the DebuggerService in the Configuration because in my
> case I need to inject with java code my dbgp debugger service to
> use. I don't use system properties.
>
> On other words debugger service must be select with 2 means : 
>
> 1) with sytem properties
> 2) with Java code to inject the debugger service to use.
>
> That's the reason that I have linked the debugger service to the configuration.
> But if you don't like that, don't hesitate that, but my need is 2)

If the goal is simply not using system properties but Java code, you
could just set the DebuggerService with a static method of
DebuggerServiceRegistry. The important difference between system
properties VS Configuration setting is that the first has global
effect, while the other is local to a single Configuration instance.
It's this last aspect (global VS local) I was curious about. Why's it
need, and what application is that where you need this?

> OK thank's, but what about the debugger service retrievd from
> system properties? My patch break the use of rmi debugger service. 

For now DebuggerServiceRegistry should just instantiate the object
whose class is given with the "freemarker.debug.debuggerService"
system property, with its parameterless constructor. Then the
constructor of that class can get the password from the
"freemarker.debug.password" system property, and can get the host and
port similarly. If "freemarker.debug.debuggerService" is not set, then
DebuggerServiceRegistry either creates a
freemarker.debug.impl.RMIDebuggerService or a NoOpDebuggerService (or
whatever their names were...), depending on if the
"freemarker.debug.password" system setting is set. That's
backward-compatible (not that we care much...) and you can still
specify DBGPDebuggerService.

-- 
Thanks,
 Daniel Dekany


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk