Splitting out CFEclipse

44 views
Skip to first unread message

Mark Drew

unread,
Feb 15, 2012, 5:27:18 PM2/15/12
to CFEclipse Developers
Hi there

I have decided to take on a pet project. Since in all honesty I didn't
understand all the code behind CFEclipse (too many authors, too much
code) I have decided to start from a bit of scratch with individual
modules.

Those modules are actually individual plugins, so the first plugin I
am tackling is the Dictionaries. So the idea of being able to ask for
a language dictionary (ACF, Railo, BD etc) and get the tags, Scopes
and what have you.

I know this makes no sense, but by starting it from scratch, I can see
things like code coverage of the Unit tests.

I have put the code in github, as it is, from today's coding, and
what took me longest and held me back was a couple of "dumb" issues
regarding running JUnit tests within Eclipse.

you can see the code here:

https://github.com/cybersonic/CFMLEdit

You will notice that there are three plugins currently:

org.cfeclipse.cfmledit.libraries
org.cfeclipse.cfmledit.dictionaries
org.cfeclipse.cfmledit.tests

org.cfeclipse.cfmledit.libraries : This is the plugin that currently
holds all the external JAR's and libraries. Currently only JDOM (for
XML parsing and creation) is there along with Jaxer.
org.cfeclipse.cfmledit.dictionaries: This is where the Dictionary
Loader, Tags, Functions and Scopes are held. They are loaded from the
XML files (that we all know and love) that define all the lookups that
will be used with other plugins. It is dependent on the .libraries
project

finally there is the org.cfeclipse.cfmledit.tests which will hold all
the tests and the JUnit jar. You can check them out, and if you want
to run them, you can right click on a test and do run as ... JUnit
Plug in Test, it will then create a "run configuration".go and edit
your run configurations (menu: run -> run configurations) and in the
Main tab, make sure it's set as a Run an application:
org.eclipse.ui.workbench. And the tests should run.

They do not all pass currently as I am still developing this, but
hopefully I shall get at least tags being loaded for a dictionary for
a single version.

Another reason I wanted to split them out is so that people can
contribute in small chunks without knowing what else they would
break!

The next pass might be the parser, as we keep touching this, but as a
separate project. I am thinking of creating an AST (Abstract Syntax
Tree) using the Jericho parser or antlr. I know Jericho better, but,
by itself, it doesn't create AST's like Antlr does... so that is an
obstacle. More info: http://jericho.htmlparser.net/docs/index.html

The other thing I need to look at (or anyone else if they want) is how
we can parse script. I guess this would be with ANTLR again... sigh,
Antlr does make my head dizzy.

Anyway, just thought I would let you all know.

Regards

Mark Drew










Andrew Myers

unread,
Feb 16, 2012, 6:17:35 PM2/16/12
to CFEclipse Developers
Hi Mark,

Thanks for letting us know. I tried to get started with CFEclipse a
month or so back and found a lot of the issues you described. I think
it's a great initiative. As I mentioned on twitter I have also been
trying to get my head around ANTLR as it looks like this is where the
solution to a lot of the stuff I'd like to see in CFEclipse lies. I'm
very much a "notice" when it comes to parsers but I'll see if I can
come to grips with it.

Great to see CFEclipse getting some love!

Andrew.

denstar

unread,
Feb 21, 2012, 5:54:02 AM2/21/12
to cfecli...@googlegroups.com
Yo Mark!

Did you take a look at the cfml.dictionary project? It's basically the
same idea, but geared towards anything, vs. CFEclipse itself. We're
already using it in CFE (nastily, I might add, as pulling the files from
external URLs was only half done when I stuck it into CFE, but like you,
I wanted to break things up a bit so said fsck'it).

I don't care if we use that code or not (it came from CFE's dict stuff),
but I do like the cfml namespace, vs. CFE per se.

As for ANTLR, like I said, WOOT! I was able to add ternary operations
in like a couple hours, which would have taken me ages (literally, I
tried) before. I'm not saying I could do everything like that, but I
/get/ token rewriting, labeling, etc. now. More than just the first
conceptual "Ah ha!"-- this actually seems to be working.

I just /could not/ take the empty outline with cfscript cfcs anymore.
My bleary eyes need a list of functions, and I was getting carpal tunnel
scrolling around looking for function X.

:Denny

--
Energizer Bunny arrested, charged with battery.

Mark Drew

unread,
Feb 21, 2012, 6:09:09 AM2/21/12
to cfecli...@googlegroups.com
Where is the cfml.dictionary project? I would say I haven't looked at it since I don't know where it is?

MD

> --
> You received this message because you are subscribed to the Google Groups "CFEclipse Developers" group.
> To post to this group, send email to cfecli...@googlegroups.com.
> To unsubscribe from this group, send email to cfeclipse-de...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cfeclipse-dev?hl=en.
>

Andrew Myers

unread,
Feb 21, 2012, 6:11:32 AM2/21/12
to cfecli...@googlegroups.com
Great to see you back at it Denny! Gotta check this out ;-)

Jim Priest

unread,
Feb 21, 2012, 8:09:35 AM2/21/12
to cfecli...@googlegroups.com
Ditto! He's alive! :)

Jim

Mark Drew

unread,
Feb 21, 2012, 8:14:20 AM2/21/12
to cfecli...@googlegroups.com
Two posts does not maketh a living being ;)

Welcome back Denny!

MD

Randy Merrill

unread,
Feb 21, 2012, 12:02:35 PM2/21/12
to cfecli...@googlegroups.com

Mark Drew

unread,
Feb 21, 2012, 12:11:19 PM2/21/12
to cfecli...@googlegroups.com
Ahh, nice one! I shall plug it in, and see what happens! 

MD 

Raffaele Castagno

unread,
Feb 21, 2012, 12:27:32 PM2/21/12
to cfecli...@googlegroups.com
On Wednesday, February 15, 2012 11:27:18 PM UTC+1, Mark Drew wrote:
Hi there

I have decided to take on a pet project. Since in all honesty I didn't
understand all the code behind CFEclipse (too many authors, too much
code) I have decided to start from a bit of scratch with individual
modules.


Is it enough to import in eclipse "from existing sources" or egit to be up and running?

raffaele 

Randy Merrill

unread,
Feb 21, 2012, 12:37:37 PM2/21/12
to cfecli...@googlegroups.com
I believe that we started setting up tests for each of the sub projects to try and make each piece more solid.

So if you have any improvements you can add in some tests :) And eventually we may even have a CI server for them.
--
Randy Merrill
Reply all
Reply to author
Forward
0 new messages