views:

67

answers:

2

Eclipse as a option to create a class automatically once a undefined Object is detected

e.g.

Tester test = new Tester();

It will ask if you want to create the Tester class. Does it have an option to create multiple class/batch create the necessary classes? I have have 50 classes to create and this is kinda tedious

+1  A: 

No, I don't think Eclipse can do that in batch. Might be better off writing a quick-and-dirty script to do it this one time, or if you see this as something you'll need over and over again, maybe write an Eclipse plug-in (I don't know of any that do that, but it's not a situation I've ever run into).

FrustratedWithFormsDesigner
i think this might be my best option
ferronrsmith
+1  A: 

As illustrated by the bug 232735, some quick fix cannot be applied to multiple instances of an error.

The quick fix processor might still be buggy, but just in case, here is the process (for you to try in 3.4 or 3.5.1)

  • Right-click on warning in Problems tab
  • Choose "Quick Fix"
  • In the "Quick Fix" window that opens up, select a fix type
  • Click "Select All" to select all files that need the fix.
  • Hit "Finish" to apply the fix.

But that would only take care of one non-defined class detected accross several files.
It will not apply to multiple class.

VonC
doesn't work, but thanks anyways.
ferronrsmith