Flex user

Hi, I'm a flex user since version 2 and i have always used flashbuilder. Now, considering the indifference of Adobe and the constant bugs you have with eclipse, I was thinking about changing IDE. Searching, I found Intellij and FDT. Of the two, I prefer Intellj for its customization and support for other languages. So, I installed the demo and I started to try to bring my work on this new IDE. With great regret, I still can not find a tutorial on how to work in Flex with this new tool. If there are any flex programmers using this, why don't you write down the steps for all the flex needs.

1. How to create a Flex Application. (easy to do, but it should be the first step of a complete tutorial)
2. How to include components.
3. How to include swc libraries.
4. How to include flex modules.
5. How to use RSL on main and modules.
6. How to compile and debug.
7. How to compile and run.
8. How to deploy with all libraries.
9. How to include PHP projects
10. How to debug Flex and PHP together.

I also have a question that already made me install and uninstall intelliJ 4 times. Can IntelliJ, when using RSL, copy the flex libraries to the out folder like flashbuilder does?

thanks.
Sal.

7 comments

Hi Sal,
thank you for your interest!
To switch to IntelliJ IDEA one may look through IntelliJ IDEA vs Eclipse Terminology, IntelliJ IDEA basic concepts, embedded ActionScript/Flex related help (also available online), tutorial about working with Flexmojos project, quick start with Flex project for Android, or just try without reading any docs.

If you have already configured Flash Builder projects, you may import them into IntelliJ IDEA. I'll publish a blog post later today with the example showing how to import FB projects. Note that import was greatly improved recently, so I suggest to use IntelliJ IDEA 12.1 EAP if you are going to do it.

1. How to create a Flex Application. (easy to do, but it should be the first step of a complete tutorial)

New Project | Flash module | follow wizard

2. How to include components.

I'm not sure what you mean. How to create mxml components? Project tree context menu (or focus Navigation bar, Alt+Home on Windows), select New (Alt + Insert) | MXML Component.

3. How to include swc libraries.

Do you mean how to setup dependency on 3rd party swc library? Project Structure dialog | Modules | <your module> | <your Flash build configuration> | Dependencies tab

4. How to include flex modules.

Do you mean how to configure runtime-loaded modules? Project Structure dialog | Modules | <your module> | <your Flash build configuration> | General tab. Or create a separate Flash build configuration with output type: Runtime-loaded module (RLM) and setup dependency of main app on RLM.

5. How to use RSL on main and modules.

Flex framework linkage is selected at Dependencies tab. Note that in case of RSL framework linkage IntelliJ IDEA uses signed swz from Adobe site, so you are not able to debug through Flex framework code.

6. How to compile and debug.

7. How to compile and run.

Create Flash App run configuration ( Run | Edit configurations...), click Run or Debug.

8. How to deploy with all libraries.

Deploy to soem application server? You need to configure an Artifact (Project Structure dialog).

9. How to include PHP projects

Install PHP Plugin (Settings | Plugins), create PHP module

10. How to debug Flex and PHP together.

Setup PHP run configuration, Debug it. Create Flash App run configuration. Debug it in parallel.

Can IntelliJ, when using RSL, copy the flex libraries to the out folder like flashbuilder does?

Unfortunately IntelliJ IDEA doesn't copy local RSLs to output folder automatically. I can suggest a workaround if you describe what you want to accomplish.

0
10. How to debug Flex and PHP together.

Setup PHP run configuration, Debug it. Create Flash App run configuration. Debug it in parallel.

Also you may use Remote Flash run configuration to debug already running Flash app.

0

Thanks a lot for your help! I tried all the 10 steps and i finally got one of my FlashBuilder projects to compile/run/debug inside intellij!!

There is still one thing that i didn't find a way to do, and its about the Flex SDK RSL libraries. Let me explain you waht i'm trying to do, so maybe you can find a solution for it. When i compile a flex project, it should know what sdk libraries are called from my application and so move these libraries from the sdk folder to the output folder on every build/rebuild.
2013-03-19_16-35-14.png
As you can see from the SDK list, many libraries have a RSL linkage type. From these, the build/rebuild process, should copy the ones used in the project and copy then to the out folder.
I haven't found any option that does that, so i wish there is a way to do it with the thousands of options thins great IDE has.

Before closing, i would also like to suggest a few features that could be very useful.
1. convert the field that now holds the resource patters into a list for better editing and reading. It would be nice to have "include/exclude extension", "include/exclude file/s" and "include/exclude folder" options to make things easier and more readable.
2. in project view, add a right mouse click option that lets us include files faster into the runtime-loaded modules list (project settings | modules | general)  I have flex applications with hundreds of runtime-loaded modules, and doing it with the actual dialod, took me a lot of time.
Thats all. Thanks again.

0

Workflow with Flex framework RSLs in IntelliJ IDEA is a bit different than in Flash Builder. There's no difference if resulting swf is compiled as debuggable or not. If you set Framework linkage to RSL then RSL paths are used in the say written in [Flex SDK]/frameworks/flex-config.xml, for example:

    <runtime-shared-library-path>
        <path-element>libs/spark.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/spark_4.6.0.23201.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>spark_4.6.0.23201.swz</rsl-url>
        <policy-file-url></policy-file-url>
    </runtime-shared-library-path>


I.e. first path is a network swz, second is local swz.
If you want to debug through the Flex framework code you need to temporarily set Framework linkage to Merged.
Unfortunately IntelliJ IDEA doesn't copy used RSLs to output path. Corresponding requests are http://youtrack.jetbrains.com/issue/IDEA-70670 and http://youtrack.jetbrains.com/issue/IDEA-65661

You may file reature requests for your suggestions. I'm not sure if resource patterns field will be redesigned (that's not my responsibility), but right-click configuration of RLMs sounds reasonable for me.

0

We are switching to IntelliJ, and intend to start using it for framework development in addition to our usual product development efforts, so I hope the IntelliJ team will consider how custom software shops need to use a good IDE for both application development, and framework development.

Therefore, using Adobe's libraries in the IDE is totally unacceptable to us, since we frequently troubleshoot and fix framework bugs years before the patches get accepted into the official builds.  Our copy of the framework (for both debug and release builds) is always a custom version.  We need complete independence from Adobe / Apache in terms of the framework libraries.  

I have voted on both of the requests cited in this thread.  Thanks for pointing them out, but it does concern me that they are two years old, without a resolution...

0

Ok, scheduled for the next IntelliJ IDEA major release.


0

Please sign in to leave a comment.