Calendar

May 2005
S M T W T F S
« Apr   Jun »
1234567
891011121314
15161718192021
22232425262728
293031  

Tag Cloud

Categories

Archives

Recent Posts

Recent Comments


« SyneregyFLEX Review | Main | Shermin-Williams »

Eclipse for Flex Development

By Rich Tretola | May 4, 2005
10,126 views

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.

If you do not already have eclipse you can download it for free at eclipse.org.
You will also need a get trial license for OxygenXML here or myEclipse here

First we will install the OxygenXML plugin for .mxml files or you can choose the myEclipse plugin instead.

OxygenXML Install

  1. Choose Help -> Software Updates -> Find and Install
  2. Choose Search for new features to install and click next
  3. Create a new Remote Site Name: OxygenXML URL:http://www.oxygenxml.com/InstData/Eclipse/site.xml
  4. Check the box next to the new OxygenXML remote site and click next
  5. 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.

  1. Choose Window -> Preferences -> Oxygen -> Editor -> Tag Insight -> Default
  2. Click new
  3. Namespace: http://www.macromedia.com/2003/mxml
  4. Root local name: <ANY>
  5. File name : <ANY>
  6. Schema Type: XML Scema
  7. Schema URI:  Browse to your mxml.xsd file located in your flex install root\extras\schema
  8. Move your new entry up to the top of the list
  9. Click OK
  10. Choose Workbence -> File Associations
  11. Click Add and type .mxml as the file type and hit ok
  12. Scoll the list of file types and select *.mxml
  13. Add Oxygen XML Editor as the default editor
  14. Choose Window -> Prefernces -> General -> Content Types -> Text -> XML -> Oxygen XML
  15. Click add File Type: *.mxml and click OK

myEclipse Install (instead of Oxygen)

  1. Windows then Preferences then Workbench then File Associations
  2. Add “.mxml” and associate it to MyEclipse XML Editor
  3. Windows then Preferences then MyEclipse then Editors then XML then XML Catalog
    select User then Specific Entries and New
    enter URI= C:/Flex/extras/schema/mxml.xsd (located inside your Flex installation folder)
    enter Key Type= Namespace Name
    enter Key= http://www.macromedia.com/2003/mxml
    MyEclipse is a great addition to Eclipse, it includes plenty of plugins for J2EE and web development:
  4. Select User Specific Entries and click New
  5. Path to mxml.xsd file
  6. Name
  7. Key= http://www.macromedia.com/2003/mxml
  8. 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 8) 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.  We’ll talk more about Hibernate in the near future.

    Topics: ActionScript 3, Eclipse, Flex Tools | 7 Comments »

    7 Responses to “Eclipse for Flex Development”

    1. Flex Development Says:
      July 20th, 2007 at 6:46 am

      Hey,

      thanx for the nice tips. I will surelly use some of them!

      Reply to this comment

    2. Madhav Says:
      July 9th, 2008 at 2:48 am

      hi

      i am using MyEclipse 6.0.1 GA version,
      i followed the steps to edit the mxml files in eclipse.
      i installed the oxygen plugin , after that i ddnt find any tag insight in oxygen editor
      ******************************************
      Now that the plugin has been installed and you have restarted eclipse, just complete the following.

      Choose Window -> Preferences -> Oxygen -> Editor -> Tag Insight -> Default
      **************************************

      will u please help me how can i edit the mxml files in myeclipse please

      Reply to this comment

    3. everythingflex Says:
      July 9th, 2008 at 4:55 am

      These directions were for Eclipse 2 with Flex 1.5. They will not work with a current version of Flex.

      Reply to this comment

    4. Evans Says:
      November 13th, 2008 at 5:37 pm

      Nice blog post – but I still have trouble getting an answer to my question: What plugins do I need to install in Eclipse to be able to write and run Flex 3 applications??

      Almost all the tips I’ve seen online keeps talking about many different countless downloads and plugins. Is there no simple/single download that one could make and start developing Flex apps? I don’t want to go to the route of buying a Flex Builder – as I don’t have the money :(

      I’m on windows and just want a simple plug in or something to get me started quickly.

      Cheers

      Reply to this comment

      Rich Tretola Reply:

      You don’t need any editor, if you wish you can write your Flex code with a simple text editor like NotePad. Then compile your application using the free Flex SDK.

      Flex Builder simply eases the process by providing an editor that has visual layout tools and code completion. It also eases the build process by talking directly to the SDK.

      Reply to this comment

    5. Shilpa Desai Says:
      February 5th, 2009 at 2:28 am

      Hello,

      I have query related to selection of mxml.xsd file in eclipse.
      Can any one tell me that where it is present. As of in Flex installation folder so what to be installed related to flex…..

      Reply to this comment

    6. sharma Says:
      February 6th, 2009 at 6:17 am

      The tips are not working Eclipse 3.3.2

      Reply to this comment

    Comments