AppCode annoyances
I'm a big AppCode fan, and I love all the features and the responsive development team. However, I've noticed over the past several months a number of things which seem annoying and inconvenient, and I wanted to know if these are bugs, feature requests, intentional implementations, or things that can be worked around currently. If these are bugs or feature requests, I will open tickets for them, but I'm hoping that maybe there are settings or fixes already in place for some or all of these issues:
1) When I use code completion on an object, AppCode shows me methods and properties from unimported categories. If I select one of these options, the category will be automatically imported at the top of my .m file. This is great! However, if I did not use code completion and type in or copy and paste a call to a method or property from an unimported category, AppCode highlights it as an error, but does not offer to fix it for me by importing the needed category header with Alt+Enter. Since AppCode will allow me to Alt+Enter to import missing class definitions, and since AppCode is clearly aware of methods in unimported categories anyway, why can't it just fix this for me?
Example:
-(void)doSomething
{
MyClass *myObject = [[MyClass alloc] init];
[myObject someUnimportedCategoryMethod]; //AppCode highlights this as an error, but does not offer to fix it by importing the category header
}
2) If I need to message or alloc/init an object within a parameter, code completion does not work. Code completion works with properties and dot syntax, but not with method calls or anything that involves a space.
Screen shot:
3) Related to the above, if I manually type in a method call within a parameter, autobracketing doesn't work. Typing the "]" closing bracket after the method name will either do nothing, or add a bracket at the very beginning of the statement, rather than in front of the object being messaged (which is how autobracketing usually works).
Screen shot:
^ note that the opening bracket "[" was auto-added in front of "myString", instead of in front of "NSString" when I added a closing bracket after the call to "stringWithFormat".
4) When using the generally excellent merge / diff tool in AppCode, if I have a merge conflict with 100 changed or conflicting lines, and I accept all non-conflicting changes or resolve conflicts manually, using the up and down arrow icons to go to the next / previous conflict will jump to the location of every accepted change and / or resolved conflict, instead of just the remaining ones. I have had project file conflicts that involve hundreds of changed lines, and after I accept all non-conflicting changes, there might be 2 conflicts remaining. There doesn't seem to be any way to jump to just those remaining conflicts, but instead I have to either jump one by one through ALL changes, including accepted, non-conflicting changes (hundreds of clicks), or I have to scroll through thousands of lines of code and try not to miss the remaining conflict as it rolls by in the window (like finding a needle in a haystack sometimes). Am I missing something and is there a better way to do this?
Thanks!
Please sign in to leave a comment.
Hi Daniel,
Thanks for such a detailed report.
I cannot reproduce the first case you mentioned, but here is the issues related to 2 and 3:
2) http://youtrack.jetbrains.com/issue/OC-9039
3) http://youtrack.jetbrains.com/issue/OC-3942
Feel free to vote.
Do you have a sample project reproducing the first problem?
Best Regards,
Alexey
Hi Alexey! Thanks as always for the response.
Regarding #1, I have attached a sample project. Inside the AppDelegate, you will find the line:
Note that the "extendedDescription" property is highlighted red as an error by AppCode, because the "MyClass+ExtendedDescription" category header is not imported. However, pressing Alt+Enter to fix the error results only in the options shown above, no option to import the missing header.
If you retype myClass.extendedDescription and use code completion to fill in the property, the category header will be imported automatically and there will be no error. However, there is no way to fix the code automatically if it is typed without code completion or copy / pasted.
What about point #4 in my original post? Any feedback on that one?
Attachment(s):
UnimportedCategoryMethodExample.zip
Daniel,
Thanks for the sample project I was able to reproduce #1.
http://youtrack.jetbrains.com/issue/OC-9465
Concerning #4, looks like there is no way to iterate only through unresolved conflicts at the moment. I've filed appropriate request.
http://youtrack.jetbrains.com/issue/IDEA-123196
Best Regards,
Alexey
Thanks Alexey! I upvoted those tickets :)