有没有办法用eclipse中的方法提取一个类? [英] Is there a way to extract a class with methods in eclipse?

查看:130
本文介绍了有没有办法用eclipse中的方法提取一个类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试重构一个我有2个班的班。不幸的是,eclipse的提取类函数似乎只支持那些真的不是有用的变量。有没有办法提取方法,还是有一个插件呢?

解决方案

另一个解决方案是 CTRL C - CTRL V 将您的课程转换为另一个课程,然后开始删除您不想要的...



您可以在新课程的大纲视图中选择多个元素,然后选择删除。

粗体但有效。



alt文字http://help.eclipse.org/galileo/ topic / org.eclipse.jdt.doc.user / gettingStarted / images / view_outline_search_references.png


I am trying to refactor a class that I have into 2 classes. Unfortunately eclipse's extract class function seems to only support the variables which really isn't all that helpful. Is there a way to extract the methods or is there a plugin that does it?

解决方案

One other solution is to CTRL C-CTRL V your class into another one, and start removing what you do not want...

You can select multiple elements in the outline view of the new class and select delete.
Crude but effective.

alt text http://help.eclipse.org/galileo/topic/org.eclipse.jdt.doc.user/gettingStarted/images/view_outline_search_references.png

这篇关于有没有办法用eclipse中的方法提取一个类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆