开发者

Xcode refactoring error - "The Selection Does Not Contain Identifiable Content"

  1. Select a method

    Selection http://synapticmishap.co.uk/aSO/SelectionGrab.jpg

  2. Edit > Refactor...

  3. Select "Move Up"

  4. I get the following error a lot.

Refactoring Error http://synapticmishap.co.uk/aSO/RefactoringError.jpg

Any ideas on how I can get Xcode to, well, do its job?

Solution Summary

Option 2 that Peter suggests below did the trick. I can't believe that

a) I didn't try this Smacks head

a开发者_开发技巧nd

b)

Xcode couldn't find a sane way of saying "Don't select the whole method!"


Two possibilities:

  1. Maybe that blank line at the start is screwing it up? Try starting the selection at the -/+.
  2. Try right-clicking the first segment of the selector and Refactoring that.


I tried refactoring a class (implementation) after I renamed the containing file manually and got the same error. Once I renamed the file back to its original name I was able to refactor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜