More stuff

9 views
Skip to first unread message

Andrew Myers

unread,
Jan 16, 2012, 8:49:30 PM1/16/12
to CFEclipse Developers
I spent the weekend playing around CFE's source and now I've become
shall we say a little bit obsessed.

Last night I had a play with the CFMLComponentAssist class that was
already there but didn't seem to be getting called from anywhere. I
fiddled around with it to get it to do stuff more to my liking.

Apart from the stuff I'd already done (that is if you are inside a
<cfunction ...> typing arguments.[CTRL+space] will give argument
completion, I have got function completion from other CFC's
happening. It looks like Mark had already done some work here, but it
didn't seem to be called from anywhere.

I modified it so it will now identify your components via either a

<cfset foo = createObject("component", "bar")>

thus foo.[CTRL+space] will give you the functions on the "bar"
component

or via an IntelliJ style comment:

<!--- @cfmlvariable name="foo" type="bar" --->

It's not 100%, in particular there's no support for CFC's that reside
outside of your Eclipse project, and the way it identifies the
components is by file name only (it does not respect paths at this
stage).

All the stuff is in my branch for anyone that wants to have a look.
I'm not sure whether to initiate a pull request until I get more
feedback...

https://github.com/am2605/cfeclipse/tree/20120114-function-arg-completion

Andrew.

Mark Drew

unread,
Jan 16, 2012, 9:43:57 PM1/16/12
to cfecli...@googlegroups.com
Just heading to bed, will check it out tomorrow!

And yep, I think we can only really look at stuff that is in a project. remember you can add linked folders to a project so that is one way to create "mappings"

Regards

Mark Drew

> --
> 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,
Jan 16, 2012, 9:56:47 PM1/16/12
to cfecli...@googlegroups.com
That's a good idea (linked folders) - thanks for the tip.

Look forward to your feedback. I'm still finding my feet so I am sure
there's many things in there that I should have been done better...

Mark Drew

unread,
Jan 18, 2012, 7:04:51 AM1/18/12
to cfecli...@googlegroups.com
Hey Andrew

This is looking pretty damn neat! I have it my version, and it is a damn good start! 

I have created a ticket in github, and I wonder if you could assign a pull request for it?



Regards

Mark Drew

On 17 Jan 2012, at 01:49, Andrew Myers wrote:

Andrew Myers

unread,
Jan 18, 2012, 7:36:38 AM1/18/12
to cfecli...@googlegroups.com
Cool - happy you like it so far Mark.

Is there anything special I need to do to link my pull request to that
issue? Or do I just put the URL in the comment?

I'll tidy it up and do this tomorrow morning my time.

Cheers,
Andrew.

Andrew Myers

unread,
Jan 18, 2012, 7:38:03 AM1/18/12
to cfecli...@googlegroups.com
On 18 January 2012 23:36, Andrew Myers <am2...@gmail.com> wrote:

> Is there anything special I need to do to link my pull request to that
> issue?  Or do I just put the URL in the comment?

Think I just figured it put - I just push pull request from the issue.
Pretty obvious huh?!

Mark Drew

unread,
Jan 18, 2012, 7:40:48 AM1/18/12
to cfecli...@googlegroups.com
That should do it :)

MD

Andrew Myers

unread,
Jan 19, 2012, 12:43:02 AM1/19/12
to CFEclipse Developers
As I find issues with this, do you want me to log them on Git? I
intend to fix them, but I didn't know whether or not it was worth
putting them in...

Randy Merrill

unread,
Jan 19, 2012, 1:08:47 AM1/19/12
to cfecli...@googlegroups.com
If you are fixing issues before it is merged into the main branch then you can just keep pushing to your branch that you did the pull request from and it will update the pull request with the new commits.

If they are for different things, other than the specific work you are doing then they should probably be separate issues in github if they are not there already.
--
Randy Merrill

denstar

unread,
Feb 21, 2012, 5:36:32 AM2/21/12
to cfecli...@googlegroups.com
On 1/16/12 6:49 PM, Andrew Myers wrote:
> I spent the weekend playing around CFE's source and now I've become
> shall we say a little bit obsessed.
...

WOOT! (the contributions are freaking swell too! ;])

I must say it's been *awesome* to see folks picking up the slack. At
least if I get hit by a bus, CFE will be fine, just fine. Warms the
cockles.

But that's what it'll take (a bus, or meteor, etc.) for me to not wank
around with the most awesomest open source CFML editor!

So, long story short:

I know kung- er- ANTLR!

Not really. Saying that is like saying I know regular expressions, or
God or something. But still. We're lexing and parsing cfscript, and I
mean tits style!

Some of my knarly-est script is passing. Errors are marked. Functions
defined in other cfcs are populating our contextual assists (just
piggy-backed on the stuff Andrew/Mark did).

I haven't gone /too/ nuts on the grammar, as I'm hopeful that OpenBD can
use what I've done to get <cfscript>less cfc parsing, ternary and other
things Railo has rocking. It *is* geared for Railo (no required
semi-colons, the aforementioned ternary stuff, etc.) but it's easy
enough (ha!) at this point to put it back into more of an ACF/OpenBD
style deal. We'll need at least two grammars, perhaps 3 to have all
engines covered. Better that way than to try to have one uber-grammar
with ifs and whatnot. We'll see what the OBD folks think...

And then we should go NUTS with a REAL DAMN MODEL. I don't mind using
XML as the backing store still (XPath is pretty cool for traversal), or
we could use pure objects (the ANTLR treewalker will build whatever we
want), but regardless, we need a "real" model, vs. the current XML
/style/ model (you can describe whatever you want with XML, it doesn't
have to /be/ XML itself).

Anyways, this is all in the cfml.parsing project, (which we were already
using for the parsing) and as such, we've got a stand-alone parser that
can be used for lots of different things besides an IDE.

Anyhoo, I pushed a dev build out, but I have not tested it (I'm running
it locally, obviously, but I like to try to download/install a fresh
copy myself prior to telling other people to) so it might be awful.

If you see an outline while editing script based cfcs though, you'll know.

I'll just note that this allows us to do ALL KINDS of freakishly cool
things now. Quick fixes, yadda yadda. The missing info is there in
spades.

:Den

--
After twelve years of therapy my psychiatrist said something that
brought tears to my eyes. He said, "No hablo ingles."

Andrew Myers

unread,
Feb 21, 2012, 6:15:45 AM2/21/12
to cfecli...@googlegroups.com
On 21 February 2012 21:36, denstar <vallia...@gmail.com> wrote:
> Anyways, this is all in the cfml.parsing project, (which we were already
> using for the parsing) and as such, we've got a stand-alone parser that
> can be used for lots of different things besides an IDE.

Or, for lots of IDE's ;-)

http://wiki.netbeans.org/New_Language_Support_Tutorial_Antlr

Reply all
Reply to author
Forward
0 new messages