Snippets in FlexBuilder
Snippets can be a real boon to development.
If you’re using Flex you will want something that can handle markup and well as code.
About this time last year I read an excellent blog post from fellow developer Jun, regarding snippets in Eclipse (read:FlexBuilder), but I had some issues due to incompatible versions of programs I was running (plus I found this nasty little bug).
I have just installed a fresh copy of Eclipse ( 3.3.2 ) & the FlexBuilder plugin ( 3.0.194161 ) … as well as getting the latest JDK ( jdk-6u6-windows-i586-p.exe ) in order to resolve this issue …. and I’m happy to say I was able to install and start using snippets straight away.
To do likewise you will need the Web Standards Tools for Eclipse (you can get this for the FlexBuilder standalone too, as FB still runs atop Eclipse, but you may run in to those version issues I alluded to earlier, and I generally advise using the plugin version of Eclipse rather than the standalone, as it gives you greater freedom).
Jun did a great job of posting about the Snippets tool, so I just wanted to add to that by clarifying how to install the WST from within Eclipse. Click on the thmbnails below for full size screen captures:
1. From the Eclipse Help menu, find and install software updates…
2. Check for new features to install…
3. Select the Europa Discovery Site (WST is listed under the Web and JEE Development subfolder)
4. Select ‘Web Standard Tools’. You may need to uncheck ‘Show the latest version of a feature only’. If an error symbol appears next to your selection (as shown in the screen grab) press the ‘Select Required’ button and Eclipse will automatically select any other updates upon which WST depends.
5. Follow the rest of the installation procedure, and finally restart Eclipse when asked. Once it has restarted, go to: Window -> Show View -> Other… -> General [folder] -> Snippets…
6. Add the Snippets panel to your workspace. To set up snippets, right-click on the panel and choose ‘Customize…’ . As you can see from the screen grab I have set up two headers, one of which is expanded to show my first snippet. Adding a snippet is an easy as double-clicking it.
For more screenshots of the Snippet tool itself, go here
8 comments
8 Comments so far
Leave a reply






[...] » Blog Archive » Snippets in FlexBuilder (tags: flex todo) [...]
[...] http://nwebb.co.uk/blog/?p=178 [...]
Just a small head-up – I found the WTP project under the “Dali Java Persistence API Tools (JPA) Updates” update site and not the Europe one descibed in the article…
(if you try to add http://download.eclipse.org/webtools/updates/ as a new remote site, it’ll tell you where it is…)
I used to have this installed, but when i tried to install subclipse, i ran into some issues… and had to disable it… and now even if i try to disable subclipse to get it back, i hit some walls and issues…
hope other people have better luck… seems like so many different people have so many different issues, based on the version that they downloaded on that particular day…
anyway, just figured i would throw it out there, that there may or may not be issues with it, i’ve got one computer at work that i don’t seem to have the issues on, and one at home that i do… so it’s pretty odd….
org.eclipse.xsd.edit, i get this error when trying to add it to eclipse through the updates… saying i need something compatible with 2.0.2, when it looks like the version of eclipse i have is only 2.0.3 compatible…
thanks.
Axel
I sure hope this will work. I “wasted” 5 hours looking for stuff that works. so: fingers crossed – thanks!
[...] WST Snippets install instructions [...]
[...] feature is less like the WST Snippets feature that you can install as described here and here, and more like how TextMate or TextExpander expands short text abbreviations. Really, this is a [...]
[...] from happening. Again, not at all essential here, but it’s not a bad habit to get in to and I have a snippet which generates my getter/setter code for me anyway, so it wasn’t any additional [...]