Re: Continue Eclipse Freemarker DLTK?

Angelo zerr <[email protected]> Tue, 30 Jul 2013 21:27:38 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <CAKLdLg8ysjccC-8kXby3p43hFX_vvGFGXaaJ7nhVwb_tB7Ccdg@mail.gmail.com>
2013/7/30 Daniel Dekany <[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?".
>

Please let me test that, I will tell you what I need.

>
> [snip]
> > After reading your comments, I think we can avoird to use SPI.
>
> OK, then I will not pull in the 2nd patch.
>

OK

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

The current code of Freemarker DLTK create an instance of
DbgpDebuggerService each time you debug
a ftl template. I have done that because if you wish to debug several ftl
in the same time (like you can debug several Java class in same time).

But perhaps it's a mistake and I could use a singleton of
DbgpDebuggerService and so I agree with you, we can have a static instance
of
DebuggerServiceRegistry that it is filled with Java code with a setter, or
with systemproperties.

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

Ok great. We must just add a setter in the DebuggerServiceRegistry to set
the debugger with Java code (must just test if
DbgpDebuggerService works with FM DLTK).

>
> --
> 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
> _______________________________________________
> FreeMarker-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>

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

_______________________________________________
FreeMarker-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel