Re: Continue Eclipse Freemarker DLTK?

Angelo zerr <[email protected]> Tue, 30 Jul 2013 23:49:09 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <CAKLdLg_d9Xj10Z2wo8dGoFULc0dTccJdSOEtGXgfbgBENvbEZA@mail.gmail.com>
2013/7/30 Daniel Dekany <[email protected]>

> Tuesday, July 30, 2013, 9:27:38 PM, Angelo zerr wrote:
>
> > 2013/7/30 Daniel Dekany <[email protected]>
> [snip]
> > 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.
>
> I'm confused. Sounds like we approach this thing from different
> angles. So let's sort it out.
>
> I have never developed IDE stuff, but I would think that when
> debugging, you start a JVM, create a singleton DebuggingService in it
> (or let FreeMarker create it) and connect to it, add the breakpoints
> to it (which might be in different FTL-s, or in the same FTL... it
> doesn't matter), then let the actual application start. Then you sit
> and wait for the breakpoint events while the application is running.
> If there's an event, you try to figure out which .ftl file is it in,
> and open that file in the editor. Is it how it goes, roughly?
>
> If so, how did you use one DebuggingService per FTL file (as opposed
> to one per JVM, or at lest on per Configuration)? How do you inject
> the DebuggerService into the Configuration instances that the
> application creates internally? (Actually I can imagine ways, like
> instrumentation, but that's quite a hack.)
>
> Or, maybe, are you launching the templates directly from the plugin,
> which also creates a dummy data-model? That would be an useful extra,
> but it's not general purpose debugging of course.
>

Yes it that. The data model is created with a custom Java class which have
getModel method.
You select a ftl template, right click to open contextual menu and start
the debug. When you do that
it creates a Freemarker Template instance and link it to dbgp debugger
service instance.

But I agree with you, the general use is to debug an application. In this
case the system properties must be used.
I have not managed this case, but I have intention to do that. See
https://github.com/angelozerr/Freemarker-Eclipse-DLTK/issues/2

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