Move class to its own file [message #227011] |
Sat, 11 August 2007 10:01 |
Eclipse User |
|
|
|
Originally posted by: sreddy30.csc.com
Hi,
I am new to Eclipse IDE. I worked in JDeveloper earlier. I have a java
file that contains multiple classes. I wish to move each of them to their
own file with classname.java. I could easily do it in JDeveloper. But in
eclipse 3.2, i could not do it. I have found only one option Move when i
select the class. But to move the text to a new file, that file must be
present already. I find this little cumbersome. Can you please suggest me
any easy way to do this.
Thanks,
Suresh
|
|
|
Re: Move class to its own file [message #227017 is a reply to message #227011] |
Sat, 11 August 2007 10:25 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Suresh,
I'm not sure this works for 3.2, but at least in 3.3 you can select the
class (use Edit->Expand Selection To->Enclosing Element), copy it, and
then paste it into the package where you want it. You can use
Source->Organize Imports on the result. All these actions have hot keys.
Suresh wrote:
> Hi,
>
> I am new to Eclipse IDE. I worked in JDeveloper earlier. I have a
> java file that contains multiple classes. I wish to move each of them
> to their own file with classname.java. I could easily do it in
> JDeveloper. But in eclipse 3.2, i could not do it. I have found only
> one option Move when i select the class. But to move the text to a new
> file, that file must be present already. I find this little
> cumbersome. Can you please suggest me any easy way to do this.
>
> Thanks,
> Suresh
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08686 seconds