Flex development experience with IDEA 9.0.2
I just completed about 100 hours of Flex development on a large flex web-based UI talking to java backend through Blaze DS. Flex SDK 3.4.0 and JDK 6u20 are being used.
Overall, I was very productive with IDEA. Editing and completion worked well and the debugger works fine.
I did run into some bad infinite loop exceptions which caused me to restart IDEA several times a day per 8 hours of work (See IDEA-54932 for one of them; Unfortunately, I couldn't reproduce a test case but it was always when I was editing mxml and actionscript)
I wanted to mention the top 10 issues/wants which came up repeatedly, day-in day-out. If the following were fixed/implemented, I would be even more productive.
Thanks,
-Alex
1. BUG - Find Usages of a function is showing the function declaration as a usage.
(See IDEA-55179 )
2. FEATURE - If you rename a property, IDEA doesn't offer to rename the getter/setter, and vice versa. In Java, you will be prompted with "Getter and setter methods found for field _test. Rename them as well?" In actionscript, the getter and setter are even more formalized with "get xxx" and "set xxx", so my opinion is IDEA should always rename property with simple getter/setter and vice versa. There is no need to prompt the user since I can't think of any case where you don't want to do it, and there is no ambiguity because of the formal "get xxx" and "set xxx" syntax.
(See IDEA-48647 )
3. FEATURE - Need Inspection: "i18n - hard coded strings" needed for mxml/actionscript similar to what we have for java.
For java code we have Internationalization issues->Hard coded strings inspection which reports any instances of hardcoded String literals.
I would like something similar for mxml and actionscript code, as I have gotten used to the feature in java, and find it saves alot of time having the quickfix to create a new resource string in my message bundle. I find that I18N/L10N is even more critical for flex apps since almost all of them need to be i18n whereas lots of java applications may not need to be, or only parts of them.
(See IDEA-54708 , Also related bug IDEA-54549 )
4. FEATURE - [flex] when mxmlc is run via ant task, the resulting compile error is shown as info in the messages panel
We build our flex and java code using ant build.xml scripts. Not having the errors hyperlinked is wasted alot of time.
(See IDEA-54867)
5. BUG - Analyze Stacktrace doesn't work for stacktrace from flashplayer 10
Similar to 4. It would be a huge timesaver if the stacktrace was hyperlinked.
(See IDEA-54524, This is already fixed in 96.244 IDEA 10 EAP. Is it going to be fixed in 9.0.3 EAP ?)
6. BUG - good code red - external actionscript is not evaluated in context of where it is inlined in mxml file(s)
I have alot of RED in our actionscript files which are included in mxml using mx:Script source=".." mechanism. The actionscript should be evaluated in the context of mxml file(s) it is inserted into. For my own code I have avoided this by not using <Script source="">. But our project still has alot of code where this was done and those files look like a mess in IntelliJ. IntelliJ correctly handles similar situation with JSP pages including JSP fragments, so hopefully something can be done for MXML including actionscript code.
(See IDEA-52598, IDEA-52309, IDEA-25323, IDEA-52602, IDEA-52601,
7. FEATURE - Change Signature! By far, my two most frequently used refactoring in java are Rename and Change Signature. I have those two bound to special keybindings ALT+R and ALT+S. There were a number of times I needed to add a new parameter to a function and update all the existing usages with a default value, but I had to do it manually.
8. BUG - Formatting issues.
I have run into a number of formatting issues with actionscript and mxml. (Some examples IDEA-55180 IDEA-54811 ) I know formatter has a gazillion options, and there are a gazillion permutations of the settings. But the biggest annoyance is when the auto-indent doesn't match the formatter. (Example: IDEA-55181 )
9. Can't think of anymore off the top of my head. I've filed lots of other bugs, but I can't think of any more critical issues which are affecting my productivity.
10. One wishlist kind of feature would be "Extract component" in mxml.
请先登录再写评论。
Alex, thank you very much for your feedback. Some of the issues will be fixed for IDEA 9.0.3 release.
Hi Alex,
This inconsistency is present for a lot of non-Java elements, not just Flex code.
For example, same issue is present for JavaScript language. +1 for (finally) resolving it.
+1. Perhaps it might make sense to still show the dialog.
Scenarios I'm thinking about are:
a) Property is accessed from external code (current module compiles to SWC, for example)
b) Current field and linked getter/setter might not be in sync (w.r.t. names)
+1. Note that for JSP/JSPX files, IDEA also provides an explicit entry in the "Refactor..." menu.
By the way, how are you typically managing/editing the resource bundles? (See also http://youtrack.jetbrains.net/issue/IDEA-55052)
I think in almost all cases it makes sense to move such code to an explicit class (or top-level functions).
However, that's not always a realistic option - this indeed makes using IDEA on existing code bases a pain.
http://youtrack.jetbrains.net/issue/IDEA-26353
-tt
I don't follow your example a), but for b), IDEA just wouldn't do anything because the field doesn't match in name. I also have set xxx and get xxx where xxx doesn't exist, but instead is some derivation of some other fields,etc. What I was suggesting is IDEA do it automatically only for simple getters/setters, e.g. getFoo():int {return _foo} and setFoo(value:int) { _foot = value}.
What I have found in java development is it becomes annoying after awhile to answer the question "Getter and setter methods found for th field _foo. Rename them as well?" when it's almost 100% of the time. Maybe rather than a popup question, the rename dialog should have a checkbox [x] rename getter/setters which I can leave checked on, so I don't have to keep answering the question over and over again.
-Alex
We have a src/resources/{en_US,fr_FR,ja_JP,etc} and inside each we have a bunch of properties files for different moduels in the UI, e.g. navigation.properties, tileView.properties, etc. We have custom ant build.xml that packages the resource files into a swf file. We use ant to build and package java and flex code.
When I created a sandbox flex application to try out some things, I ran into a problem compiling flex from IDEA; In order for the i18n resources to work, it seems IDEA expected the 'resources' or 'locales' directory to be a content root, but that wasn't the case for my project. I had to fiddle around to get IDEA to package the resource files into the SWF file. Even though the IDEA wasn't bundling the resources the "Cannot resolve property bundle" and "Cannot resolve property key" syntax errors worked because I guess IDEA considers all *.properties files in your workspace?
I would like to explicitly call out my i18n resource directory or directories, and have IDEA only use those.
We have alot of other properties files which are not i18n resources.
-Alex
Related to item 3. FEATURE - Need Inspection: "i18n - hard coded strings" needed for mxml/actionscript similar to what we have for java.

What I talked about before was the need for a inspection + intention/quickfix to insert the resourceManager.getString('bundle','propertyKey') in place of the hard coded string.
But related to this are the inspections IntelliJ has for checking resourceManager.getString('console','preferencesViewLabel') or @Resource(bundle='console',key='preferencesViewLabel') in your code. IntelliJ will highlight property bundles and keys which don't exist. That is good, but there are a couple problems with how it works right now.
1. The property may exist in a different resource bundle then specified, e.g. 'foo' exists in navigation.properties but not console.properties. IntelliJ doesn't think anything is wrong, but that will fail at runtime. (See IDEA-54549)
2. If the property doesn't exist, if you use the intention/quickfix to add the property, IntelliJ doesn't preselect the property file to the one indicated e.g. console.properties. Instead, it has a combobox listing all the property files in your workspace including non-locale property files. For me, I have some build.properties files which show up first. What I have to do is scroll the very long list (~ 1000 property files) and find 'console.properties'. See screenshot. IntelliJ should preselect the property file indicated by the bundle param. (See IDEA-55282)
Attachment(s):
create_property.png
Following issues should be fixed in next IDEA 9.0.3 EAP, all others being features currently viewed as targetting IDEA 10
0. Bad infinite loop exceptions IDEA-55273 (IDEA-54932)
1. Find usages problem IDEA-55179
3. Property reference problems IDEA-54549
5. Analyze Stacktrace doesn't work for stacktrace from flashplayer 10 IDEA-54524
8. BUG - Formatting issues IDEA-54811
Thank you for the feedback!