Advice moving from Eclipse to xCode

Posted by Gloin the Dark on Stack Overflow See other posts from Stack Overflow or by Gloin the Dark
Published on 2010-04-15T23:44:07Z Indexed on 2010/04/15 23:53 UTC
Read the original article Hit count: 535

Filed under:
|

To xCode xPerts: I have been doing Java in Eclipse for about 9 years now and I have really gotten used to the power of the refactoring tools. There are a few operations I do all the time. I am looking for equivalents in xCode since it has better support for objective-c than eclipse. (I'm not at my Mac as I write this. So some of this is from memory. I am still very new to xCode.)

1 "rename".

It seems that the xCode equivalent for variables is "edit all in scope". Does this work for files/classes/methods too?

2 "extract local variable"

select an expression it creates a local var initialized to that expression. It even creates a usable name for the variable.

3 "extract method"

select some code and it will create a method with that code and appropriate parameters/return value.

4 "inline" (variable or method)

opposite of extract, inlines all or just the selected occurrence of the selected var or method.

5 "find next"

occurrence of selected text. In eclipse I can select some text and hit ctrl-k to go to the next occurrence of that in the file. likewise shift-ctrl-k finds backwards. IIRC the xCode "find next" ignores the selection and only uses what is in the find box.

6 "change method signature"

This would be very useful with ocjective-c's named parameter messaging syntax. This is great for adding parameters to a method.

7 "pull-up/push-down"

for moving methods up or down the class hierarchy.

8 "move"

for moving elements around to other classes etc.

Those are the ones that I use all of the time. I have estimated that these tools cut my coding time in half. Are any of these supported in xCode?

Thanks in advance for any advice.

© Stack Overflow or respective owner

Related posts about xcode

Related posts about eclipse