Flash Snippets panel for Flash Builder 4
I am releasing an early test version of the snippets panel that I have been working on for Flash Builder 4. Now this panel is essentially a re-skinned version of the great SnipTreeView panel that I modified to also work with MXML files. Now when I say this is an early version I really do mean it. Expect it not to work and if it does, well you will be pleasantly surprised then. Download the JAR file and place it into your Eclipse plugin folder. I am only really targeting Flash Builder 4 but you can try your luck with Flex Builder 3.
Please watch the video below to see how to use the panel and let me know in the comments if it worked for you. If it didn’t please let me know your OS, Eclipse version, and Builder version. Hope you like it!
Lee




Error in Flex Builder 3.0.2 :
java.lang.UnsupportedClassVersionError: Bad version number in .class file
Very cool Lee. Awesome work.
@Pradeek yes other people using Flex Builder 3 have had this error. I won’t be trying to make it work for FB3.
Thanks @John! Glad it worked for you.
Works great in Flash Builder beta 2, MacBook Pro. Thanks!
Hi Lee,
Great work on this snippet tool. Works perfectly in Eclipse Ganymede on both Win and Mac.
I also noticed that there’s an option to use a snippet as template. Does that mean you can create component templates for Flex using this tool? That would be awesome.
And another question: can you share the snippets? I mean like I create a bunch of snippets and my colleagues can also use them.
Cheers, Steven
I copied the jar file to the plugin directory, but nothing happens. Are you using the standalone version or the eclipse plugin?
/David
@David I’m using the plugin version with the latest version of Eclipse.
hello Lee and thanks for sharing this. I use CFEclipse snippet plugin and question: is there any way to include/import my old CFE snippets in your panel?
Cheers, Roberto.
Error in Flex Builder 3.0.2.214193 :
java.lang.UnsupportedClassVersionError: Bad version number in .class file
Lee,
Awesome work. Loving this so far.
3 things I have noticed:
1. If I create a new snippet with the same name as another, it overwrites without a prompt or error.
2. Not able to delete multiple snippets with trash can icon. Only able to delete one at a time if multiples are selected and right click>Delete Snippet.
3. If I edit a snippet but only change the name it creates a new snippet. This is great if I want to quickly duplicate one and change something within, but not as much if I just want to change the name.
**OSX, FB4b2 Standalone
Otherwise this panel is freakin sweet.
this is my error: Im on Mac and Flash builder beta 2.
Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165)
and lot more….
Finally a fantastic plug-in! Great Job Lee!
Can you share your snippets, please?
Cheers, Alessandro.
Hi lee, really great idea. using the CFM package just for snippets was annoying really. I’m using it with Galileo, works well so far.
Here is what I’d like to find in that panel, let us know if something is already possible:
1. import/export to save snippets (xml)
2. duplicate snippets
Thanks again.
Romu
Awesome! works great! Are you planning to implement import/export functionality? Thats the only thing missing imho. Apart from that, fantastic plugin. Many thanks for that
I had a problem
Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView.
(Flash Builder beta 2, MacBook Pro, OS 10.5.8)
Lee,
This is really very nice and I can’t understand why this feature is still missing from FB. I use FDT and FB’s lack of snippets is one of the main reasons for this. I think snippets are my single biggest time-saver after code completion. Whenever I’ve had to use FB in the past I feel handicapped without them.
Totally trivial question: will there be any way to customize the icons? I’m kind of a fan of Fam Fam Fam’s.
I’m looking forward to updates, great work!
Hi Lee,
great snippet tool. looks nice to work on your tutorials.
just info:
but on my standalone flash builder version 4.0 (253292) I always get the error: the plug-in FLash_Snippets could not load the org.cfeclipse.cfml.views.snips.SnipTreeView Class.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method) …..
I saw cfeclipse isn´t beta anymore.
cheers chsoe
Just to confirm it also works with the standalone FB4.
It’s a major time saver really!
Thanks!
Might I suggest people list there version of java as well. I noticed this snippets panel worked on 1.6 but noticed the same error with Java 1.5.
Lee I’m guessing you compiled this on a computer running Snow Leopard?
Working fine, Thanks Lee
Hey Lee! great work again, wondering if your planning on reworking the Flash Test extension. Its something I really miss not having in FB4.
Hi! Thanks for this time-saver. is the source available somewhere?
Greetings, Oli.
Downloaded and installed perfectly. Added a few snippets and I am now flying through tedious code typing! Another brilliant app that should have be integrated in Flash Builder!
Thank you!
Noticed a small glitch on osx 10.6 and FB 4 standalone beta2.
If you detach one of your windows (e.g. when using multiple screens and you dragging the console to the second screen). The code editor loses focus after you add a snippet. So your cursor isn´t active anymore.
JUST ASK US.
hello,
someone can help me/us to resolve the error: he plug-in FLash_Snippets could not load the org.cfeclipse.cfml.views.snips.SnipTreeView Class.?
I’m om mac os 10.5.8, java version “1.6.0_15, fb4 beta 2. What’s wrong?
Where looking for?
Lee,
awesome work! Been using it really often and it works fine for me.
Little tool but a big time saver!
Only things I would add is drag&drop to get a snip in another folder and multiple deletion.
@Steven Peeters
You can view the XML files of the snippets in your workspace folder/.metadata/Flash_Snippets/snippets/
Kind regards,
Aiden
[...] an early alpha version of a snippets panel for Flash Builder 4. If your interested check it out here. Share and [...]
I cannot download it by linkage.
Thanks for your effort Lee. It’s working great!
Hey Lee,
Awesome job! I saw your tweet about this just a day after I spent hours looking for a snippets panel for FB4.
One feature request: The ability to default a field value based on a highlighted term.
So, if I have a for loop snippet, I could highlight the name of the array to loop through, and have it replaced with the snippet code.
Love it! So quick and easy to use. You are the greatest asset to the Flash community.
There is something I am curious about, though. In your example, say you choose MouseEvent, but it isn’t already imported into that class at the top. Is there a shortcut to add all necessary classes to the imports list?
I know Shift-Command-O removes all unnecessary classes, but is there one that will add the relevant ones?
I am not familiar with the format your movie is in, what is Quicktime?
Where is the Flash version?
I could be missing something pretty obvious here, but what is the keyboard shortcut to insert the comment once you type in the trigger text? I believe the video only mentions it as the “keyboard shortcut”, but never states what it is…
@Michael I went over how to customize the default shortcut which is SHIFT+SPACE.
@Lee: My apologies for not watching the whole video. Skimming is not your friend! Thanks!
Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView
(Flash Builder beta 2, Windows7)
Awesome modification to the Snip Tree View Panel. I was able to get it to work on my work computer, but not on my personal computer. The only thing different from the two systems that I can see is that my work computer is using Snow Leopard and my personal computer is just using Leopard. Here’s the specs if you need. Thanks again and hopefully when I upgrade to Snow Leopard I can use this panel both at work and play. Thanks Lee!!
Workstation
Snow Leopard 10.6.1 or 2
MacPro
Eclipse eclipse-php-galileo-SR1-macosx-carbon
Adobe Flash Builder Plug-in Beta 2
Homestation
Leopard 10.5.8
iMac
Eclipse eclipse-php-galileo-SR1-macosx-carbon
Adobe Flash Builder Plug-in Beta 2
@lee thanks for the plugin it helps a lot : )
i just created an google code project in order to collect some this snippets, hope that somebody found them useful
http://code.google.com/p/flash-panel-snippets/
for more info checkout this post:
http://ozipi.com/?p=23
Thanks again and please don’t forget the kiss-doug-mccune errand from the paris talk
[...] taking a look to the flash snippets panel from lee brimelow i thought that it would be nice to have a snippet common-share-place, then i just [...]
I’ve written an eclipse monkey script which is doing a similar job, but in a conventional way. I’d recommend you to have a look of that.
http://www.slideshare.net/halfmile/convention-generator-yis-eclipse-monkey-scripts-for-flash-builder
@lee
it’s so a lot of wonderful scared stuff out there, every day i find out there is new awesome framework or repository, how can get things handy and not to go out of date, when things move so fast? give me an advice, how to work with it? how to create something without scare that it’s already out there, made ten times better and faster?
10x
i was on a trip for 2 days and came up to 439 unread posts in news feeder mostly connected to flash and client relations blogs
Love the icons in the “Flash Snippets” panel. Quite stylish.
Hi all, and here again. It seems quite obviuos from the posts that for people running on Leopard are having issues making this plugin working. Can someone expain something more or/and help others?
Thanks.
Me, again, im on Mac osx 10,5,8 and with flash builder beta, and the error is always: Could not create the view ……
the snippet panel is great. But I cannot play the short tutorial video…….>_<
Looks so great, thank you for sharing Lee.
But… I’ve got the same error as many :
“Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView”
Does someone have a solution ?
ty
Hi, your snippet panel works great on my flexbuilder 3 plugin on top of eclipse ganymede.
The flexbuilder is on my portable disk and the snippets that i have created at my computer at home have not appeared at my computer at work.
Is this a bug or not. Also it would be great for the tab to work and jump to the next textfield.
Failed to load source for: http://adobe.edgeboss.net/download/adobe/adobetv/platform_evangelism/snippets.mov
Everything works great for me, great project.
One suggestion though, I don’t know if it is possible but if you could put the code into the editor using a paste operation then Flash Builder will autoindent the inserted code.
Hey, Lee!
The Vid doesn’t work. It appears not to be existent.
Video isn’t working – broken link. Trying to figure out what the trigger is. shift+space not working. Does this still require the CFEclipse pannel to be showing to work?
Seems to be working in Flash Builder beta 2. Thanks lee
just an idea, it would be neat if there were some standard snippets preloaded by default. I’ve found myself inputing some standard ones several times.
private function _;
public function ;
private var, public var, private static const, public static const, etc etc.
Video is fixed now. Sorry about that.
Can I use this plugin with the Flash Builder 4? I put the file in my folder Plugin of my Adobe Flash Builder 4 and when I open the Show View window I not found the option of the Flash Snippet.
I forgot to say that I using the Flash Builder 4. The snippet does it?
Ty.
It’s been about three weeks since your last post.
problem solved!
[...] Flash Snippets panel for Flash Builder 4 [...]
Sorry. I don’t open the site for the jar. Can sent the jars to my email.
My email is xiaowananping@163.com
Thinks
great work, keep it up.
Hey @Aiden Tailor, thanks for pointing out the path to the snippets xml file. Now I can add em dashes using TextMate!
One thing that’s always driven me crazy about the CF Snippets plugin is that it won’t let me put in em dashes (—) which I usually use to make my comment blocks since (at least on a Mac), it creates a nice unbroken line in FB.
Example…
//————————————————————
// A NICE COMMENT
//————————————————————
just looks better than…
//——————–
// A UGLY COMMENT
//——————–
Not sure why but all the unbroken white space makes things more legible for me.
Try putting in em dashes in the CF Eclipse plugin though and it won’t trigger and instead it spits out a weird error when u open up the editor again. But swapping them in the xml seems to work just fine.
This makes so much sense, instead of re-writing the same code. Thanks.
i got an error
using flash builder 4 beta
‘Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView.’
Java: 1.5.0_20
MacOS: 10.5.8
Flash Builder: 4.0 Beta 2 (build 253292)
Eclipse: 3.4 (Flash Builder standalone install, not Eclipse plugin)
Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:328)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2127)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1062)
at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3773)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3770)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3746)
at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:109)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
at com.adobe.flexbuilder.standalone.actions.FlexBuilderWorkbenchActionBuilder$7.run(FlexBuilderWorkbenchActionBuilder.java:1353)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3474)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3064)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java:99)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Hi Lee,
it’s work very very very NICE!!!!!!!!!!!!!! So sry FDT but i have all thinks what i nedded
…
Many many many many many big thx Lee…
best regards
Francis
[...] Snippet panel for Flash Builder 4 [...]
Works splendidly in standalone FB4 Beta 2
OS: Windows Vista Professional
Flash Builder: 4.0 Beta 2 build 253292
Eclipse: 3.4
Java: 1.6.0_17
Many thanks for this and for your gotoAndLearn tutorials.
Kevin
Works great! Thanks Lee!
David
[...] Flash Snippets panel for Flash Builder 4 ?????? | Trackback 2009? 12? 14? | Posted in ??? ??: « Eclipse?Shift-JIS??????? ????????????? [...]
How do you backup your snippets
Where are the snippets saves and can you back them up
where are the snipper’s saves and how can they be backed up
where are the snipper’s saves and how can they be backed up
p.s. when you get the Captcha wrong it delete your comment…
I love this… Thanks a lot!
It’s a very good plugin!
[...] course Lee himself made up a tutorial on how to use the snippet panel and you can see it on his blog. Furthermore you’ll find the [...]
Yet another who is having trouble in Leopard 10.5.8
Error
Could not create the view: Plug-in Flash_Snippets was unable to load class org.cfeclipse.cfml.views.snips.SnipTreeView.
I updated to java 1.6 and set it in Java preferences app to be the primary/default
thought that would work… not.
I suppose this is working in Snow Leopard and no one is mentioning that when they declare success.
hey lee,
thanks for that really cool panel. I just have one weird problem.
everything seems to work fine, but the the short cut doesn´t work?
the key shortcut does work on snippets tree view from cfeclipse
and i do not have any conflicts in the keys editing mode.
I also can douple click the snippets with my mouse and it works.
hopefully you or anyone has an solution??
would be sooo great.
thanks a lot,
chris