Re: Continue Eclipse Freemarker DLTK?

Angelo zerr <[email protected]> Sat, 27 Jul 2013 09:04:31 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <CAKLdLg-9N3Np-muTBKTuKLdVSjeFhzvJqgCu65Y3ysjpZGgTOw@mail.gmail.com>
Hi Daniel, Greg

@Daniel : I'm waiting for decision of Greg about my patch to continue DLTK
Freemarker (I don't want to use a forked freemarker).

2013/7/27 Greg Amerson <[email protected]>

> Hey guys,
>
> I am on vacation starting today and going through all of next week so I
> wont be able to look at the new DLTK plugins from Angelo until Aug 5th at
> the earliest but I do promise to take a deep look at it then.  I have
> gotten my dev environment up and compiled the plugins and tested the editor
> just a bit.  I wasn't able to get the debugger working at first but I
> didn't look at the documentation on this portion that closely yet.
>

Debugger is broken because I have switched to FM 2.3. I'm waiting for that
you accept my patch to fix it. But there are a lot of work again to do.

>
> But I agree with both of your notions that the Outline view available in
> other freemarker editor is not that useful.  When I'm working on templates
> I'd rather see the HTML outline.  So I believe our efforts would be better
> spent to try to make freemarker that is editing HTML documents (which is
> big use-case) has an HTML outline, just like JSP files have html outline.
>

I agree with you. I had created the issue
https://github.com/angelozerr/Freemarker-Eclipse-DLTK/issues/1 for that

>
>
> So some quick questions about DBGP debugger.  In my own debugger client
> that I wrote for LiferayIDE, I had some problems with stepping, in other
> words there is no stepping :) and emulated stepping is not stepping at all
> (breaks when it encounters first conditional statement.  But... does DBGP
> debugger support these features?
>
> - stepping
> - run to line
> - modification of model objects values
>

As I said you the debugger works with simple case and it should be improved
(I don't remember if it supports your features).

>
> Once I get back from vacation I will also be working on integration new
> editor with LiferayIDE usecases which will include automatically populating
> the editors configuration on open to include lots of JDT classes available
> on the user's project classpath.  But for that I can try to learn existing
> API and facilities already available.
>

I'm using JDT for the preview (you can define a model with Java classes),
perhaps I could give you some hint with JDT (I'm not a big expert).

Have a good vacation Greg

Regards Angelo

>
> G
>
>
> On Sat, Jul 27, 2013 at 12:33 AM, Daniel Dekany <[email protected]>wrote:
>
>> Friday, July 26, 2013, 5:08:15 PM, Angelo zerr wrote:
>>
>> [snip]
>> > I have done a big refactoring about debugger
>> > https://github.com/freemarker/freemarker/pull/7 to support any
>> > debugger (like dbgp).
>> [snip]
>> > I'm waiting that you accept my pull request (or you cange it to
>> > support any debugger service) to commit that. Thank's.
>>
>> UGh... At the moment, I know nothing about the whole debugging
>> feature. I will look into it, eventually. Greg OTOH has some insight,
>> so if he says it's good, I will believe to him. He's a tools expert
>> anyway. I suppose it's not an obstacle for you if it's not accepted
>> for a while (after all this is Git...). I mean, for some days. If it
>> is, tell me.
>>
>> > Regards Angelo
>> >
>> >
>> > --
>> > Thanks,
>> >  Daniel Dekany
>> >
>> >> Last night I have switched to FM 2.3 (the Ouline doesn't work
>> >> because I have commented code about DLTK ASTNode). See
>> >>
>> https://github.com/angelozerr/Freemarker-Eclipse-DLTK/commit/915952c3eec28a4531a54edacc7e33cb88993f18
>> >>
>> >> I have removed FM 3.0 bundle (org.freemarker.freemarker) and
>> >> replaced with FM 2.3. As 2.3 is an OSGi bundle, I use it directly as
>> >> OSGi bundle (you can see in action that OSGi with FM seems working).
>> >>
>> >> You must build the freemarker.jar and set in the
>> >> TargetPlatform/plugins
>> >>
>> https://github.com/angelozerr/Freemarker-Eclipse-DLTK/tree/master/TargetPlatform/plugins
>> >> if you wish to use the version from Git master.
>> >>
>> >> Now I would like to work on the debugger. I will create a new topic
>> about the debugger.
>> >>
>> >> Regards Angelo
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> 2013/7/26 Daniel Dekany <[email protected]>
>> >> Friday, July 26, 2013, 12:28:19 AM, Angelo zerr wrote:
>> >>
>> >>>> What do you mean by "manage with 2.3"?
>> >>>
>> >>> I mean that DLTK Freemarker will use FM 2.3 and not 3.0
>> >>
>> >> Sure.
>> >>
>> >>>> You want to modify FM, or it's plugin development only?
>> >>>
>> >>> My first step is just modify or comments code of DLTK Freemarker.
>> >>>
>> >>> After I would like contribute with my code
>> >>>
>> https://github.com/angelozerr/Freemarker-Eclipse-DLTK/tree/master/freemarker.provisionnal/src/freemarker/provisionnal
>> >>> to FM to improve debugger and contribute to FM tools.
>> >>>
>> >>>> I'm OK with both, except that you will have
>> >>>> to send a signed Contributor License Agreement for modifying FM
>> >>>> itself.
>> >>>
>> >>>> In last past I had send a CLA to Atila (to commit in the svn FM), is
>> not enough?
>> >>
>> >> That's enough. Sorry for the confusion, it's just that I don't have a
>> >> copy of that here for some reason... never mind.
>> >>
>> >>> Regards Angelo
>> >>>
>> >>> --
>> >>> Thanks,
>> >>>  Daniel Dekany
>> >>>
>> >>>
>> >>>> Regards Angelo
>> >>>>
>> >>>>
>> >>>> 2013/7/25 Daniel Dekany <[email protected]>
>> >>>> Thursday, July 25, 2013, 4:40:28 PM, Angelo zerr wrote:
>> >>>>
>> >>>>> Hi Daniel,
>> >>>>>
>> >>>>> OK I understand why you don't want expose the AST API. Thank's for
>> your information.
>> >>>>>
>> >>>>> The DLTK ASTNode is used for several features like folding,
>> >>>>> refactoring, search, codeassist.
>> >>>>>
>> >>>>> You can read info about ASTNode at
>> >>>>> http://wiki.eclipse.org/DLTK_Core_Architecture
>> >>>>> It's difficult for me to tell you now which info are required  to
>> >>>>> build a DLTK ASTNode.
>> >>>>
>> >>>> Then, to start somewhere... I think, org.freemarker:tooling will give
>> >>>> you an abstract FTLVisitor class, which however will only have two
>> >>>> kind of visit-s for now: visit(ElementInfo) and
>> visit(ExpressionInfo).
>> >>>> (That's so that the plugin or other tools won't assume that they know
>> >>>> all the directives and expression types.) (Note that the 3.0 API
>> >>>> didn't visit expressions at all, only elements.) And then I start
>> >>>> adding properties to these XxxInfo-s as the need arises. Like,
>> >>>> isFoldable(), isOutlineNode and getOutlineNodeLabel for starters. The
>> >>>> initial "accept" method of the tools API could have a Query object (a
>> >>>> JavaBean again) as parameter, in which you can specify what are you
>> >>>> interested in (like, folding and/or outline nodes and/or variables
>> >>>> used, etc). So as you move ahead, we will see if it's appropriate at
>> >>>> all. And of course I'm open for suggestions.
>> >>>>
>> >>>>> I will try to switch to 2.3 and I will see what we need.
>> >>>>>
>> >>>>> My work about AST was very simply (I have just managed #assign in
>> >>>>> the AST to display the variable name of assign in the Outline View).
>> >>>>> But perhaps for Freemarker, the Outline View should display more
>> >>>>> info like JBoss IDE
>> >>>>
>> >>>> JBoss IDE's outline is useless IMAO. It shows far too much. After
>> all,
>> >>>> the goal of an outline view is to show you a summary that's good for
>> >>>> navigation (among others). Although I'm not entirely sure how the
>> >>>> outlook should look. It has to show #macro and #function, and that's
>> >>>> already useful, but what else?
>> >>>>
>> >>>>> and your idea about freemaker-tool.jar is perhaps a good idea.
>> >>>>
>> >>>> (I wonder what's the proper term is. "tooling" or "tools"? Like
>> >>>> "FreeMarker Tooling API" or "FreeMarker Tools API"... or even
>> >>>> "tool-helpers"...)
>> >>>>
>> >>>>> I have not experimented a lot the capability of the DLTK ASTNode
>> >>>>> but at the end of the
>> http://wiki.eclipse.org/DLTK_Core_Architecture
>> >>>>> it says "Use of the DLTK AST is not mandatory, but some DLTK
>> >>>>> features like folding may rely on it and it can greatly simplify
>> implementation."
>> >>>>>
>> >>>>> For the completion (interpolation) I don't use the ASTNode but I
>> >>>>> think I should to use it (so I need a more complex AST).
>> >>>>
>> >>>> For that you need the variable names used, in a hierarchy. Like, on
>> >>>> the top-level you have "user" and "department", but after "user." the
>> >>>> possibilities are different, like "user.name" etc. If DLTK can
>> extract
>> >>>> such info from the AST, we might as well add that in ExpressionInfo.
>> >>>> Also there's the case where some of the data-model variables has a
>> >>>> known class (that's not a FreeMarker feature).
>> >>>>
>> >>>>> So I must switch to 2.3, my first idea is to try to remove the use
>> >>>>> of DLTK ASTNode an dmanage other features like syntax errors and
>> debug.
>> >>>>>
>> >>>>> Regards Angelo
>> >>>>
>> >>>> --
>> >>>> Thanks,
>> >>>>  Daniel Dekany
>> >>>>
>> >>>>
>> >>>>
>> ------------------------------------------------------------------------------
>> >>>> See everything from the browser to the database with AppDynamics
>> >>>> Get end-to-end visibility with application monitoring from
>> AppDynamics
>> >>>> Isolate bottlenecks and diagnose root cause in seconds.
>> >>>> Start your free trial of AppDynamics Pro today!
>> >>>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>> >>>> _______________________________________________
>> >>>> FreeMarker-devel mailing list
>> >>>> [email protected]
>> >>>> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>> >>>>
>> >>>
>> >>>
>> >>
>> >> --
>> >> Thanks,
>> >>  Daniel Dekany
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> See everything from the browser to the database with AppDynamics
>> >> Get end-to-end visibility with application monitoring from AppDynamics
>> >> Isolate bottlenecks and diagnose root cause in seconds.
>> >> Start your free trial of AppDynamics Pro today!
>> >>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>> >> _______________________________________________
>> >> FreeMarker-devel mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>> >>
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > See everything from the browser to the database with AppDynamics
>> > Get end-to-end visibility with application monitoring from AppDynamics
>> > Isolate bottlenecks and diagnose root cause in seconds.
>> > Start your free trial of AppDynamics Pro today!
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>> > _______________________________________________
>> > FreeMarker-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>> >
>>
>> --
>> Thanks,
>>  Daniel Dekany
>>
>>
>>
>> ------------------------------------------------------------------------------
>> See everything from the browser to the database with AppDynamics
>> Get end-to-end visibility with application monitoring from AppDynamics
>> Isolate bottlenecks and diagnose root cause in seconds.
>> Start your free trial of AppDynamics Pro today!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> FreeMarker-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>>
>
>
>
> --
> Greg Amerson
> Liferay Developer Tools
> Liferay, Inc. www.liferay.com
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> FreeMarker-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>
>

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

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