Raymond Camden's Blog Rss

Snipex Code Released - CFLib Available in Eclipse

34

Posted in | Posted on 07-11-2007 | 6,395 views

Mark Drew has released the code for SnipEx. This allows anyone to setup a Snippets server for Eclipse. How is this useful? You can now browse the entire CFLib library directly from Eclipse. No more need to ignore my annoying ads. Just add:

http://www.cflib.org/snipex/snipex.cfc

As a SnipEx server. I noticed that the node shows up blank, but when you expand it, you will see all the CFEclipse Libraries and UDFs. You can then click for a description or double click to insert a UDF. How freaking cool is that?

I'm going to be doing a bit of work on the XML when I can. I noticed the libraries are not sorted so I'll try to fix that.

Comments

[Add Comment] [Subscribe to Comments]

Ray,

You say,"Just add: http://www.cflib.org/snipex/snipex.cfc";, but you don't say where to add it.
Chris: See Mark's post that Ray linked to.
I just update the CFEclipse wiki with some info:

http://trac.cfeclipse.org/cfeclipse/wiki/SnipEx
I don't get it. How do you see "CFLib" in the UI and I don't? I mean it works and all, but my node is blank.
Ray, I had to restart CFEclipse before I saw anything...
Nope. I just restarted. To be clear, I _have_ a connection to CFLib, I can browse the libs just fine. Its just that top level node is still blank. It has no label.
@Todd: Thanks man, I can't believe I missed that. I also missed that this was a 1.3.1.5 thing. Color me stupid. :o/ Well, it's a good thing it made me get off my lazy duff and install the newest CFE.

Cheers!
@Ray - have you tried removing the SnipEx URL, restarting and trying again? I imagine it's pulling that from the XML:

(snipex createdAt="" id="" name="CFLib" updatedAt="")

Or maybe it's a Mac thing? I'm on WinXP?

I noticed it doesn't show up in this screenshot on Mark Drew's site:
http://www.markdrew.co.uk/blog/enclosures/snipex_5...
CFEclipse SnipEx server location works CFlib.org doesn't.
CFEclipse 1.3.1.5 and eclipse 3.3 getting a Null argument error.
I'm afraid you may need to hit Mark for this. Outside of the blank label it is working fine for me. :(
@Ray - I don't seem to be getting *all* of the udf's in the lib. For instance the String Library only shows a handful (around six) udfs.

Is that the way it's supposed to be?
-sigh-

Blame the darn XMLFormat bug. There is a "high" character that is being ignored by XMLFormat, and therefore breaking the XML. This is one bug that didn't get fixed in CF8 that I really wished they would have fixed. :(
oh. Sorry. I didn't mean to pour salt in an old wound. ;o)
Yeah I'm at a point where I'm pulling my hair out. :(
The XML is fixed now, however, I only see a few entries in StrLib. When I view the XML directly, I see a butt load. Going to bug Mark on this.
I can browse just fine but when I double-click one to add it, all of the HTML characters are in their entity notations (e.g. < >). Very cool though!
Should be fixed now. You need to go into your workspace folder, .metadata/.plugins/.org.cfeclipse.cfml/snipex, and remove the XML and restart Eclipse.
Yup, working like a charm! Thanks Ray!
Ray, it appears that library id 5 has some xml formatting issues.

http://www.cflib.org/snipex/snipex.cfc?libid=5

Just wanted to bring it your your attention if you were not aware ;). Also thanks for making this available.
Should be fixed now, but you will need to clear your SNipEx cache. I'm about to post a new blog entry on how to do that.
Yep, works like a charm! Thanks Ray!
It seems that the cflib DSN no longer exists:

http://www.cflib.org/snipex/snipex.cfc

Datasource cflib could not be found.

Resources:

* Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debug Output Settings, and select the Robust Exception Information option.
* Check the ColdFusion documentation to verify that you are using the correct syntax.
* Search the Knowledge Base to find a solution to your problem.

Browser    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.10 (intrepid) Firefox/3.0.7
Remote Address    130.71.136.59
Referrer    http://www.coldfusionjedi.com/index.cfm/2007/7/11/...
Date/Time    20-Mar-09 02:53 PM
I recently moved servers and forgot to set this DSN up. I'll fix it soon.
Fixed.
Ray,
This is fabulous but I can't get the UtilityLib to load anything after the Magic8Ball. I cleared my SnipEx cache and reloaded the SnipEx code and still no luck.
Not sure what to suggest. I viewed the info directly in my browser, http://www.cflib.org/snipex/snipex.cfc?method=getl..., and didn't see anything amiss. May want to ping the CFEclipse folks - I'm a purely ColdFusion Builder guy now. ;)
You can browse CFLib via ColdFusionBuilder now:

http://cflibextension.riaforge.org/
Oh snap - I see a funky char in the UDF description. I'll edit the baby out and it should fix it for you.
It should work better for you now - may want to clear your cache though.
Thanks, Ray. It makes it all the way to SiNo now. Better, but I think there are some more after that.

Would love to use ColdFusion Builder but I can't seem to get it to wrap source code. I don't like horizontal scrolling when I code and some code can't be broken across several lines manually.
Check Terry Ryan's blog, I believe he posted this tip.

Here ya go: http://www.terrenceryan.com/blog/index.cfm/2009/7/...
I receive an error when I attempt to run this plugin:

Error Occurred While Processing Request
Invalid CFML construct found on line 160 at column 25.
ColdFusion was looking at the following text:
for

The CFML compiler was processing:

A script statement beginning with for on line 160, column 25.
A script statement beginning with { on line 157, column 65.
A script statement beginning with for on line 157, column 17.
A script statement beginning with public on line 147, column 9.


The error occurred in C:\ColdFusion9\wwwroot\CFLib Browser\handlers\components\builderHelper.cfc: line 160

158 :          var fieldOb = tableOb.field[x];
159 :          var field = {};
160 :          for(var key in fieldOb.xmlAttributes) {
161 :             field[key] = fieldOb.xmlAttributes[key];
162 :          }
Are you running 901 or just 9?
I upgraded to 9.01 and that fixed the issue. Thanks Ray.

[Add Comment] [Subscribe to Comments]