views:

939

answers:

3

I have been using Netbeans for my java desktop application since few months. Now in the middle of the project, I want to switch over to Eclipse as the Netbeans once corrupted my GUI and I had to re-create several parts of the GUI and now it is displaying a compiler error as

code too large
private void initComponents() {
1 error

"code too large" is a strange error. My code which it is saying too large is just 10,000 lines long. I came to know first time that we couldn't develop long code in Netbeans :)

So instead of going into detail, I want to switch to Eclipse. I have never used it before. So could please tell me how to import my incompleted Netbeans project into eclipse.

+1  A: 

I dont' know if there exists a plugin for that, but if you've used default Netbeans settings it's likely the GUI layout code and form files won't be compatible.

What I suggest you do is first refactor your existing code to eliminate Netbeans-specific features, as well as making it smaller, and working.

For GUI-stuff, you should create several classes and beans so that your main GUI file is much-much smaller. 10000 lines of GUI code is pretty much unmanageable.

JRL
Could you please tell me how to do refactoring?
Yatendra Goel
I have heard about it but don't know how to use refactoring.
Yatendra Goel
Refactoring simply means rewriting your program in a different manner. The goal being to have simpler classes that encapsulate specific behavior rather than one gigantic class that does everything. For example, create a file for your menu, one for your main panel, one for your status bar, etc.
JRL
A: 

the easiest thing to do would be to create a new project in eclipse and import the codebase from filesystem into the project. Eclipse has an option to import from filesystem.

Aadith
+1  A: 

I suppose your main concern is migrate the GUI builder stuff, not only your code. The latter would be no problem but I guess that the first one is difficult if not impossible. And furthermore, as far as I know there is no standard GUI builder application in eclipse.

bertolami