IDEA 9 cannot find Flex SDK sources

I am debugging Maven-enabled Flex project using IDEA IU-93.13 and need to step into the source for the SDK classes.  I have specified the Flex 3 SDK under Platform Settings of the Project Structure dialog.  When I did so IDEA correctly created an entry "flex_sdk_3 (player 10)" with the Sourcepath tab correctly containing references to source paths to the Flex SDK files.

However things don't seem to be working correctly as when I try to load an SDK class (for instance ComboBox) I get the library.swf file and not the actual source file.  Among the source paths is:

[Flex SDK root]/frameworks/projects/framework/src

where I have verified that mx/controls/ComboBox.as does in fact exist.

Also whenever I attempt to step into the SDK source from my projects source the debugger locks up.  In the idea.log I see:

2010-01-06 15:19:10,123 [ 256513]  ERROR - pt.flex.debug.FlexDebugProcess - Can not retrieve file name for 546 short name:ComboBox.as
java.lang.Throwable: Can not retrieve file name for 546 short name:ComboBox.as
    at com.intellij.lang.javascript.flex.debug.FlexDebugProcess.findFile(FlexDebugProcess.java:593)
    at com.intellij.lang.javascript.flex.debug.FlexDebugProcess.findFileByNameOrId(FlexDebugProcess.java:549)
    at com.intellij.lang.javascript.flex.debug.FlexDebugProcess$DumpSourceLocationCommand.onTextAvailable(FlexDebugProcess.java:1103)
    at com.intellij.lang.javascript.flex.debug.FlexDebugProcess.processOneCommandLoop(FlexDebugProcess.java:355)
    at com.intellij.lang.javascript.flex.debug.FlexDebugProcess.access$200(FlexDebugProcess.java:67)
    at com.intellij.lang.javascript.flex.debug.FlexDebugProcess$3.run(FlexDebugProcess.java:220)
    at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:328)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

Can anyone tell me how to go about resolving this issue?  Thanks.

2 comments
Comment actions Permalink

I've opened an issue for the exception: http://youtrack.jetbrains.net/issue/IDEADEV-42201

But nevertheless it is possible to debug flexmojos projects. You should not change Flex SDK. Special Flexmojos SDK is automatically created when you import Flexmojos project as described at http://blogs.jetbrains.com/idea/2009/09/flexmojos-inmaia/ and it should remain unchanged.
In case of maven project all dependencies (swc files) are configured as module libraries. So you need to do some manual work and to attach appropriate sources to each library. For example to be able to step into ComboBox.as file you need to set <Flex SDK>/frameworks/projects/framework/src as a source folder for library 'Maven: com.adobe.flex.framework:framework.swc:<version>'

0
Comment actions Permalink

Thanks Alexander for the response.  IDEA was in fact able to load the Flex source files after as you suggested I made sure the sources were added to the Flex module's Dependencies tab and not to the configured SDK under Project Structure as I had done.  Thanks!

0

Please sign in to leave a comment.