Category: Java

Mar 14 2007

Interesting features of Eclipse 3.3

I know Eclipse 3.3 hasn't been released, yet, but I was looking at the latest stream build's notes on what is new and noteworthy and I found a few things that might be of interest to people that use CFEclipse and have had some bugs or issues with it. Mozilla everywhere Mozilla can now be used as the underlying browser control on Windows and OS X, providing that you have XULRunner installed and registered. To use this just create your Browser with the SWT.MOZILLA style. This means we can set the default internal browser to use Mozilla, which means (if I am reading it correctly) we could include Firebug and Ray's ColdFire. Open files with other editors You can now open files with editors that are not registered for the specific file extension. Right-click on your file and select Open with > Other. You will be presented with a list of editors to choose from. As it says, you can now choose what to edit those .tpl files (if you have made up a template extension) and quickly edit it in CFEclipse Text drag and drop in text editors It is now possible to drag and drop text to and from text editors This has been a long time coming. Spike implemented the drag and drop stuff in CFEclipse which has caused some problems with some users, and its a pain to have to implement something that should be part of the framework! Finally!!! (I breathe a sigh of relief) Configurable and extendable hyperlink detection Clients can use the org.eclipse.ui.workbench.texteditor.hyperlinkDetectors extension point to add their own detectors and can enable their viewers using the corresponding methods in the source viewer configuration along with the org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets extension point One of the nightmares of adding CFC introspection and linking is simply adding the (simple) hyperlink for the objects and telling it what to do. All the solutions I have been looking at so far look like hacks, so this is a much neater way of doing it! Great stuff! Reading more into past Eclipse 3.3 (M4) releases, there are other things that will make some issues disappear from my little list too. Show invisible whitespace characters It is now possible to see the invisible whitespace characters in textual editors: Such as space, tab etc. I remember there was a bit of a conversation about this in the cfeclipse user list (did I mention it moved to google groups by the way?) Spell checking in text editor Spell checking is now also available in the text editor As it says on the tin! There are many other improvements, some of which affect more plug-in and Java developers than the CF Community and that will definitely make my life easier! I just love it when a product starts getting better and better! I am also thinking of dropping support for Eclipse 3.1 (as if I did a lot of support for it! I know, I know!) as soon as Eclipse 3.3 is released (which I think will be this summer). I know this will affect people using FlexBuilder standalone, but the easy work-around is to re-install it as a plug-in onto 3.2 so I hope it wont cause major issues.

7 comments - Posted by Mark Drew at 1:15 PM - Categories: cfeclipse | coldfusion | flex | eclipse | Java

Jul 12 2006

Coldfusion handling Java null's

I have been reading a number of posts how to handle nulls in Coldfusion. Coldfusion doesnt naturally handle a "null" object returned from Java (as far as I can see, I have read a few posts and still no definate answer, so here goes for a couple of tips, just to keep myself sane and to remind myself. There are two ways that you can handle a null and it depends what the returned object is, firstly lets handle nulls where the returned object might be something simple like a number or a string, the easiest method would be to simplify the variable, so you can trim the result, if it is null, you will get an empty string: <cfset myString = CreateObject("java", "com.some.Class").init().getName()>

<cfif Len(myString)>
#myString#
</cfif>
The second method is used if you return complex data, such as an Array, Structure or Java Objects themselves: <cfset UsersArray = CreateObject("java", "com.some.Class").init().getUsers()>

<cfif isDefined("UsersArray")>
<cfdump var="#UsersArray#">
</cfif>
If someone has a better method of managing returned nulls from Java, please let me know and I can update this post.

10 comments - Posted by Mark Drew at 5:28 PM - Categories: coldfusion | webdev | Java | reference

Search Archives

Categories

coldfusion cfeclipse personal apple cfconferences webdev model-glue blogging ukcfug cfunited coldspring adobe scotch on the rocks presentations cfobjective lost reactor jobs flex eclipse ajax model-glue frameworks max reference google podcasting fusebox ask md spam railo eventvalidation donations tattoo snipex music microsoft fusiondebug flying blue dragon air wishlist tips rant open bluedragon java graphic novels funny eventguard derby blog aptana apple xml webservices transfer tashr subversion spry regex quack pownce podcast ooops mvc metrics jquery itunes hosting groovy gadgets flash firefox doh! directing development coldfusioncamp codeshare cfug cfonwheels cfdevcon apollo

Monthly Archives