TeraTech

The ColdFusion Experts: Develop | Secure | Optimize

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

CFEclipse 1.3 Update – Part II

February 19, 2007 By Michaela Light Leave a Comment

Hello World,

In my last post I talked about two of the several new features of the CFEclipse 1.3 update. One of which was the Code Snippets feature. Although the Code Snippets has been a feature of CFEclipse for some time now most people (including myself) are either unaware of its existance or its features. I would like to revisit the Code Snippets in this post. I admit that I did not give Code Snippets the credit that it deserved. After playing around with the Code Snippets panel for more than 15 minutes I found that it has a bit more to it than one might think at first glance. So let's look a little beyond the first glance and explore a couple of the coolest features of the Code Snippets panel.

1) User Variables: One of the coolest features I found while using the Code Snippets was the use of variables in your snippets. You can define variables within your code snippet. Your variables can be defined as shown below:

$${yourvariablename}

Here is an example of how you would use the variable definition:

 

Now when you double click on your Code Snippet in order to place it into your code, a dialog box will be displayed prompting you for a value for the queryname variable. You can define more than one variable within your code snippet. See below:

 

Using this code snippet, the dialog box will prompt you for the queryname, days, hours, minutes, and seconds.

2) System Snippet Variables: In addition to being able to use your own variables you can also use the following System Snippet Variables:


$${DATE} - Enters the date as MM/DD/YYYY E.g. 11/30/2007
$${MONTH} - Enters the month as text E.g. February
$${TIME} - Enters the time E.g.: 7:29:58 AM
$${DATETIME} - Enters the date and time E.g.: 2/9/2007 7:29:58 AM
$${DAYOFWEEK} - E.g.: Friday
$${CURRENTFILE} - Current file name (just the file)
$${CURRENTFOLDER} - Current folder (The path to the containing folder)
$${CURRENTPATH} - Current path (full file name)
$${CURRENTPRJPATH} - Just the folder
$${USERNAME} - Current user
$${MONTHNUMBER} - Month as a number
$${DAYOFMONTH} - Day of month as a number
$${DAYOFWEEKNUMBER} - Day of week (the week starts on Sunday)
$${DATETIME24} - DateTime24 - a 24 hour clock version of datetime.
$${YEAR} - Current year.
$${YEAR2DIGIT} - Current two digit year.

Here is an example of you might use one of the System Variables:



As you can see this is a sample fusedoc that uses a couple of the System variables to automatically substitute the current file and the current date. A user variable is defined which will prompt for the responsibilities text.

CFEclipse TV

The CFEclipse.org site has added a new section called CFEclipse TV. This section hosts several screencasts describing some of the features of CFEclipse including Using Snippets for Speedy Coding and Getting Started.

<⁄post>

  • Facebook
  • Twitter
  • LinkedIn

Related Posts

  • CFEclipse Cheatsheet
  • CFEclipse 1.3 Update - Part I
  • CFUnited 2008 Update
  • What is CFeclipse Snippets and How to Use It?
  • Fusebox 6 - a status update

Filed Under: CFEclipse

← Previous Post CFEclipse 1.3 Update – Part I
Next Post → CFEclipse Cheatsheet

Popular podcast episodes

  • Revealing ColdFusion 2021 – Rakshith Naresh
  • CF and Angular – Nolan Erck
  • Migrating legacy CFML – Nolan Erck
  • Adobe API manager – Brian Sappey
  • Improve your CFML code – Kai Koenig

CF Alive Best Practices Checklist

Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.

Get your checklist

Top articles

  • CF Hosting (independent guide)
  • What is Adobe ColdFusion
  • Is Lucee CFML now better than ACF?
  • Is CF dead?
  • Learn CF (comprehensive list of resources)

Recent Posts

  • 060 Migrating legacy CFML to MVC (Model View Controller) with Nolan Erck
  • 129 MASA ColdFusion CMS (new open source Content Manager) with Guust Nieuwenhuis
  • 122 CFWheels ColdFusion Framework (new structure and features), with Peter Amiri
  • 113 ACF and Lucee Roundtable, with Charlie Arehart, Gert Franz, Mark Drew and Ben Nadel
  • 019 A Whirlwind Tour of Preside Application Framework in the Wild, with Alex Skinner

Categories

  • Adobe ColdFusion 11 and older
  • Adobe ColdFusion 2018
  • Adobe ColdFusion 2020 Beta
  • Adobe ColdFusion 2021
  • Adobe ColdFusion 2023
  • Adobe ColdFusion Developer week
  • Adobe ColdFusion Project Stratus
  • Adobe ColdFusion Summit
  • AWS
  • CF Alive
  • CF Alive Podcast
  • CF Camp
  • CF Tags
  • CF Vs. Other Languages
  • CFEclipse
  • CFML
  • CFML Open- Source
  • CFUnited
  • ColdBox
  • ColdFusion and other news
  • ColdFusion Community
  • ColdFusion Conference
  • ColdFusion Consulting
  • ColdFusion Developer
  • ColdFusion Development
  • ColdFusion Hosting
  • ColdFusion Maintenance
  • ColdFusion Performance Tuning
  • ColdFusion Projects
  • ColdFusion Roadmap
  • ColdFusion Security
  • ColdFusion Training
  • CommandBox
  • Docker
  • Fixinator
  • Frameworks
  • Fusebox
  • FusionReactor
  • IntoTheBox Conference
  • Java
  • JavaScript
  • JVM
  • Learn CFML
  • Learn ColdFusion
  • Legacy Code
  • Load Testing
  • Lucee
  • Mindmapping
  • MockBox
  • Modernize ColdFusion
  • Ortus Developer Week
  • Ortus Roadshow
  • Server Crash
  • Server Software
  • Server Tuning
  • SQL
  • Survey
  • Survey results
  • TestBox
  • Transcript
  • Uncategorized
  • Webinar
  • Women in Tech
  • Home
  • Services
    • ColdFusion Consulting
    • ColdFusion Development
    • ColdFusion Maintenance
    • ColdFusion Security
  • About Us
  • CF Alive
    • CF Alive Book
    • CF Alive Inner Circle
    • CF Alive full resources cheatsheet
  • Blog
  • Podcast
    • Podcast Guest schedule
  • Contact
  • Sitemap

The ColdFusion Experts:
Develop, Secure, Optimize

TeraTech Inc
451 Hungerford Drive Suite 119
Rockville, MD 20850

Tel : +1 (301) 424 3903
Fax: +1 (301) 762 8185

Follow us on Facebook Follow us on LinkedIn Follow us on Twitter Follow us on Pinterest Follow us on YouTube

 

(Gandalf, the CF wizard,

can often be found in Hobbiton)

Copyright © 1998–2023 TeraTech Inc. All rights Reserved.