Although I love PrimalScript for Flex development on my pc, I was looking for a development tool to use on my Mac. I have been using eclipse for Java delopment on both pc and mac and have heard of others using it with several plugins for Flex (OxygenXML editor $$ and ActionScript 2 Plugin Free) so I went through the setup today and documented it below.
First we will install the OxygenXML plugin for .mxml files or you can choose the myEclipse plugin instead.
- Choose Help -> Software Updates -> Find and Install
- Choose Search for new features to install and click next
- Create a new Remote Site Name: OxygenXML URL:http://www.oxygenxml.com/InstData/Eclipse/site.xml
- Check the box next to the new OxygenXML remote site and click next
- Complete the install of the oXygen XML Editor and XSLT Debugger
Now that the plugin has been installed and you have restarted eclipse, just complete the following.
- Choose Window -> Preferences -> Oxygen -> Editor -> Tag Insight -> Default
- Click new
- Namespace: http://www.macromedia.com/2003/mxml
- Root local name: <ANY>
- File name : <ANY>
- Schema Type: XML Scema
- Schema URI: Browse to your mxml.xsd file located in your flex install root\extras\schema
- Move your new entry up to the top of the list
- Click OK
- Choose Workbence -> File Associations
- Click Add and type .mxml as the file type and hit ok
- Scoll the list of file types and select *.mxml
- Add Oxygen XML Editor as the default editor
- Choose Window -> Prefernces -> General -> Content Types -> Text -> XML -> Oxygen XML
- Click add File Type: *.mxml and click OK
myEclipse Install (instead of Oxygen)
- Windows then Preferences then Workbench then File Associations
- Add .mxml and associate it to MyEclipse XML Editor
- Windows then Preferences then MyEclipse then Editors then XML then XML Catalog
select User then Specific Entries and Newenter URI= C:/Flex/extras/schema/mxml.xsd (located inside your Flex installation folder)enter Key Type= Namespace Nameenter Key= http://www.macromedia.com/2003/mxmlMyEclipse is a great addition to Eclipse, it includes plenty of plugins for J2EE and web development:
- Select User Specific Entries and click New
- Path to mxml.xsd file
- Key= http://www.macromedia.com/2003/mxml
Thats it, you should now get tag insight when you are editing a .mxml file no matter which editor you decided to use.
Now on to ActionScript .as files
1) Download the AS2plugin from sourceforge
2) Copy the org.asdt_0.0.7 (or current version) to the eclipse/plugins folder
3) Restart eclipse
4) Choose Window -> Preferences -> Workbence -> File Associations
5) Click Add and type .as as the file type and hit ok
6) Scoll the list of file types and select *.as
7) Add ActionScript 2 Editor as the default editor. You can go into the ActionScript 2 preferences and change the color coding, paths, templates, etc.
You should now be able to work with both mxml and as files within eclipse. The OxygenXML editor also does a nice job with the Hibernate xml files which I use for the backend Java delopment for Flex. Well talk more about Hibernate in the near future.