Customised URLs for CFEclipse

May 25 2011

Customised URLs for CFEclipse

Posted by AJ Mercer at 4:27 PM CFElipse | CFML | cfwheels | Railo

CFEclipse has the ability to view web pages right in the IDE itself. This is fine if the page you are working on is in the webroot, but if you are working with a MVC framework like CFWheels or FW/1, then things are not so great - until now.

Mark Drew has just closed a ticket that adds this functionality, which at the time of writting this blog is avaliable from http://cfeclipse.org/update-dev.

For a CFWheels project, the view templates are stored in the views directory. Right-click this folder and navigate your way to CFElipse -> Edit URL

step one

Now this is where the enhancement has been added - snippet constants. There are two that help us out here: $${CURRENTPRJPATH} and $${CURRENTFILENOEXT}. As CFWheels uses a conventions base stucture we are able to tell CFEclipse what the URL will look like

step two

NOTE: your web site needs to have rewrite rules set up already for this URL.

Now after making a change to a view file, click on the brower icon in the tool bar and admire your work.

step three

See the URL - pretty damn sweet :-)

Comments

AJ Mercer

AJ Mercer wrote on 05/26/11 12:53 PM

I added a URL to my Controller folder as well
http://localhost:8080/$${CURRENTFILENOEXT}