can’t refactor code used in this language
来源:互联网 发布:软件定义 编辑:程序博客网 时间:2024/06/06 00:47
Is there a way to refactor mixed C++/Objective-C code in Xcode ?? I am writing a game using Cocos2D and Box2D, and the Box2D is written on C++, so every class I write should have .mm extension and therefore when I try to e.g. rename the variable, I got a message like "Xcode can only refactor C and Objective-C code".
解决方案:
Xcode is VERY limited with refactoring, even with plain Obj-C. It's basically renaming and it can't even rename in comments. If it says it can't do something, then it probably can't.
The only way to rename is using find & replace
. Note that Xcode can handle regular expressions so it is often good enough.
Of course, the problem is that find & replace doesn't know the programming language and sometimes can add some extra replace or forget to replace something, therefore be extra careful. Clean build is neccessary after every refactoring to check everything got renamed correctly.
You can also use command line tools (e.g. sed
) to achieve the same.
- can’t refactor code used in this language
- jqGrid ---Grid can not be used in this ('quirks...
- Grid can not be used in this ('quirks') mode!
- Can't update table 'tbl' in stored function/trigger because it is already used by statement which invoked this stored function/t
- MySQL触发器更新本表数据异常:Can't update table 'tbl' in stored function/trigger because it is already used by statement which invoked this
- Solution for Can’t update table ‘t1′ in stored function/trigger because it is already used by statement which invoked this store
- mysql -- error code [1442]; Can't update table 'table_name' in stored function/trigger because it is already used by statement w
- Code Refactor
- can't declare any more prefixes in this context
- How can I refactor converting this array into a Hash
- jqGrid不支持IE8的解决办法(Grid can not be used in this ('quirks') mode)
- wireshark:no interface can be used for capturing in this system with the current configuration
- jqGrid不支持IE8的解决办法(Grid can not be used in this ('quirks') mode)
- Language Used to Participated in Meetings
- Changing the Language Used in ODI Studio
- Is refactor method to field in this case?
- Can Your Programming Language Do This?
- Can Your Programming Language Do This?
- java 数据结构
- C#中文本文件与二进制文件
- 51nod_1046 A^B Mod C
- 数据库同步
- 实现足够大List<int>剔除重复的数字
- can’t refactor code used in this language
- MySQL存储过程decimal得到值为0.00问题
- What exactly is copy-on-modify semantics in R, and where is the canonical source?
- 表格内容筛选
- 2017gmic大会|倒计时3天(文末有彩蛋)
- 大型网站技术架构-网站高性能架构-记录
- windows调用另外一个EXE程序,WinExec+Cmd+BAT
- JSP页面,脚本标签
- Android 引导页功能