Author Topic: Flex MXML and Action Sctript colorization  (Read 9822 times)

brebey

  • Community Member
  • Posts: 58
  • Hero Points: 2
Flex MXML and Action Sctript colorization
« on: February 09, 2010, 07:56:38 PM »
Flex Builder 3 MXML files frequently contain embedded Action Script in them as follows:

Code: [Select]
        ...
    <mx:Script>
        <![CDATA[
            // Comment
            private function do():void
            {
                var newObj:Object = {label:"Data"};
            }
          ]]>
    </mx:Script>
    ...etc...
SlickEdit doesn't colorize the Action Script in the "<![CDATA[  ... ]]>" block.

How do I get the Action Script to colorize?
« Last Edit: February 09, 2010, 09:47:59 PM by brebey »

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Flex MXML and Action Sctript colorization
« Reply #1 on: February 10, 2010, 03:35:32 PM »
Right now, SlickEdit doesn't have the functionality to parse and colorize that ActionScript in CDATA blocks.  I filed a feature request for this, but it will most likely not make it in for SlickEdit 2010.  Since we probably have more customers using Eclipse with Flex, rather than SlickEdit with Flex, this is a good candidate for a feature that we could introduce in our Eclipse plug-in before standalone SlickEdit.  I'll be sure it gets looked at for the next version of the plug-in.

- Ryan

brebey

  • Community Member
  • Posts: 58
  • Hero Points: 2
Re: Flex MXML and Action Sctript colorization
« Reply #2 on: February 12, 2010, 05:47:21 PM »
I see that the Eclipse Core v3.5 is available.  I don't see a Flex Plug-in for Core 3.5, though.

If I upgrade to Core v3.5 from 3.4, will I lose my Flex Builder capability, or will the 3.4 plug-in work with the 3.5 core?

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Flex MXML and Action Sctript colorization
« Reply #3 on: February 12, 2010, 11:09:50 PM »
There is no Flex support plug-in distributed with Core 3.5 because when we were building Core 3.5 (based on Eclipse 3.5), Flex was only still supporting Eclipse 3.4.  Also, their new product (Flash Builder 4), which is still in beta, was not even going to be based on Eclipse 3.5...they were still going to be back on Eclipse 3.4.  Though I see now at http://labs.adobe.com/technologies/flashbuilder4/ that they are going to support both Eclipse 3.4 and 3.5.

Unfortunately, the Flex support plug-in built for Core 3.4 will not work with Core 3.5 because the Java .class files for our Flex support plug-in were compiled with 1.4 compatibility, and Core 3.5 requires Java 6 (we are planning on backing this down to Java 5 for our next release).  I am working on building a Core 3.5 compatible Flex support plug-in so that you can upgrade to Core 3.5 and still have the ability to set breakpoints in your ActionScript/MXML, etc.  I'll give instructions on how to upgrade and everything when this is all set...are you staying back on Eclipse 3.4?  Core 3.5 should work fine within that environment (although we can't officially say it's supported), I've been experimenting with it today.

- Ryan


brebey

  • Community Member
  • Posts: 58
  • Hero Points: 2
Re: Flex MXML and Action Sctript colorization
« Reply #4 on: February 16, 2010, 12:08:50 AM »
Ryan, in answer to your question below, I've decided to try moving forward from Core 3.4 to Core 3.5 for use with Flex, with the understanding that I'll get split-window capability but lose debugging.  I'd really like a Flex Plug-in for Core 3.5 so that I can get debugging, but split-window support is more important to me.  

Support in the Core for the "*_tile" and related commands would really be nice, too.

However, I can't get Core 3.5 to install with Flex Builder 3.  I've posted this issue separately.

Thanks for your support!
« Last Edit: February 16, 2010, 12:11:23 AM by brebey »

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Flex MXML and Action Sctript colorization
« Reply #5 on: February 16, 2010, 05:35:58 PM »
Unfortunately if you are using the Flex Builder 3 IDE (Eclipse 3.3-based), and not the Flex Builder 3 Plug-In (installable into Eclipse 3.4), you will not be able to have the split window capabilities.  This is because these features depend on an Eclipse command which didn't exist way back when Eclipse 3.3 was developed.  See the attached screenshot of what you will see when trying to run one of these commands.

There is a Flex support plug-in coming for Core 3.5.0.  Along with the existing functionality (in the 3.4 version), it will also have menu items for adding/disabling/removing breakpoints, adding watch expressions, and hover over tooltips for values when debugging Flex applications (will not work in ActionScript which is embedded in MXML).  See attached picture for a preview.

- Ryan