Uncategorized
Building Flex without Flex Builder
I have been playing with Flex this whole week. I have the server running on my PowerBook, and I have been having so much fun.
I started out just editing files by hand. This was not a good path. So I got the trial copy of MyEclipse. MyEclipse has editors for html, css, js, xml/xsd/xsl/dtd, Database Explorer and many others. I feel that at a $29.99 per year, this is a bargain. And with CFEclipse already taking care of all my coldfusion needs, I am now set.
Anyway, back to the story. So now I at least have syntax highlighting for my mxml files. This is a bit help in sorting out my docs. But I want more. I think that code insight/tag hints can be a really great learning tool. You know the tag you are looking for is H-something but you are not sure which? So I set up the mxml.xsd file in myeclipse which allowed me to have all that. Now in addition to customizable color syntax highlighting I also have tag completion and attribute insight.
To set this up in MyEclipse, open your “Preferences”. Navigate through the tree view to MyEclpse>Editors>XML>XML Catalog. On this page Select the “New” button below the first entry box to start a User Specified Entry. In the URI file browse to the location of your mxml.xsd file. In the “Key” field put “http://www.macromedia.com/2003/mxml” (w/o quotes). The key type will auto matically switch to public id. Press “OK” and you should be ready to go.
The only other thing you may want to do is associate your .mxml files with the MyEcipse XML editor. This can be done in Preferences under Workbench>File Associations.
I am sure that Flex Builder is a great application but since I use OSX and Linux as my OS of choice, this is a great alternative. And since I am already in Eclpise for my CF work, I am set.
30 Jan 2005 Simeon

The only other note, is that if you did your install on windows, you can find your mxml.xsd inside your install directory in extras>schema.
How are you previewing your work? View your local webserver? Do you save and upload your file, and then go to view your compiled MXML via your web browser?
Well I my local machine set up as my development environment so I can just save locally, and preview.
In my eclipse I have a browser view, I believe this comes from my CFE plugin. This allows me to have my code in the screen above, and preview below.
I suppose if you have your box set up so that you can save files to your dev box (mapped drive or whatever) then it could work the same.
We use the Oxygen XML Eclipse plugin for MXML - would be interesting to see how it’s XML support compares with myEclipse. What do you do to edit actionscript (about 70% of the Flex application code we work on is as2). I’m using the flash editor at the moment - there is a very alpha as2 eclipse plugin around though.
Robin
Thanks Simeon–I’ve been meaning to get off my butt and get a good Flex development solution going on my PowerBook, and this has given me the motivation I needed! I hadn’t heard of MyEclipse but it looks interesting and very reasonably priced. With that and CFEclipse Dreamweaver may be on its way out on my PB …
How many of you would be interested in paying for a Flex plugin for Eclipse?
Say someone was to have the crazy idea of writing one and selling it as a commercial product. Obviously the quality of the product would determine the volume of sales, but I’m curious about the level of interest.
Probable list of features would be tag and attribute insight for mxml, function insight for AS, preview editor so you can view and possibly drag items around without compiling the SWF. Similar to what you get in <strike>DreamW</strike> *ahem* Flex Builder
Sounds very cool Spike–as always it would depend on the price. The going rate for "pay" Eclipse add-ons seems to be about $30 or so, so if it worked well and had all those features, I’d pony up for it! I think Flex Builder on the PC is decent but I personally don’t ever use the design stuff (I turned it off permanently for performance) and I prefer to do development on my Mac, so direct integration with Eclipse would be cool.
Okay guys, I installed Flex and MyEclipse, but I can’t seem to find the xsd that you mention. At first I thought it was something that I had in my flex install on my linux box, so I put it on my Powerbook, but I still can’t fine it.
I’d really like to use Eclipse as well and I like having code complete.
Thx.
M@
I was only able to find it via an install of flexbuilder. So I uploaded the file and linked it in the entry.
Try the link above to get the file.
Good Luck. Let me know if you run into any other problems.
So after three months I’m finally having a chance to try this, and I think something’s amiss. I’m on Max OS X with Eclipse 3.0.1 and MyEclipse. I’m going through the instructions you have here, I downloaded the XSD, but when I get to the "Key" field part, for me it doesn’t switch to public id, it has Namespace Location as the value with an alternative choice of Schema Location. I just kept the default but it doesn’t do tag completion or any tag insights at all. I tried quitting Eclipse and restarting but no luck. Any ideas?
Well as I go back through this i go through these steps.
1. Navigate to xml catalog preference screen.
2. Select "new"
3. Browse to the mxml.xsd. (at this point my "key type" switches to "Namespace Name")
4. then I pasted in that string above into the key field.
So after a little testing I see that if i paste the key value in the uri field then I get the public Id setting. Which upon further inspection doesnt appear to do what I want.
so based your results matt, I am guessing that its not finding your mxml.xsd file. But i am not sure why I think that :)
hit my on IM and I will help you troublshoot that.
[...] you’ll have to “rough it” for the ActionScript portion. Here is a tutorial for how to work with Flex without FlexBuilder using MyEclipse; I believe you can do the same thing (link not validated) using the WTP install of Eclipse since it [...]